{"raw_statement":[{"iden":"problem statement","content":"We have a string $S$ of length $N$ consisting of `0`, $\\ldots$, `9`, and a string $X$ of length $N$ consisting of `A` and `T`. Additionally, there is a string $T$, which is initialized to an empty string.\nTakahashi and Aoki will play a game using these. The game consists of $N$ rounds. In the $i$\\-th round $(1\\leq i \\leq N)$, the following happens:\n\n*   If $X_i$ is `A`, Aoki does the operation below; if $X_i$ is `T`, Takahashi does it.\n*   Operation: append $S_i$ or `0` at the end of $T$.\n\nAfter $N$ operations, $T$ will be a string of length $N$ consisting of `0`, $\\ldots$, `9`. If $T$ is a multiple of $7$ as a base-ten number (after removing leading zeros), Takahashi wins; otherwise, Aoki wins.\nDetermine the winner of the game when the two players play optimally."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 2\\times 10^5$\n*   $S$ and $X$ have a length of $N$ each.\n*   $S$ consists of `0`, $\\ldots$, `9`.\n*   $X$ consists of `A` and `T`."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$\n$S$\n$X$"},{"iden":"sample input 1","content":"2\n35\nAT"},{"iden":"sample output 1","content":"Takahashi\n\nIn the $1$\\-st round, Aoki appends `3` or `0` at the end of $T$. In the $2$\\-nd round, Takahashi appends `5` or `0` at the end of $T$.\nIf Aoki appends `3`, Takahashi can append `5` to make $T$ `35`, a multiple of $7$.\nIf Aoki appends `0`, Takahashi can append `0` to make $T$ `00`, a multiple of $7$.\nThus, Takahashi can always win."},{"iden":"sample input 2","content":"5\n12345\nAAAAT"},{"iden":"sample output 2","content":"Aoki"},{"iden":"sample input 3","content":"5\n67890\nTTTTA"},{"iden":"sample output 3","content":"Takahashi"},{"iden":"sample input 4","content":"5\n12345\nATATA"},{"iden":"sample output 4","content":"Aoki"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}