{"raw_statement":[{"iden":"problem statement","content":"The Takahashi Dictionary lists $N$ words; the $i$\\-th word $(1 \\leq i \\leq N)$ is $s_i$.\nUsing this dictionary, Takahashi and Aoki will play _$3$\\-shiritori_, which goes as follows.\n\n*   Takahashi and Aoki alternately say words, with Takahashi going first.\n*   Each player must say a word beginning with the last three characters of the previous word. For example, if a player says `Takahashi`, the next player can say `ship` or `shield` along with other choices, but not `Aoki`, `sing`, or `his`.\n*   Uppercase and lowercase are distinguished. For example, a player cannot say `ShIp` following `Takahashi`.\n*   A player who becomes unable to say a word loses.\n*   A player cannot say a word not listed in the dictionary.\n*   The same word can be used multiple times.\n\nFor each $i$ $(1 \\leq i \\leq N)$, determine who will win when Takahashi starts the game by saying the word $s_i$. Here, we assume that both players play optimally. More specifically, each player gives first priority to avoiding his loss and second priority to defeating the opponent."},{"iden":"constraints","content":"*   $N$ is an integer between $1$ and $2 \\times 10^5$ (inclusive).\n*   $s_i$ is a string of length between $3$ and $8$ (inclusive) consisting of lowercase and uppercase English letters."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$s_1$\n$s_2$\n$\\vdots$\n$s_N$"},{"iden":"sample input 1","content":"3\nabcd\nbcda\nada"},{"iden":"sample output 1","content":"Aoki\nTakahashi\nDraw\n\nWhen Takahashi starts the game by saying `abcd`, Aoki will say `bcda` next, and Takahashi will then have no word to say, resulting in Aoki's win. Thus, we should print `Aoki`.\nWhen Takahashi starts the game by saying `bcda`, Aoki will have no word to say, resulting in Takahashi win. Thus, we should print `Takahashi`.\nWhen Takahashi starts the game by saying `ada`, both players will repeat `ada` and never end the game. Thus, we should print `Draw`. Note that they can use the same word any number of times."},{"iden":"sample input 2","content":"1\nABC"},{"iden":"sample output 2","content":"Draw"},{"iden":"sample input 3","content":"5\neaaaabaa\neaaaacaa\ndaaaaaaa\neaaaadaa\ndaaaafaa"},{"iden":"sample output 3","content":"Takahashi\nTakahashi\nTakahashi\nAoki\nTakahashi"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}