# Setting up infinite prompts with a while-loop
x = 0 

while x == 0:
    print("Press Ctrl+D to Exit - *Invalid codes will close the script*")

    city_codes = input("What city code are you looking for?: ")

    code_list = {
        "abe":"Allentown, PA",
        "abq":"Albequerque, NM",
        "alb":"ALbany,NY",
        "anc":"Anchorage, AK",
        "atl":"Atlanta, GA",
        "atw":"Appleton, WI",
        "aus":"Austin, TX",
        "bdl":"Hartford, CT",
        "bhm":"Birmingham, AL",
        "bil":"Billings, MT",
        "bis":"Bismarck, ND",
        "bna":"Nashville, TN",
        "boi":"Boise, ID",
        "bos":"Boston, MA",
        "buf":"Buffalo, NY",
        "bwi":"Baltimore, MD",
        "bzn":"Bozeman, MT",
        "cae":"Columbia, SC",
        "chs":"Charleston, SC",
        "cle":"Cleveland, OH",
        "cmh":"Columbus, OH",
        "cos":"Colorado Springs, CO",
        "cun":"Cancun, Mexico",
        "cvg":"Cincinatti, OH",
        "czm":"Cozumel, Mexico",
        "dab":"Daytona Beach, FL",
        "day":"Dayton, OH",
        "dca":"Washington, DC",
        "den":"Denver, CO",
        "dfw":"Dallas-Ft Worth, TX",
        "dtw":"Detroit, MI",
        "ecp":"Panama City, FL (new airport)",
        "ege":"Vail, CO",
        "elp":"El Paso, Texas",
        "ewr":"Newark, NJ",
        "eyw":"Key West, FL",
        "fai":"Fairbank, AK",
        "far":"Fargo, ND",
        "fca":"Kalispell, MT",
        "fll":"Ft Lauderdale, FL",
        "fnt":"Flint, MI",
        "fsd":"Sioux Falls, SD",
        "gdl":"Guadalajara, Mexico",
        "geg":"Spokane, WA",
        "gfk":"Grand Forks, ND",
        "gpt":"Gulfport-Biloxi, MS",
        "grb":"Green Bay, WI",
        "grr":"Grand Rapids, MI",
        "gso":"Greensboro, NC",
        "gsp":"Greenville-Spartanburg, SC",
        "hdn":"Hayden, CO",
        "hnl":"Honolulu, HI",
        "hou":"Houston, TX",
        "hsv":"Huntsville, AL",
        "iad":"Washington, DC",
        "iah":"Housto, TX (Intercontinental)",
        "ind":"Indianapoilis, IN",
        "jac":"Jackson Hole, WY",
        "jan":"Jackson, MS",
        "jax":"Jacksonville, FL",
        "jfk":"New York, NY (Kennedy)",
        "koa":"Kailua-Kona, HI",
        "las":"Las Vegas, NV",
        "lax":"Los Angeles, CA",
        "lga":"New York, NY (Laguardia)",
        "lih":"Lihue, HI",
        "lit":"Little Rock, AR",
        "mbs":"Saginaw, MI",
        "mci":"Kansas City, MO",
        "mco":"Orlando, FL",
        "mdt":"Harrisburg, PA",
        "mdw":"Chicago-Midway",
        "mem":"Memphis, TN",
        "mex":"Mexico City, Mexico",
        "mht":"Manchester, NH",
        "mia":"Miami, FL",
        "mke":"Milwaukee, WI",
        "mlb":"Melbourne, FL",
        "msn":"Madison, WI",
        "msp":"Minneapolis-St Paul, MN",
        "msy":"New Orleans, LA",
        "mtj":"Montrose, CO",
        "myr":"Myrtle Beach, SC",
        "mzt":"Mazatlan, Mexico",
        "oak":"Oakland,CA",
        "ogg":"Kahului, HI",
        "okc":"Oklahoma City, OK",
        "oma":"Omaha, NE",
        "ont":"Ontario, CA",
        "ord":"Chicago - O'Hare",
        "orf":"Norfolk, VA",
        "pbi":"West Pam Beach, FL",
        "pdx":"Portland, OR",
        "pfn":"Panama City, FL(old airport)",
        "phf":"Newport News, VA",
        "phl":"Philadelphia, PA",
        "phx":"Phoenix, AZ",
        "pit":"Pittsburgh, PA",
        "pns":"Pensacola, FL",
        "psp":"Palm SPrings, CA",
        "pvd":"Providence, RI",
        "pvr":"Puerto Vallarta, Mexico",
        "pwm":"Portland, ME",
        "rap":"Rapid City, SD",
        "rdu":"Raleigh-Durham, NC",
        "ric":"Richmond, VA",
        "rno":"Reno, NV",
        "roc":"Rochester, NY",
        "rsw":"Ft. Meyers, FL",
        "san":"San Diego, CA",
        "sat":"San Antonio, TX",
        "sav":"Savannah, GA",
        "sdf":"Lousiville, KY",
        "sea":"Seattle, WA",
        "sfo":"San Francisco, CA",
        "sjc":"San Jose, CA",
        "sjd":"Los Cabos, Mexico",
        "slc":"Salt Lake City, UT",
        "smf":"Sacramento, CA",
        "sna":"Santa Ana, CA (Orange County / John Wayne)",
        "srq":"Sarasota-Bradenton, FL",
        "stl":"St Louis, MO",
        "tlh":"Tallahassee, FL",
        "tpa":"Tampa, FL",
        "tul":"Tulsa, OK",
        "tus":"Tucson, AZ",
        "tvc":"Traverse City, MI",
        "tys":"Knoxville, TN",
        "yvr":"Vancouver, BC",
        "ywg":"Winnipeg, MB",
        "yyz":"Toronto, OT",
        "zih":"Ixtapa-Zihuatanejo, Mexico",
        "zlo":"Manzanilla, Mexico",
        "yyc":"Calgary, AB",
        "abv":"Abuja, Nigeria",
        "acc":"Accra, Ghana",
        "amm":"Amman, Jordan",
        "anu":"St. John's, Antigua & Barbuda",
        "aua":"Oranjestad, Aruba",
        "bda":"Hamilton, Bermuda",
        "bgi":"Bridgetown, Barbados",
        "bog":"Bogota, Columbia",
        "bon":"Kralendijk, Bonaire",
        "bsb":"Brasilia, Brazil",
        "bze":"Belize City, Belize",
        "cai":"Cairo, Egypt",
        "ccs":"Caracas, Venezuela",
        "cur":"Willemstad, Curacao",
        "dkr":"Dakar, Senegal",
        "eze":"Buenos Aires, Argentina",
        "gcm":"Georgetown, Cayman Islands",
        "geo":"Georgetown, Guyana",
        "gig":"Rio de Janeiro, Brazil",
        "gye":"Guayaquil, Ecuador",
        "gua":"Guatemala City, Guatemala",
        "gnd":"Grenada, Grenada",
        "jnb":"Johannesburg, South Africa",
        "kin":"Kingston, Jamaica",
        "lim":"Lima, Peru",
        "lir":"Liberia, Costa Rics",
        "los":"Lagos, Nigeria",
        "mao":"Manaus, Brazil",
        "mbj":"Montego Bay, Jamaica",
        "mga":"Managua, Nicaragua",
        "nas":"Nassau, Bahamas",
        "pap":"Port-Au-Prince, Haiti",
        "pls":"Providenciales, Turks % Caicos",
        "pop":"Puerto Plata, DOmincan Republic",
        "pos":"Port of Spain, Trinidad & Tobago",
        "pty":"Panama City, Panama",
        "puj":"Punta Cana, Domincan Republic",
        "rtb":"Roatan, Honduras",
        "scl":"Santiago, Chile",
        "sdq":"Santo Domingo, Domincan Republic",
        "sjo":"San Jose, Costa Rica",
        "sju":"San Juan, Puerto Rico",
        "skb":"Basseterre, St. Kitts",
        "sti":"Santiago, Domincan Republic",
        "stt":"St. Thomas, Virign Islands",
        "stx":"St. Croix, Virgin Islands",
        "sxm":"Philipsburg, St. Maarten",
        "tob":"Tobago, Trinidad & Tobago",
        "tgu":"Tegucigalpa, Honduras",
        "tlv":"Tel Aviv, Israel",
        "uio":"Quito, Ecuador",
        "uvf":"Vieux-Fort, St. Lucia",
        "agp":"Malaga, Spain",
        "ams":"Amsterdam, Netherlands",
        "arn":"Stockholm, Sweden",
        "ath":"Athens, Greece",
        "bcn":"Barcelona, Spain",
        "bkk":"Bangkok, Thailand",
        "bom":"Mumbai, India",
        "bru":"Brussels, Belgium",
        "bud":"Budapest, Hungary",
        "cdg":"Paris, France",
        "cph":"Copenhagen, Denmark",
        "gru":"Sao Paolo, Brazil",
        "dub":"Dublin, Ireland",
        "dus":"Düsseldorf, Germany",
        "fco":"Rome, Italy",
        "fra":"Frankfurt, Germany",
        "gum":"Tamuning, Guam",
        "hkg":"Hong Kong, China",
        "hnd":"Tokyo-Haneda",
        "icn":"Seoul, South Korea",
        "ist":"Istanbul, Turkey",
        "kbp":"Kiev, Ukraine",
        "kef":"Reykjavik, Iceland",
        "kix":"Osaka, Japan",
        "lgw":"London-Gatwick",
        "lhr":"London-Heathrow",
        "mad":"Madrid, Spain",
        "mnl":"Manila, Phillipines",
        "muc":"Munich, Germany",
        "mxp":"Milano, Italy",
        "nce":"Niece, France",
        "ngo":"Nagoya, Japan",
        "nrt":"Tokyo-Narita",
        "pek":"Beijing, China",
        "prg":"Prague, Czech Republic",
        "psa":"Pisa, Italy",
        "pus":"Busan, South Korea",
        "pvg":"Shanghai, China",
        "ror":"Koror, Palau",
        "sin":"Singapore, Singapore",
        "snn":"Shannon, Ireland",
        "spn":"Saipan, Northern Mariana Islands",
        "str":"Stuttgart, Germany",
        "svo":"Moscow, Russia",
        "syd":"Sydney, Australia",
        "tpe":"Taipei, Taiwan",
        "txl":"Berlin, Germany",
        "vce":"Venice, Italy",
        "vlc":"Valencia, Spain",
        "zrh":"Zürich, Switzerland",
        "clt":"Charlotte, NC",
        "sal":"San Salvador, El Salvador",
        "sap":"San Pedro Sula, Honduras",
        "man":"Manchester, United Kingdom",
        "aca":"Acapulco, Mexico"
    }


    print(" ")
    print(city_codes.upper() + ": "+ code_list[city_codes])
    print(" ")