{"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\"\u003eHave you ever played a game in Windows: Mine?\u003cbr\u003eThis game is played on a n*m board, just like the Pic(1)\u003cbr\u003e\u003cimg style\u003d\"max-width:100%;\" src\u003d\"CDN_BASE_URL/492f0f462543ea8cff2a1424ade67df7?v\u003d1714196303\"\u003e\u003cbr\u003e\u003cimg style\u003d\"max-width:100%;\" src\u003d\"CDN_BASE_URL/a075ac98fffe97d106dda78dbdfa4010?v\u003d1714196303\"\u003e\u003cbr\u003eOn the board, Under some grids there are mines (represent by a red flag). There are numbers ‘A(i,j)’ on some grids means there’re A(i,j) mines on the 8 grids which shares a corner or a line with gird(i,j). Some grids are blank means there’re no mines on the 8 grids which shares a corner or a line with them.\u003cbr\u003eAt the beginning, all grids are back upward.\u003cbr\u003eIn each turn, Player should choose a back upward grid to click.\u003cbr\u003eIf he clicks a mine, Game over.\u003cbr\u003eIf he clicks a grid with a number on it , the grid turns over.\u003cbr\u003eIf he clicks a blank grid, the grid turns over, then check grids in its 8 directions.If the new grid is a blank gird or a grid with a number,it will be clicked too.\u003cbr\u003eSo If we click the grid with a red point in Pic(1), grids in the area be encompassed with green line will turn over.\u003cbr\u003eNow Xiemao and Fanglaoshi invent a new mode of playing Mine. They have found out coordinates of all grids with mine in a game. \u003cstrong\u003eThey also find that in a game there is no grid will turn over twice when click 2 different connected components.\u003c/strong\u003e(In the Pic(2), grid at (1,1) will turn over twice when player clicks (0,0) and (2,2) , test data will not contain these cases).\u003cbr\u003eThen, starting from Xiemao, they click the grid in turns. They both use the best strategy. Both of them will not click any grids with mine, and the one who have no grid to click is the loser.\u003cbr\u003eNow give you the size of board N, M, number of mines K, and positions of every mine X\u003csub\u003ei\u003c/sub\u003e,Y\u003csub\u003ei\u003c/sub\u003e. Please output who will win.\u003c/div\u003e"}},{"title":"Input","value":{"format":"HTML","content":"Multicase\u003cbr\u003eThe first line of the date is an integer T, which is the number of the text cases. (T\u0026lt;\u003d50)\u003cbr\u003eThen T cases follow, each case starts with 3 integers N, M, K indicates the size of the board and the number of mines.Then goes K lines, the ith line with 2 integer X\u003csub\u003ei\u003c/sub\u003e,Y\u003csub\u003ei\u003c/sub\u003e means the position of the ith mine.\u003cbr\u003e1\u0026lt;\u003dN,M\u0026lt;\u003d1000 0\u0026lt;\u003dK\u0026lt;\u003dN*M 0\u0026lt;\u003dX\u003csub\u003ei\u003c/sub\u003e\u0026lt;N 0\u0026lt;\u003dY\u003csub\u003ei\u003c/sub\u003e\u0026lt;M"}},{"title":"Output","value":{"format":"HTML","content":"For each case, first you should print \"Case #x: \", where x indicates the case number between 1 and T . Then output the winner of the game, either ”Xiemao” or “Fanglaoshi”. (without quotes)"}},{"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\u003e2\r\n3 3 0\r\n3 3 1\r\n1 1\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eCase #1: Xiemao\r\nCase #2: Fanglaoshi\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}