Polycarp is mad about coding, that is why he writes Sveta encoded messages. He calls the median letter in a word the letter which is in the middle of the word. If the word's length is even, the median letter is the left of the two middle letters. In the following examples, the median letter is highlighted: contest, info. If the word consists of single letter, then according to above definition this letter is the median letter. 

Polycarp encodes each word in the following way: he writes down the median letter of the word, then deletes it and repeats the process until there are no letters left. For example, he encodes the word volga as logva.

You are given an encoding *s* of some word, your task is to decode it.
The first line contains a positive integer *n* (1 ≤ *n* ≤ 2000) — the length of the encoded word.

The second line contains the string *s* of length *n* consisting of lowercase English letters — the encoding.
In the first example Polycarp encoded the word volga. At first, he wrote down the letter l from the position 3, after that his word looked like voga. After that Polycarp wrote down the letter o from the position 2, his word became vga. Then Polycarp wrote down the letter g which was at the second position, the word became va. Then he wrote down the letter v, then the letter a. Thus, the encoding looked like logva.

In the second example Polycarp encoded the word no. He wrote down the letter n, the word became o, and he wrote down the letter o. Thus, in this example, the word and its encoding are the same.

In the third example Polycarp encoded the word baba. At first, he wrote down the letter a, which was at the position 2, after that the word looked like bba. Then he wrote down the letter b, which was at the position 2, his word looked like ba. After that he wrote down the letter b, which was at the position 1, the word looked like a, and he wrote down that letter a. Thus, the encoding is abba.
5
logva
volga
2
no
no
4
abba
baba
51
kfsmpaeviowvkdbuhdagquxxqniselafnfbrgbhmsugcbbnlrvv
vlbcumbrfflsnxugdudvovamfkspeiwkbhaqxqieanbghsgbnrv
1
w
w
2
cb
cb
3
qok
oqk
4
aegi
gaei
5
oqquy
uqoqy
6
ulhpnm
nhulpm
7
ijvxljt
jxjivlt
8
wwmiwkeo
ewmwwiko
9
gmwqmpfow
opqmgwmfw
10
hncmexsslh
lsechnmxsh
20
rtcjbjlbtjfmvzdqutuw
uudvftlbcrtjjbjmzqtw
21
gjyiqoebcnpsdegxnsauh
usxesnboijgyqecpdgnah
30
udotcwvcwxajkadxqvxvwgmwmnqrby
bqmmwxqdkawvcoudtwcxjaxvvgwnry
31
ipgfrxxcgckksfgexlicjvtnhvrfbmb
mfvnvclefkccxfpigrxgksgxijthrbb
50
wobervhvvkihcuyjtmqhaaigvahheoqleromusrartldojsjvy
vsolrruoeqehviaqtycivhrbwoevvkhujmhagaholrmsatdjjy
200
hvayscqiwpcfykibwyudkzuzdkgqqvbnrfeupjefevlvojngmlcjwzijrkzbsaovabkvvwmjgoonyhuiphwmqdoiuueuyqtychbsklflnvghipdgaxhuhiiqlqocpvhldgvnsrtcwxpidrjffwvwcirluyyxzxrglheczeuouklzkvnyubsvgvmdbrylimztotdbmjph
pmdoziybmgsunkluuzelrzyurcvfjdpwtsvdhpolihhadignfkbctyeuoqwpuyogmvkaoszriwcmnoleeperbqgdukuwiycwqsahvycipfkbydzzkqvnfujfvvjgljzjkbavbvwjonhihmdiuuqyhsllvhpgxuiqqcvlgnrcxirfwwilyxxghceokzvybvvdrlmttbjh
201
rpkghhfibtmlkpdiklegblbuyshfirheatjkfoqkfayfbxeeqijwqdwkkrkbdxlhzkhyiifemsghwovorlqedngldskfbhmwrnzmtjuckxoqdszmsdnbuqnlqzswdfhagasmfswanifrjjcuwdsplytvmnfarchgqteedgfpumkssindxndliozojzlpznwedodzwrrus
urzoenpzoolndismpgetgcanvypdujriasmaafwzlqbdmsqxcjmnwhfslneloohseiykhxbrkdwiexfakokterfsulglipltihgprkhfbmkdkebbyhihajfqfybeqjqwkkdlzhifmgwvrqdgdkbmrztukodzsnunqsdhgsfwnfjcwsltmfrhqedfuksnxdizjlzwddwrs
500
aopxumqciwxewxvlxzebsztskjvjzwyewjztqrsuvamtvklhqrbodtncqdchjrlpywvmtgnkkwtvpggktewdgvnhydkexwoxkgltaesrtifbwpciqsvrgjtqrdnyqkgqwrryacluaqmgdwxinqieiblolyekcbzahlhxdwqcgieyfgmicvgbbitbzhejkshjunzjteyyfngigjwyqqndtjrdykzrnrpinkwtrlchhxvycrhstpecadszilicrqdeyyidohqvzfnsqfyuemigacysxvtrgxyjcvejkjstsnatfqlkeytxgsksgpcooypsmqgcluzwofaupegxppbupvtumjerohdteuenwcmqaoazohkilgpkjavcrjcslhzkyjcgfzxxzjfufichxcodcawonkxhbqgfimmlycswdzwbnmjwhbwihfoftpcqplncavmbxuwnsabiyvpcrhfgtqyaguoaigknushbqjwqmmyvsxwabrub
ubwsymwqhukiogytfrpybswxmanpctohwhjnwdsymigbxnwcoxcffzxfcyzlcrvjplkoaamweedoemtpbpgpaozlgmpocgkgtelfasskecygtxyaieyqnzqoiydriisaethcvhcrwnpnzyrtnqwggfytzuhkeztbgcmfegqdhhzcelliinxdmalarwgqnrtgvqcwftsalkoxkyngwtgptkntvyljcqndbqlvmvsqzwyzvktsexvwxiqupaoxmcwexlzbzsjjwejtruatkhrotcdhrpwmgkwvgkedvhdewxgteribpisrjqdykqrycuqgwiqeboykbalxwciygivbibhjsjnjeynijyqdjdkrriktlhxyrspcdzlcqeydhvfsfumgcsvrxjvjjtntqkyxsspoysqcuwfuexpuvujrhtuncqozhigkacjshkjgzxjuihcdaokhqfmlcwzbmwbiffpqlcvbunaivchgqauagnsbjqmvxarb
501
oilesjbgowlnayckhpoaitijewsyhgavnthycaecwnvzpxgjqfjyxnjcjknvvsmjbjwtcoyfbegmnnheeamvtfjkigqoanhvgdfrjchdqgowrstlmrjmcsuuwvvoeucfyhnxivosrxblfoqwikfxjnnyejdiihpenfcahtjwcnzwvxxseicvdfgqhtvefswznuyohmmljlnxubhevywpmnitnkhecsgccpstxkmdzabsnwxkokdfsogzbpnfvgudvqlstxojzfzugxbfrozveaiofrzksegdelxsdhcjlqwqlgjcqiujptoenxozhkqhcpkarretqzfkwuvbmfdcdoqliyzmlfrfhzrnkbhofuctkpeacqejwvdrlyvepudrlzncbhwrgmxrczphsoymvtuzqjscvbtqpymogupgzctepccravjcrfsadueyraqvwasravkubebojqspdntewnjohvccamvoxdauyakvehjhabpdyzyme
mzdbhhvaudomcvonenpqoeuvravayuafcvrcecguoyqbcjztmohzrmrhczrueyrvjqaptuobnzffmylocfbukztraphkzxetjicgqqjhsldekroavofxufjxsqdgfpzofkkwsadktpcsektnpyebxllmouzsetqfvisxwnwtafehijynxkwolxsvxhfuovusmrlswgdcrdvnogkfvaenmefotjjsvkcnyfjxzncaytvgywjtapkynwgjeiolsbolachoiieshanhcewvpgqjxjjnvmbwcybgnhemtjiqahgfjhqortmjcuwvecyniorbfqifjnedipnchjczvxecdghvfwnyhmjnuhvwminhcgcsxmzbnxodsgbnvuvltozzgbrzeifzsgexdclwljquponohqckreqfwvmddqizlrhrkhfckecewdlvpdlnbwgxcpsyvuqsvtpmgpztpcajrsderqwsakbbjsdtwjhcavxaykejapyye
from datetime import datetime
print("=========================Калькулятор Майнера=========================\n")


print(r'          \ ___ /  ')
print(r'       .--./   \ __ ')
print(r'    .-(    )___/ ' )
print(r'   (___.__.____)\ ','\n')

print("Калькулятор предназначен для подчета прибыли и расхода, тем самым помогая \nМайнеру зарабатывать больше\n")
print("=====================================================================")


print("Выберите Валюту(USD,EUR,RUB,KAZ): ")
moneyName = input("==> ")
print("")

bazaUstroistv = [  "Видеокарта – Nvidia RTX 3090",
                   "Видеокарта – Nvidia GTX 680",
                   "Видеокарта – AMD Radeon RX 6900 XT",
                   "Видеокарта - NVIDIA GeForce RTX 3080 Ti",
                   "Видеокарта - AMD Radeon RX 6800 XT",
                   "Видеокарта – NVIDIA GeForce RTX 3080",
                   "Видеокарта – AMD Radeon RX 6800",
                   "Видеокарта – NVIDIA GeForce RTX 3070 Ti",
                   "Видеокарта - NVIDIA GeForce RTX 3070",
                   "Видеокарта - NVIDIA GeForce RTX 2080 Ti",
                   "Процессор – Intel Core i5",
                   "Процессор – Intel Core i6",
                   "Процессор – Intel Core i7",
                   "Процессор – Intel Core i8",
                   "Процессор – Intel Core i9",
                   "Процессор – Intel Core i4",
                   "Процессор – AMD EPYC 7763",
                   "Процессор – AMD Ryzen Threadripper 3990X",
                   "Процессор – AMD Ryzen Threadripper PRO 3995WX",
                   "Процессор – AMD EPYC 7643",
                   "ОЗУ - CORSAIR VENGEANCE LED",
                   "ОЗУ - G.SKILL TRIDENT Z RGB",
                   "ОЗУ - KINGSTON HYPERX PREDATOR",
                   "ОЗУ - KINGSTON HYPERX FURY",
                   "ОЗУ - CORSAIR DOMINATOR PLATINUM RGB",
                   "ОЗУ - HYPERX FURY RGB 3733MHZ",
                   "ОЗУ - G.SKILL TRIDENT Z RGB DC",
                   "ОЗУ - ADATA SPECTRIX D80",
                   "ОЗУ - G.SKILL TRIDENTZ ROYAL",
                   "ОЗУ - CORSAIR VENGEANCE LPX",
                   "Жесткий диск - Western Digital WD40EZRZ",
                   "Жесткий диск - Seagate Barracuda 2 TB ST2000DM008",
                   "Жесткий диск - Toshiba 1 TB HDWD110UZSVA",
                   "Жесткий диск - Western Digital WD1003FZEX",
                   "Жесткий диск - Seagate FireCuda 2 TB ST2000DX002",
                   "Жесткий диск - Toshiba 3 TB DT01ACA300",
                   "Жесткий диск - Seagate Barracuda 12 TB ST12000DM0007",
                   "Жесткий диск - HGST 10 TB HUH721010ALE604",
                   "Жесткий диск - Western Digital WD2005FBYZ",
                   "Жесткий диск - Maxtor 250 GB STM3250310AS",
                   "Блок Питания - Thermaltake TR2 RX-550W ",
                   "Блок Питания - AeroCool VX-350",
                   "Блок Питания - Zalman ZM1000-EBT 1000W",
                   "Блок Питания - FSP Group ATX-550PNR 550W",
                   "Блок Питания - Be quiet! Pure Power 11 400W",
                   "Блок Питания - Thermaltake Урал 650W",
                   "Блок Питания - TX750M 80 Plus Gold 750W",
                   "Блок Питания - Thermaltake Smart Pro RGB Bronze 850W",
                   "Блок Питания - AeroCool KCAS PLUS 400W",
                   "Блок Питания - Cooler Master V1200 Platinum 1200W"]

print("Выберите Устройство(чтобы посчитать расход энергии):")
print(f"Для начала напишите стоимоть электро-энергии в {moneyName} в сутках: ")
stoimostEnergii = float(input("==> "))
vyborMassive = []
summMassive = []
DohodMassive = []
schetcik = 0
massiveVybrannyhUstroustv = []
def vybor(bazaUstroistv, massiveVybrannyhUstroustv, schetcik,vyborMassive):
    print("Для того чтобы выбрать из списка нажмите 1")
    print("Для того чтобы написать другое устройство нажмите  2")
    vyborUstroistva = input("==> ")


    def vyborUstroistvaFunc(schetcik, bazaUstroistv, massiveVybrannyhUstroustv):
        print("Какой вид устройства нужен?(Видеокарта,\n\t\t        Процессор,\n\t\t        ОЗУ, \n\t\t        Жесткий диск,\n\t\t        Блок питания)")
        vidUstroistva = input("==>")
        for i in bazaUstroistv:
            if i.startswith(vidUstroistva):
                schetcik += 1 
                print(schetcik, i, sep = " - ")
                massiveVybrannyhUstroustv.append(i)
                
    def vyborUstroistvaFunc2(massiveVybrannyhUstroustv):
        print("Введите устройство(ВИД - НАЗВАНИЕ)(Видеокарта,\n\t\t        Процессор,\n\t\t        ОЗУ, \n\t\t        Жесткий диск,\n\t\t        Блок питания)")
        vidUstroistva = input("==>")
        massiveVybrannyhUstroustv.append(vidUstroistva)

        
    if vyborUstroistva == "1":
        vyborUstroistvaFunc(schetcik, bazaUstroistv, massiveVybrannyhUstroustv)
    elif vyborUstroistva == "2":
        vyborUstroistvaFunc2(massiveVybrannyhUstroustv)
        
    print("Выберите устройство по номеру")
    vybor = int(input("==> "))
    vyborMassive = []

    print("Выберите количество:")
    colUstroistva = int(input("==> "))
    vyborMassive.append(massiveVybrannyhUstroustv[vybor - 1])

    shet = 0
    videokartaVolt = 0.50
    ProcessorVolt = 0.55
    OzyVolt = 0.14
    ZhestkiyDiskVolt = 0.10
    BlokPitaniyaVolt = 0.25

    videokartaDOHOD = 0.56
    ProcessorDOHOD = 0.60
    OzyDOHOD = 0.21
    ZhestkiyDiskDOHOD = 0.13
    BlokPitaniyaDOHOD = 0.30
    
    if vyborMassive[shet].startswith("Видеокарта"):
        summMassive.append(videokartaVolt * colUstroistva)
        DohodMassive.append(videokartaDOHOD * colUstroistva)
        shet+=1
    elif vyborMassive[shet].startswith("Процессор"):
        summMassive.append(ProcessorVolt * colUstroistva)
        DohodMassive.append(ProcessorDOHOD * colUstroistva)
        shet+=1
    elif vyborMassive[shet].startswith("ОЗУ"):
        summMassive.append(OzyVolt * colUstroistva)
        DohodMassive.append(OzyDOHOD * colUstroistva)
        shet+=1
    elif vyborMassive[shet].startswith("Жесткий диск"):
        summMassive.append(ZhestkiyDiskVolt * colUstroistva)
        DohodMassive.append(ZhestkiyDiskDOHOD * colUstroistva)
        shet+=1
    elif vyborMassive[shet].startswith("Блок Питания"):
        summMassive.append(BlokPitaniyaVolt * colUstroistva)
        DohodMassive.append(BlokPitaniyaDOHOD * colUstroistva)
        shet+=1

vybor(bazaUstroistv , massiveVybrannyhUstroustv, schetcik,vyborMassive)


print("Хотите еще добавить?(1 - да, 0 - нет)")
dobavit = input("==> ")
if dobavit == "1":
    vybor(bazaUstroistv , massiveVybrannyhUstroustv, schetcik,vyborMassive)

print("расход за сутки - ",sum(summMassive) * stoimostEnergii)
print("доход за сутки - ",sum(DohodMassive) - (sum(summMassive)*stoimostEnergii))
print("доход за час - ",(sum(DohodMassive) - (sum(summMassive)*stoimostEnergii))//24)
print("расход за час - ",(sum(summMassive) * stoimostEnergii) //24)
print("доход за месяц - ",(sum(DohodMassive) - (sum(summMassive)*stoimostEnergii))*30)
print("расход за месяц - ",(sum(summMassive) * stoimostEnergii)*30)
print("доход за месяц - ",((sum(DohodMassive) - (sum(summMassive)*stoimostEnergii))*30)*12)
print("расход за месяц - ",((sum(summMassive) * stoimostEnergii)*30)*12)

close = input("нажмите 1 чтобы выйти ==>")




        


