

Time Limit: 2 sec / Memory Limit: 1024 MB
配点 : 点
問題文
枚のカードからなる山札があります。
それぞれのカードは、「良いカード」か「悪いカード」かのどちらかです。
高橋君と青木君は、この山札を使って対戦ゲームをします。
このゲームでは、 人は交互に山札の一番上のカードを引いて、そのカードを食べます。
先に悪いカードを食べたプレイヤーの負けです。(ここで、山札には少なくとも 枚の悪いカードが含まれていることが保証されます。)
0
と 1
からなる文字列 が与えられます。 について、
- の 文字目が
0
のとき、山札の上から 番目のカードが良いカードであることを表します。 - の 文字目が
1
のとき、山札の上から 番目のカードが悪いカードであることを表します。
高橋君が先手でゲームを始めるとき、高橋君と青木君のどちらが負けるかを答えてください。
制約
- は整数
- は
0
と1
からなる長さ の文字列 - は少なくとも 個の
1
を含む。
入力
入力は以下の形式で標準入力から与えられる。
出力
高橋君が先手でゲームを始めるとき、高橋君と青木君のどちらが負けるかを答えよ。
高橋君が負けるならば Takahashi
、青木君が負けるならば Aoki
と出力せよ。
入力例 1Copy
5 00101
出力例 1Copy
Takahashi
まず、高橋君が良いカードを食べ、次に青木君が良いカードを食べ、その後に高橋君が悪いカードを食べます。
高橋君が先に悪いカードを食べるので高橋君が負けます。よって、Takahashi
と出力します。
入力例 2Copy
3 010
出力例 2Copy
Aoki
Score : points
Problem Statement
We have a deck of 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 consisting of 0
and 1
. For each ,
- if the -th character of is
0
, it means that the -th card from the top of the deck is good; - if the -th character of is
1
, it means that the -th card from the top of the deck is bad.
Which player will lose when Takahashi goes first in the game?
Constraints
- is an integer.
- is a string of length consisting of
0
and1
. - contains at least one occurrence of
1
.
Input
Input is given from Standard Input in the following format:
Output
Print the name of the player who will lose when Takahashi goes first in the game: Takahashi
or Aoki
.
Sample Input 1Copy
5 00101
Sample Output 1Copy
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 2Copy
3 010
Sample Output 2Copy
Aoki