{"trustable":true,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eLong is a huge fan of CFC (Codeforces Fried Chicken). But the price of CFC is increasing, so he decides to breed the chicken on his own farm.\u003c/p\u003e\u003cp\u003eHis farm is presented by a rectangle grid with $$$r$$$ rows and $$$c$$$ columns. Some of these cells contain rice, others are empty. $$$k$$$ chickens are living on his farm. \u003cspan class\u003d\"tex-font-style-bf\"\u003eThe number of chickens is not greater than the number of cells with rice on the farm.\u003c/span\u003e\u003c/p\u003e\u003cp\u003eLong wants to give his chicken playgrounds by assigning these farm cells to his chickens. He would like to satisfy the following requirements:\u003c/p\u003e\u003cul\u003e \u003cli\u003e Each cell of the farm is assigned to \u003cspan class\u003d\"tex-font-style-bf\"\u003eexactly one\u003c/span\u003e chicken. \u003c/li\u003e\u003cli\u003e Each chicken is assigned \u003cspan class\u003d\"tex-font-style-bf\"\u003eat least one\u003c/span\u003e cell. \u003c/li\u003e\u003cli\u003e The set of cells assigned to every chicken forms a connected area. More precisely, if two cells $$$(x, y)$$$ and $$$(u, v)$$$ are assigned to the same chicken, this chicken is able to walk from $$$(x, y)$$$ to $$$(u, v)$$$ by passing only its cells and moving from each cell to another cell sharing a side. \u003c/li\u003e\u003c/ul\u003e\u003cp\u003eLong also wants to prevent his chickens from fighting for food. Hence he wants the difference between the maximum and the minimum number of cells with rice assigned to a chicken to be as small as possible. Please help him.\u003c/p\u003e"}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eEach test contains multiple test cases. The first line contains the number of test cases $$$T$$$ ($$$1 \\le T \\le 2 \\cdot 10^4$$$). Description of the test cases follows.\u003c/p\u003e\u003cp\u003eThe first line of each test case contains three integers $$$r$$$, $$$c$$$ and $$$k$$$ ($$$1 \\leq r, c \\leq 100, 1 \\leq k \\leq 62$$$), representing the size of Long\u0027s farm and the number of chickens Long has. \u003c/p\u003e\u003cp\u003eEach of the next $$$r$$$ lines contains $$$c$$$ characters, each is either \"\u003cspan class\u003d\"tex-font-style-tt\"\u003e.\u003c/span\u003e\" or \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eR\u003c/span\u003e\", representing an empty cell or a cell with rice. It is guaranteed that \u003cspan class\u003d\"tex-font-style-bf\"\u003ethe number of chickens is not greater than the number of cells with rice on the farm.\u003c/span\u003e\u003c/p\u003e\u003cp\u003eIt is guaranteed that the sum of $$$r \\cdot c$$$ over all test cases does not exceed $$$2 \\cdot 10^4$$$.\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eFor each test case, print $$$r$$$ lines with $$$c$$$ characters on each line. Each character should be either a lowercase English character, an uppercase English character, or a digit. Two characters should be equal if and only if the two corresponding cells are assigned to the same chicken. \u003cspan class\u003d\"tex-font-style-bf\"\u003eUppercase and lowercase characters are considered different, so \"\u003cspan class\u003d\"tex-font-style-tt\"\u003eA\u003c/span\u003e\" and \"\u003cspan class\u003d\"tex-font-style-tt\"\u003ea\u003c/span\u003e\" belong to two different chickens.\u003c/span\u003e\u003c/p\u003e\u003cp\u003eIf there are multiple optimal answers, print any.\u003c/p\u003e"}},{"title":"Examples","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\n3 5 3\n..R..\n...R.\n....R\n6 4 6\nR..R\nR..R\nRRRR\nRRRR\nR..R\nR..R\n5 5 4\nRRR..\nR.R..\nRRR..\nR..R.\nR...R\n2 31 62\nRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\nRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e11122\n22223\n33333\naacc\naBBc\naBBc\nCbbA\nCbbA\nCCAA\n11114\n22244\n32444\n33344\n33334\nabcdefghijklmnopqrstuvwxyzABCDE\nFGHIJKLMNOPQRSTUVWXYZ0123456789\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eThese pictures explain the sample output. Each color represents one chicken. Cells filled with patterns (not solid colors) contain rice.\u003c/p\u003e\u003cp\u003eIn the first test case, each chicken has one cell with rice. Hence, the difference between the maximum and the minimum number of cells with rice assigned to a chicken is $$$0$$$.\u003c/p\u003e\u003cp\u003e\u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/e90f86cd0d80a5b8a07cf6327c33022e?v\u003d1726374693\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e\u003c/p\u003e\u003cp\u003eIn the second test case, there are $$$4$$$ chickens with $$$3$$$ cells of rice, and $$$2$$$ chickens with $$$2$$$ cells of rice. Hence, the difference between the maximum and the minimum number of cells with rice assigned to a chicken is $$$3 - 2 \u003d 1$$$.\u003c/p\u003e\u003cp\u003e\u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/97518ba2d2e1b6da96e046c600058879?v\u003d1726374693\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e\u003c/p\u003e\u003cp\u003eIn the third test case, each chicken has $$$3$$$ cells with rice. \u003cimg class\u003d\"tex-graphics\" src\u003d\"CDN_BASE_URL/a6dd7eedd6b7976cd9c6e2c86b018329?v\u003d1726374693\" style\u003d\"max-width: 100.0%;max-height: 100.0%;\"\u003e\u003c/p\u003e\u003cp\u003eIn the last test case, since there are $$$62$$$ chicken with exactly $$$62$$$ cells of rice, each chicken must be assigned to exactly one cell. The sample output is one of the possible way.\u003c/p\u003e"}}]}