{"raw_statement":[{"iden":"statement","content":"Diego wants to message his friend Ketzia, for this he will first grab a word and encode it as numbers and then apply some encryption to the numbers and send it to her. Ironically, after coming up with this solution he realized that this system has to send word by word, only works for words were every letter is in alphabetical order and also there are many chat services that are free and will encrypt messages securely so there was no need to invent this encryption system.\n\nIn order to encrypt Diego will first grab a word of $N$ characters and convert every character into its numerical ASCII (for example 'A' -> 65, '0' -> 48, 'a' -> 97). After that he will have exactly $N$ positive numbers.\n\nGiven those $N$ numbers, he will generate all possible $2^N$ subsets and then for each subset get the sum of all the numbers in the subset, he will then sort the sums and send them to Ketzia. She will decrypt the message by doing the inverse of the encryption steps.\n\nFor this particular problem, he will do the decryption of the message. \n\nAn integer $N$ $(1 <= N <= 20)$, the amount of characters the word Diego sent Ketzia originally had.\n\nFollowed by 1 line with $2^N$ integers $(0 < = a_i < = 2440)$, all the sorted sums of all possible subsets of the $N$ numbers generated by converting all characters to their ASCII representation of the original word.\n\nA single line with exactly $N$ alphanumeric characters sorted in non-decreasing order by ASCII value, the original word Diego sent Ketzia.\n\n"},{"iden":"input","content":"An integer $N$ $(1 <= N <= 20)$, the amount of characters the word Diego sent Ketzia originally had.Followed by 1 line with $2^N$ integers $(0 < = a_i < = 2440)$, all the sorted sums of all possible subsets of the $N$ numbers generated by converting all characters to their ASCII representation of the original word."},{"iden":"output","content":"A single line with exactly $N$ alphanumeric characters sorted in non-decreasing order by ASCII value, the original word Diego sent Ketzia."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ N \\in \\mathbb{Z} $ with $ 1 \\leq N \\leq 20 $.  \nLet $ S = \\{s_1, s_2, \\dots, s_{2^N}\\} $ be a sorted sequence of $ 2^N $ non-negative integers, representing the sorted subset sums of an unknown multiset $ A = \\{a_1, a_2, \\dots, a_N\\} $ of positive integers (ASCII values of alphanumeric characters).\n\n**Constraints**  \n1. $ 0 \\leq s_i \\leq 2440 $ for all $ i \\in \\{1, \\dots, 2^N\\} $  \n2. $ s_1 = 0 $ (empty subset sum)  \n3. The multiset $ A $ consists of ASCII values of alphanumeric characters, so $ a_i \\in \\{48, 49, \\dots, 57, 65, 66, \\dots, 90, 97, 98, \\dots, 122\\} $  \n4. The original word's characters are sorted in non-decreasing ASCII order.\n\n**Objective**  \nRecover the unique multiset $ A = \\{a_1, a_2, \\dots, a_N\\} $ such that the multiset of subset sums of $ A $ equals $ S $, and output the corresponding string of $ N $ characters sorted in non-decreasing ASCII order.","simple_statement":"Given N and a list of 2^N sorted subset sums, find the original N alphanumeric characters (in non-decreasing ASCII order) that were converted to ASCII values to produce those sums.","has_page_source":false}