{"problem":{"name":"I. Idiotic Suffix Array","description":{"content":"Cuber QQ did not know about the _Suffix Array_ before, now he knows. So he eagerly wants to teach you. Now he takes a string containing only lowercase letters as an example and builds a _Suffix Array","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":1048576},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10260I"},"statements":[{"statement_type":"Markdown","content":"Cuber QQ did not know about the _Suffix Array_ before, now he knows. So he eagerly wants to teach you.\n\nNow he takes a string containing only lowercase letters as an example and builds a _Suffix Array_ with the following C++ code on a supercomputer.\n\nFor example, the _Suffix Array_ of \"_ecnu_\" is ${1, 0, 2, 3}$ and the _Suffix Array_ of \"_cubercsl_\" is ${2, 5, 0, 3, 7, 4, 6, 1}$.\n\nIt's definitely not satisfying enough for Cuber QQ to show off his algorithm skills, so he wants to test you with a problem.\n\nHe will give you two integers $n$ and $k$ ($1 <= k <= n$), you are required to answer him a string of length $n$ containing only lowercase letters and satisfying _sa[k - 1] == 0_, where _sa_ is the _Suffix Array_ of the string built by the code above.\n\nTL;DR, you are required to answer a string of length $n$ containing only lowercase letters and it ranks $k$-th smallest among all its suffixes in lexicographical order.\n\nWe can show that an answer always exists.\n\nA string $a$ is lexicographically smaller than a string $b$ if and only if one of the following holds: \n\nTwo integers $n$, $k$ ($1 <= k <= n <= 10^5$) — the length of the string and the rank of the string itself among all its suffixes.\n\nOutput the answer, which is a string of length $n$ only containing lowercase letters.\n\nIf there are multiple answers, print any of them.\n\n## Input\n\nTwo integers $n$, $k$ ($1 <= k <= n <= 10^5$) — the length of the string and the rank of the string itself among all its suffixes.\n\n## Output\n\nOutput the answer, which is a string of length $n$ only containing lowercase letters.If there are multiple answers, print any of them.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"Let $n, k \\in \\mathbb{Z}$ with $1 \\leq k \\leq n \\leq 10^5$.  \nConstruct a string $s \\in \\{a, b, \\dots, z\\}^n$ such that the suffix starting at index $0$ (i.e., $s[0:n]$) is the $k$-th lexicographically smallest suffix among all suffixes $s[i:n]$ for $i \\in \\{0, 1, \\dots, n-1\\}$.\n\n**Objective:**  \nFind any string $s$ of length $n$ such that $\\text{sa}[k-1] = 0$, where $\\text{sa}$ is the suffix array of $s$.","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10260I","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}