{"trustable":false,"sections":[{"title":"","value":{"format":"MD","content":"Place indistiguishable chess pieces on a given special chessboard. You cannot place two or more pieces in the same row or column and you are only allowed to place them in *chessboard cells*."}},{"title":"Input","value":{"format":"MD","content":"The input contains multiple sets of test data.\n\nThe first line of each set of data is two positive integers $n$ and $k$ $(1 \\leq k \\leq n \\leq 8)$, indicating that the chessboard will be described in a $n \\times n$ matrix and the number of chess pieces placed is $k$. The input ends when $n \u003d k \u003d -1$.\n\nThe following $n$ lines describe the chessboard: each line has $n$ characters, where `#` represents a *chessboard cell* and `.` represents the blank area (the data is guaranteed not to have redundant blank rows or columns)."}},{"title":"Output","value":{"format":"MD","content":"For each test data, print a single line - The number of ways to arrange the chess pieces."}},{"title":"Sample","value":{"format":"MD","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 1\n#.\n.#\n4 4\n...#\n..#.\n.#..\n#...\n-1 -1\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\n1\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}