{"trustable":true,"sections":[{"title":"","value":{"format":"MD","content":"\u003ch3\u003eRead problem statement in \u003ca target\u003d\"_blank\" \nhref\u003d\"https://www.codechef.com/download/translated/COOK93/mandarin/BINIM.pdf\"\u003eMandarin chinese\u003c/a\u003e and \u003ca target\u003d\"_blank\" \nhref\u003d\"https://www.codechef.com/download/translated/COOK93/vietnamese/BINIM.pdf\"\u003eVietnamese\u003c/a\u003e.\u003c/h3\u003e\n\nTweedle-Dee and Tweedle-Dum are playing a fierce match of binary Nim. This novel game is played with $N$ stacks, each of them containing only $1$-s and $0$-s.\n\nJust like in normal Nim, Tweedle-Dee and Tweedle-Dum alternate turns; in their turn, a player must choose one non-empty stack and remove a positive number of elements from the top of this stack. However, Tweedle-Dee may only choose a stack with $0$ at the top (and remove elements from it afterwards), and similarly, Tweedle-Dum may only choose a stack with $1$ at the top. the player that cannot make a move loses\n\n\nSuzumo does not want to wait for the end of the game, so given the starting player he asks you to determine the winner. Remember that Tweedle-Dee and Tweedle-Dum are legendary grandmasters of combinatorial games, so both always play optimally.\n\n### Input\n\n- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.\n- The first line of each test case contains an integer $N$, a string $S$ denoting the number of stacks, the player that starts the game, respectively.\n- Each of the following $N$ lines contains a single binary string $B$ representing a stack; the first character of $B$ corresponds to the top element of the stack and the last character to the bottom element.\n\n### Output\n\nFor each test case, print a single line containing the string `\"Dee\"` if Tweedle-Dee wins the match or `\"Dum\"` if Tweedle-Dum wins.\n\n### Constraints \n- $1 \\le T \\le 500$\n- $1 \\le N \\le 50$\n- $1 \\le |B| \\le 50$\n- each character in $B$ is either \u00271\u0027 or \u00270\u0027\n- $S$ is either `\"Dee\"` or `\"Dum\"`"}},{"title":"Sample 1","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\n2 Dee\n101\n010\n2 Dum\n101\n010\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eDum\nDee\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}