#abc210b. B - Bouzu Mekuri

B - Bouzu Mekuri

Score : 200200 points

问题描述

我们有一副包含 NN 张卡片的牌堆。
这些卡片中每张要么是 的,要么是 的。

使用这副牌,Takahashi 和 Aoki 将相互对战。
在游戏中,玩家轮流抽取并吃掉最上面的一张卡片。
最先吃到坏卡片的玩家输掉游戏。(这里保证牌堆中至少含有一张坏卡片。)

你得到一个由 01 组成的字符串 SS。对于每个 i=1,2,,Ni = 1, 2, \ldots, N

  • 如果字符串 SS 中的第 ii 个字符是 0,则表示牌堆中从顶部数第 ii 张卡片是好的;
  • 如果字符串 SS 中的第 ii 个字符是 1,则表示牌堆中从顶部数第 ii 张卡片是坏的。

当 Takahashi 先手时,哪位玩家将会 掉比赛?

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

We have a deck of NN cards.
Each of these cards is good or bad.

Using this deck, Takahashi and Aoki will play a game against each other.
In the game, the players alternately draw the topmost card and eat it.
The player who first gets to eat a bad card loses the game. (Here, it is guaranteed that the deck contains at least one bad card.)

You are given a string SS consisting of 0 and 1. For each i=1,2,,Ni = 1, 2, \ldots, N,

  • if the ii-th character of SS is 0, it means that the ii-th card from the top of the deck is good;
  • if the ii-th character of SS is 1, it means that the ii-th card from the top of the deck is bad.

Which player will lose when Takahashi goes first in the game?

Constraints

  • 1N1051 \leq N \leq 10^5
  • NN is an integer.
  • SS is a string of length NN consisting of 0 and 1.
  • SS contains at least one occurrence of 1.

Input

Input is given from Standard Input in the following format:

NN

SS

Output

Print the name of the player who will lose when Takahashi goes first in the game: Takahashi or Aoki.

Sample Input 1

5
00101

Sample Output 1

Takahashi

First, Takahashi will eat a good card. Next, Aoki will eat a good card. Then, Takahashi will eat a bad card.
Thus, Takahashi will be the first to eat a bad card, so we should print Takahashi.

Sample Input 2

3
010

Sample Output 2

Aoki

update @ 2024/3/10 09:24:12