{"problem":{"name":"aab aba baa","description":{"content":"Among the strings of length $A + B$ containing $A$ occurrences of `a` and $B$ occurrences of `b`, find the string that comes $K$\\-th in the lexicographical order.","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc202_d"},"statements":[{"statement_type":"Markdown","content":"Among the strings of length $A + B$ containing $A$ occurrences of `a` and $B$ occurrences of `b`, find the string that comes $K$\\-th in the lexicographical order.\n\n## Constraints\n\n*   $1 \\leq A, B \\leq 30$\n*   $1 \\leq K \\leq S$, where $S$ is the number of strings of length $A + B$ containing $A$ occurrences of `a` and $B$ occurrences of `b`.\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$A$ $B$ $K$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc202_d","tags":[],"sample_group":[["2 2 4","baab\n\nHere are the strings containing two `a`s and two `b`s in the lexicographical order: `aabb`, `abab`, `abba`, `baab`, `baba`, and `bbaa`. The fourth string, `baab`, should be printed."],["30 30 118264581564861424","bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\n\n$K$ may not fit into a $32$\\-bit integer type."]],"created_at":"2026-03-03 11:01:14"}}