{"problem":{"name":"One More aab aba baa","description":{"content":"Find the $K$\\-th lexicographically smallest string among the strings that are permutations of a string $S$. What is a permutation of a string?A string $A$ is said to be a permutation of a string $B$ w","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc215_c"},"statements":[{"statement_type":"Markdown","content":"Find the $K$\\-th lexicographically smallest string among the strings that are permutations of a string $S$.\nWhat is a permutation of a string?A string $A$ is said to be a permutation of a string $B$ when any character occurs the same number of times in $A$ and $B$.\n\n## Constraints\n\n*   $1 \\le |S| \\le 8$\n*   $S$ consists of lowercase English letters.\n*   There are at least $K$ distinct strings that are permutations of $S$.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$S$ $K$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc215_c","tags":[],"sample_group":[["aab 2","aba\n\nThere are three permutations of a string `aab`: ${$ `aab`, `aba`, `baa` $}$. The $2$\\-nd lexicographically smallest of them is `aba`."],["baba 4","baab"],["ydxwacbz 40320","zyxwdcba"]],"created_at":"2026-03-03 11:01:13"}}