{"trustable":true,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cdiv class\u003d\"panel_content\"\u003eFrog studies algorithms on strings. He finds it so interesting that he can\u0027t stop playing with his strings. These days he has just learnt about palindrome, and comes up with a problem about it.\u003cbr\u003e\u003cbr\u003eGiven two integers, $N$ and $M$, he wants to construct a string of length $N$, whose substrings contain exactly $M$ distinct non-empty palindromes. A palindrome is a string which is exactly the same as the reverse of itself. For example, “ABBA”, “ADA”, “A”, and “UUSSUU” are palindromes, but “USTC”, “AB”, and “ABC” are not. A substring is a consecutive part of the original string. For example, “US”, “USTC”, “STC”, and “TC” are substrings of “USTC”, but “UC” and “CT” are not.\u003cbr\u003e\u003cbr\u003eFrog finds it too hard for him to solve this problem. So he asks you for help. BTW, he won\u0027t make it too easy for you, so he decided to ask you solve this problem under his restrictions. You can only use the first $K$ capital letters in the English alphabet $(A-Z)$. Please write a program to solve this problem.\u003cbr\u003e\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"There is an integer $T$ in the first line indicating the number of total test cases. ($T≤20000$). Each test case contains three integers $N, M,$ and $K$, ($1≤N,M≤100000,1≤K≤26$), separated by single spaces. We guarantee the sum of $N$ will not exceed 2000000."}},{"title":"Output","value":{"format":"HTML","content":"For each test case, output a single line consisting of “\u003cb\u003eCase #X:\u003c/b\u003e” first, where $X$ is the test case number starting from 1. Output the string that you find in the next line. The string should contain only the first $K$ capital letters. If there are multiple solutions, you can output any of them. If there is no such string satisfying Frog’s requirements, output “\u003cb\u003eImpossible\u003c/b\u003e” instead. Please follow the output format exactly, and do not output any additional character or new line."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e4\r\n3 3 3\r\n4 4 4\r\n2 2 1\r\n2 1 1\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase #1:\r\nABA\r\nCase #2:\r\nABCD\r\nCase #3:\r\nAA\r\nCase #4:\r\nImpossible\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Hint","value":{"format":"HTML","content":"\u003cbr\u003eFor the first test case, “A”, “ABA”, “B” are the all distinct palindrome substrings of “ABA”. There are other possible answers, such as “BAB” and “AAA”. For the second test case, “USTC” is not a valid answer, because it contains letters other than the first 4 capital letters.\u003cbr\u003e"}}]}