{"problem":{"name":"H. Repairing Of String","description":{"content":"Stepan had a favorite string _s_ which consisted of the lowercase letters of the Latin alphabet. After graduation, he decided to remember it, but it was a long time ago, so he can't now remember it. ","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF774H"},"statements":[{"statement_type":"Markdown","content":"Stepan had a favorite string _s_ which consisted of the lowercase letters of the Latin alphabet.\n\nAfter graduation, he decided to remember it, but it was a long time ago, so he can't now remember it. But Stepan remembers some information about the string, namely the sequence of integers _c_1, _c_2, ..., _c__n_, where _n_ equals the length of the string _s_, and _c__i_ equals the number of substrings in the string _s_ with the length _i_, consisting of the **same** letters. The substring is a sequence of consecutive characters in the string _s_.\n\nFor example, if the Stepan's favorite string is equal to \"_tttesst_\", the sequence _c_ looks like: _c_ = \\[7, 3, 1, 0, 0, 0, 0\\].\n\nStepan asks you to help to repair his favorite string _s_ according to the given sequence _c_1, _c_2, ..., _c__n_.\n\n## Input\n\nThe first line contains the integer _n_ (1 ≤ _n_ ≤ 2000) — the length of the Stepan's favorite string.\n\nThe second line contains the sequence of integers _c_1, _c_2, ..., _c__n_ (0 ≤ _c__i_ ≤ 2000), where _c__i_ equals the number of substrings of the string _s_ with the length _i_, consisting of the same letters.\n\nIt is guaranteed that the input data is such that the answer always exists.\n\n## Output\n\nPrint the repaired Stepan's favorite string. If there are several answers, it is allowed to print any of them. The string should contain only lowercase letters of the English alphabet.\n\n[samples]\n\n## Note\n\nIn the first test Stepan's favorite string, for example, can be the string \"_kkrrrq_\", because it contains 6 substrings with the length 1, consisting of identical letters (they begin in positions 1, 2, 3, 4, 5 and 6), 3 substrings with the length 2, consisting of identical letters (they begin in positions 1, 3 and 4), and 1 substring with the length 3, consisting of identical letters (it begins in the position 3).","is_translate":false,"language":"English"}],"meta":{"iden":"CF774H","tags":["constructive algorithms"],"sample_group":[["6\n6 3 1 0 0 0","kkrrrq"],["4\n4 0 0 0","abcd"]],"created_at":"2026-03-03 11:00:39"}}