with open("tree.nwk", "r") as f:
	tr = f.readline()

mapping = {}
mapping["KR534507_Guinea_Conakry_24-Jul-2014"]	= "166"
mapping["KR534508_Guinea_Conakry_24-Jul-2014"]	= "165"
mapping["KR534509_Guinea_Siguiri_24-Jul-2014"]	= "226"
mapping["KR534510_Guinea_Kouroussa_27-Jul-2014"]	= "225"
mapping["KR534511_Guinea_Conakry_02-Aug-2014"]	= "162"
mapping["KR534512_Guinea_Gueckedou_12-Aug-2014"]	= "134"
mapping["KR534513_Guinea_Macenta_14-Aug-2014"]	= "116"
mapping["KR534514_Guinea_Conakry_15-Aug-2014"]	= "60"
mapping["KR534515_Guinea_Conakry_16-Aug-2014"]	= "163"
mapping["KR534516_Guinea_Conakry_19-Aug-2014"]	= "161"
mapping["KR534517_Guinea_Conakry_20-Aug-2014"]	= "141"
mapping["KR534518_Guinea_Conakry_21-Aug-2014"]	= "132"
mapping["KR534519_Guinea_Conakry_22-Aug-2014"]	= "156"
mapping["KR534520_Guinea_Conakry_26-Aug-2014"]	= "151"
mapping["KR534521_Guinea_Conakry_28-Aug-2014"]	= "157"
mapping["KR534522_Guinea_Conakry_28-Aug-2014"]	= "154"
mapping["KR534523_Guinea_Dubreka_29-Aug-2014"]	= "133"
mapping["KR534524_Guinea_Coyah_11-Sep-2014"]	= "139"
mapping["KR534525_Guinea_Conakry_14-Sep-2014"]	= "158"
mapping["KR534526_Guinea_Forecariah_15-Sep-2014"]	= "140"
mapping["KR534527_Guinea_Conakry_19-Sep-2014"]	= "152"
mapping["KR534528_Guinea_Kindia_20-Sep-2014"]	= "18"
mapping["KR534529_Guinea_Conakry_21-Sep-2014"]	= "143"
mapping["KR534530_Guinea_Coyah_21-Sep-2014"]	= "88"
mapping["KR534531_Guinea_Forecariah_21-Sep-2014"]	= "135"
mapping["KR534532_Guinea_Conakry_22-Sep-2014"]	= "142"
mapping["KR534533_Guinea_Dalaba_24-Sep-2014"]	= "146"
mapping["KR534534_Guinea_Dalaba_24-Sep-2014"]	= "147"
mapping["KR534535_Guinea_Conakry_25-Sep-2014"]	= "117"
mapping["KR534536_Guinea_Conakry_25-Sep-2014"]	= "131"
mapping["KR534537_Guinea_Conakry_28-Sep-2014"]	= "20"
mapping["KR534538_Guinea_Conakry_02-Oct-2014"]	= "89"
mapping["KR534539_Guinea_Conakry_02-Oct-2014"]	= "127"
mapping["KR534540_Guinea_Dalaba_02-Oct-2014"]	= "64"
mapping["KR534541_Guinea_Conakry_04-Oct-2014"]	= "32"
mapping["KR534542_Guinea_Coyah_04-Oct-2014"]	= "128"
mapping["KR534543_Guinea_Coyah_04-Oct-2014"]	= "35"
mapping["KR534544_Guinea_Coyah_04-Oct-2014"]	= "34"
mapping["KR534545_Guinea_Conakry_06-Oct-2014"]	= "24"
mapping["KR534546_Guinea_Coyah_07-Oct-2014"]	= "33"
mapping["KR534547_Guinea_Coyah_07-Oct-2014"]	= "130"
mapping["KR534548_Guinea_Kerouane_07-Oct-2014"]	= "31"
mapping["KR534549_Guinea_Coyah_07-Oct-2014"]	= "36"
mapping["KR534550_Guinea_Coyah_08-Oct-2014"]	= "125"
mapping["KR534551_Guinea_Conakry_08-Oct-2014"]	= "120"
mapping["KR534552_Guinea_Conakry_08-Oct-2014"]	= "126"
mapping["KR534553_Guinea_Coyah_09-Oct-2014"]	= "119"
mapping["KR534554_Guinea_Forecariah_09-Oct-2014"]	= "159"
mapping["KR534555_Guinea_Conakry_10-Oct-2014"]	= "184"
mapping["KR534556_Guinea_Coyah_10-Oct-2014"]	= "25"
mapping["KR534557_Guinea_Coyah_11-Oct-2014"]	= "97"
mapping["KR534558_Guinea_Coyah_13-Oct-2014"]	= "29"
mapping["KR534559_Guinea_Conakry_14-Oct-2014"]	= "118"
mapping["KR534560_Guinea_Conakry_14-Oct-2014"]	= "102"
mapping["KR534561_Guinea_Conakry_15-Oct-2014"]	= "123"
mapping["KR534562_Guinea_Conakry_18-Oct-2014"]	= "22"
mapping["KR534563_Guinea_Conakry_19-Oct-2014"]	= "124"
mapping["KR534564_Guinea_Forecariah_18-Oct-2014"]	= "136"
mapping["KR534565_Guinea_Forecariah_18-Oct-2014"]	= "121"
mapping["KR534566_Guinea_Forecariah_20-Oct-2014"]	= "137"
mapping["KR534567_Guinea_Nzerekore_22-Oct-2014"]	= "129"
mapping["KR534568_Guinea_Forecariah_24-Oct-2014"]	= "122"
mapping["KR534569_Guinea_Kindia_23-Oct-2014"]	= "19"
mapping["KR534570_Guinea_Conakry_24-Oct-2014"]	= "148"
mapping["KR534571_Guinea_Coyah_24-Oct-2014"]	= "23"
mapping["KR534572_Guinea_Coyah_24-Oct-2014"]	= "26"
mapping["KR534573_Guinea_Coyah_25-Oct-2014"]	= "27"
mapping["KR534574_Guinea_Coyah_25-Oct-2014"]	= "38"
mapping["KR534575_Guinea_Conakry_15-Oct-2014"]	= "104"
mapping["KR534576_Guinea_Conakry_16-Oct-2014"]	= "105"
mapping["KR534577_Guinea_Conakry_18-Sep-2014"]	= "149"
mapping["KR534578_Guinea_Conakry_19-Sep-2014"]	= "138"
mapping["KR534579_Guinea_Conakry_24-Sep-2014"]	= "153"
mapping["KR534580_Guinea_Conakry_25-Sep-2014"]	= "145"
mapping["KR534581_Guinea_Conakry_25-Sep-2014"]	= "37"
mapping["KR534582_Guinea_Conakry_27-Sep-2014"]	= "144"
mapping["KR534583_Guinea_Conakry_02-Oct-2014"]	= "21"
mapping["KR534584_Guinea_Conakry_02-Oct-2014"]	= "160"
mapping["KR534585_Guinea_Conakry_04-Oct-2014"]	= "150"
mapping["KR534586_Guinea_Conakry_24-Jul-2014"]	= "164"
mapping["KR534587_Guinea_Conakry_26-Aug-2014"]	= "155"
mapping["KR534588_Guinea_Conakry_27-Aug-2014"]	= "114"
mapping["KR534589_Guinea_Coyah_04-Oct-2014"]	= "63"
mapping["KR534590_Guinea_Coyah_07-Oct-2014"]	= "30"
mapping["KR534591_Guinea_Coyah_07-Oct-2014"]	= "28"
mapping["KR817067_Guinea_unknown_01-Sep-2014"]	= "169"
mapping["KR817068_Guinea_unknown_01-Sep-2014"]	= "174"
mapping["KR817069_Guinea_unknown_01-Sep-2014"]	= "168"
mapping["KR817070_Guinea_unknown_04-Sep-2014"]	= "170"
mapping["KR817071_Guinea_unknown_04-Sep-2014"]	= "197"
mapping["KR817072_Guinea_unknown_07-Sep-2014"]	= "172"
mapping["KR817073_Guinea_unknown_07-Sep-2014"]	= "198"
mapping["KR817074_Guinea_unknown_09-Sep-2014"]	= "190"
mapping["KR817075_Guinea_unknown_12-Sep-2014"]	= "112"
mapping["KR817076_Guinea_unknown_13-Sep-2014"]	= "200"
mapping["KR817077_Guinea_unknown_13-Sep-2014"]	= "185"
mapping["KR817078_Guinea_unknown_13-Sep-2014"]	= "188"
mapping["KR817079_Guinea_unknown_21-Sep-2014"]	= "196"
mapping["KR817080_Guinea_unknown_22-Sep-2014"]	= "204"
mapping["KR817081_Guinea_unknown_29-Sep-2014"]	= "59"
mapping["KR817082_Guinea_unknown_29-Sep-2014"]	= "179"
mapping["KR817083_Guinea_unknown_29-Sep-2014"]	= "203"
mapping["KR817084_Guinea_unknown_30-Sep-2014"]	= "62"
mapping["KR817085_Guinea_unknown_01-Oct-2014"]	= "58"
mapping["KR817086_Guinea_unknown_01-Oct-2014"]	= "187"
mapping["KR817087_Guinea_unknown_01-Oct-2014"]	= "189"
mapping["KR817088_Guinea_unknown_05-Oct-2014"]	= "171"
mapping["KR817089_Guinea_unknown_05-Oct-2014"]	= "186"
mapping["KR817090_Guinea_unknown_20-Dec-2014"]	= "79"
mapping["KR817091_Guinea_unknown_19-Dec-2014"]	= "72"
mapping["KR817092_Guinea_unknown_22-Dec-2014"]	= "56"
mapping["KR817093_Guinea_unknown_24-Dec-2014"]	= "77"
mapping["KR817094_Guinea_unknown_26-Dec-2014"]	= "73"
mapping["KR817095_Guinea_unknown_27-Dec-2014"]	= "69"
mapping["KR817096_Guinea_unknown_02-Jan-2015"]	= "70"
mapping["KR817097_Guinea_unknown_02-Jan-2015"]	= "68"
mapping["KR817098_Guinea_unknown_04-Jan-2015"]	= "71"
mapping["KR817099_Guinea_unknown_04-Jan-2015"]	= "67"
mapping["KR817100_Guinea_unknown_11-Jan-2015"]	= "90"
mapping["KR817101_Guinea_unknown_14-Jan-2015"]	= "91"
mapping["KR817102_Guinea_unknown_15-Jan-2015"]	= "52"
mapping["KR817103_Guinea_unknown_22-Jan-2015"]	= "53"
mapping["KR817104_Guinea_unknown_25-Jan-2015"]	= "54"
mapping["KR817105_Guinea_unknown_27-Jan-2015"]	= "55"
mapping["KR817106_Guinea_unknown_31-Jan-2015"]	= "61"
mapping["KR817107_Guinea_unknown_18-Jul-2014"]	= "227"
mapping["KR817113_Guinea_unknown_22-Jul-2014"]	= "220"
mapping["KR817116_Guinea_unknown_01-Aug-2014"]	= "195"
mapping["KR817117_Guinea_unknown_01-Aug-2014"]	= "199"
mapping["KR817118_Guinea_unknown_01-Aug-2014"]	= "194"
mapping["KR817119_Guinea_unknown_01-Aug-2014"]	= "193"
mapping["KR817120_Guinea_unknown_04-Aug-2014"]	= "201"
mapping["KR817121_Guinea_unknown_04-Aug-2014"]	= "65"
mapping["KR817122_Guinea_unknown_08-Aug-2014"]	= "202"
mapping["KR817124_Guinea_unknown_14-Aug-2014"]	= "51"
mapping["KR817126_Guinea_unknown_16-Aug-2014"]	= "167"
mapping["KR817130_Guinea_unknown_23-Aug-2014"]	= "66"
mapping["KR817131_Guinea_unknown_29-Aug-2014"]	= "175"
mapping["KR817132_Guinea_unknown_30-Aug-2014"]	= "87"
mapping["KR817133_Guinea_unknown_30-Aug-2014"]	= "115"
mapping["KR817134_Guinea_unknown_31-Aug-2014"]	= "113"
mapping["KR817135_Guinea_unknown_10-Oct-2014"]	= "111"
mapping["KR817136_Guinea_unknown_10-Oct-2014"]	= "109"
mapping["KR817137_Guinea_unknown_10-Oct-2014"]	= "108"
mapping["KR817138_Guinea_unknown_10-Oct-2014"]	= "110"
mapping["KR817139_Guinea_unknown_10-Oct-2014"]	= "85"
mapping["KR817140_Guinea_unknown_17-Oct-2014"]	= "191"
mapping["KR817141_Guinea_unknown_18-Oct-2014"]	= "106"
mapping["KR817142_Guinea_unknown_18-Oct-2014"]	= "107"
mapping["KR817143_Guinea_unknown_18-Oct-2014"]	= "178"
mapping["KR817144_Guinea_unknown_19-Oct-2014"]	= "84"
mapping["KR817145_Guinea_unknown_22-Oct-2014"]	= "173"
mapping["KR817146_Guinea_unknown_23-Oct-2014"]	= "100"
mapping["KR817147_Guinea_unknown_23-Oct-2014"]	= "101"
mapping["KR817148_Guinea_unknown_26-Oct-2014"]	= "103"
mapping["KR817149_Guinea_unknown_27-Oct-2014"]	= "82"
mapping["KR817150_Guinea_unknown_29-Oct-2014"]	= "81"
mapping["KR817151_Guinea_unknown_01-Nov-2014"]	= "182"
mapping["KR817152_Guinea_unknown_01-Nov-2014"]	= "183"
mapping["KR817153_Guinea_unknown_03-Nov-2014"]	= "177"
mapping["KR817154_Guinea_unknown_03-Nov-2014"]	= "86"
mapping["KR817155_Guinea_unknown_08-Nov-2014"]	= "47"
mapping["KR817156_Guinea_unknown_08-Nov-2014"]	= "50"
mapping["KR817157_Guinea_unknown_13-Nov-2014"]	= "46"
mapping["KR817158_Guinea_unknown_13-Nov-2014"]	= "45"
mapping["KR817159_Guinea_unknown_13-Nov-2014"]	= "176"
mapping["KR817160_Guinea_unknown_24-Nov-2014"]	= "94"
mapping["KR817161_Guinea_unknown_24-Nov-2014"]	= "93"
mapping["KR817162_Guinea_unknown_01-Dec-2014"]	= "57"
mapping["KR817163_Guinea_unknown_01-Dec-2014"]	= "99"
mapping["KR817164_Guinea_unknown_04-Dec-2014"]	= "181"
mapping["KR817165_Guinea_unknown_03-Dec-2014"]	= "92"
mapping["KR817166_Guinea_unknown_04-Dec-2014"]	= "96"
mapping["KR817167_Guinea_unknown_09-Dec-2014"]	= "180"
mapping["KR817168_Guinea_unknown_09-Dec-2014"]	= "98"
mapping["KR817169_Guinea_unknown_11-Dec-2014"]	= "95"
mapping["KR817170_Guinea_unknown_11-Dec-2014"]	= "83"
mapping["KR817171_Guinea_unknown_14-Dec-2014"]	= "75"
mapping["KR817172_Guinea_unknown_14-Dec-2014"]	= "48"
mapping["KR817173_Guinea_unknown_15-Dec-2014"]	= "74"
mapping["KR817174_Guinea_unknown_14-Dec-2014"]	= "49"
mapping["KR817175_Guinea_unknown_16-Dec-2014"]	= "80"
mapping["KR817176_Guinea_unknown_17-Dec-2014"]	= "76"
mapping["KR817177_Guinea_unknown_18-Dec-2014"]	= "78"
mapping["KR817178_Guinea_unknown_30-Jul-2014"]	= "192"
mapping["KR817179_Guinea_unknown_28-Mar-2014"]	= "44"
mapping["KR817180_Guinea_unknown_28-Mar-2014"]	= "43"
mapping["KR817181_Guinea_unknown_31-Mar-2014"]	= "17"
mapping["KR817182_Guinea_unknown_31-Mar-2014"]	= "208"
mapping["KR817183_Guinea_unknown_31-Mar-2014"]	= "39"
mapping["KR817184_Guinea_unknown_31-Mar-2014"]	= "234"
mapping["KR817185_Guinea_unknown_31-Mar-2014"]	= "235"
mapping["KR817186_Guinea_unknown_30-Mar-2014"]	= "213"
mapping["KR817187_Guinea_unknown_27-Mar-2014"]	= "212"
mapping["KR817188_Guinea_unknown_27-Mar-2014"]	= "210"
mapping["KR817189_Guinea_unknown_27-Mar-2014"]	= "211"
mapping["KR817190_Guinea_unknown_02-Apr-2014"]	= "215"
mapping["KR817191_Guinea_unknown_02-Apr-2014"]	= "214"
mapping["KR817192_Guinea_unknown_03-Apr-2014"]	= "209"
mapping["KR817193_Guinea_unknown_02-Apr-2014"]	= "16"
mapping["KR817195_Guinea_unknown_04-Apr-2014"]	= "15"
mapping["KR817196_Guinea_unknown_07-Apr-2014"]	= "236"
mapping["KR817197_Guinea_unknown_10-Apr-2014"]	= "40"
mapping["KR817198_Guinea_unknown_11-Apr-2014"]	= "218"
mapping["KR817199_Guinea_unknown_12-Apr-2014"]	= "217"
mapping["KR817200_Guinea_unknown_13-Apr-2014"]	= "216"
mapping["KR817201_Guinea_unknown_18-Apr-2014"]	= "41"
mapping["KR817202_Guinea_unknown_22-Apr-2014"]	= "42"
mapping["KR817203_Guinea_unknown_28-Apr-2014"]	= "14"
mapping["KR817204_Guinea_unknown_01-May-2014"]	= "10"
mapping["KR817205_Guinea_unknown_07-May-2014"]	= "13"
mapping["KR817206_Guinea_unknown_07-May-2014"]	= "11"
mapping["KR817207_Guinea_unknown_10-May-2014"]	= "9"
mapping["KR817208_Guinea_unknown_11-May-2014"]	= "5"
mapping["KR817209_Guinea_unknown_11-May-2014"]	= "4"
mapping["KR817210_Guinea_unknown_14-May-2014"]	= "1"
mapping["KR817211_Guinea_unknown_18-May-2014"]	= "2"
mapping["KR817212_Guinea_unknown_21-May-2014"]	= "6"
mapping["KR817213_Guinea_unknown_21-May-2014"]	= "219"
mapping["KR817214_Guinea_unknown_22-May-2014"]	= "7"
mapping["KR817215_Guinea_unknown_24-May-2014"]	= "8"
mapping["KR817216_Guinea_unknown_24-May-2014"]	= "232"
mapping["KR817217_Guinea_unknown_28-May-2014"]	= "233"
mapping["KR817218_Guinea_unknown_01-Jun-2014"]	= "224"
mapping["KR817219_Guinea_unknown_05-Jun-2014"]	= "207"
mapping["KR817220_Guinea_unknown_05-Jun-2014"]	= "206"
mapping["KR817221_Guinea_unknown_09-Jun-2014"]	= "221"
mapping["KR817222_Guinea_unknown_09-Jun-2014"]	= "231"
mapping["KR817223_Guinea_unknown_09-Jun-2014"]	= "230"
mapping["KR817224_Guinea_unknown_09-Jun-2014"]	= "222"
mapping["KR817225_Guinea_unknown_10-Jun-2014"]	= "223"
mapping["KR817226_Guinea_unknown_10-Jun-2014"]	= "3"
mapping["KR817230_Guinea_unknown_20-Jun-2014"]	= "229"
mapping["KR817235_Guinea_unknown_22-Jun-2014"]	= "12"
mapping["KR817237_Guinea_unknown_25-Jun-2014"]	= "228"
mapping["KR817242_Guinea_unknown_10-Jul-2014"]	= "205"

for k in mapping.keys():
	tr = tr.replace(k, mapping[k])

print tr