1880: 【CSP二维数组】石头剪刀布▅

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:1 Solved:1

Description

石头剪刀布是常见的猜拳游戏。石头胜剪刀,剪刀胜布,布胜石头。如果两个人出拳一样,则不分胜负。一天,小 lns="http://www.w3.org/1998/Math/MathML">a 和小 lns="http://www.w3.org/1998/Math/MathML">b 正好在玩石头剪刀布,假设 lns="http://www.w3.org/1998/Math/MathML">1 代表石头, lns="http://www.w3.org/1998/Math/MathML">2 代表剪刀, lns="http://www.w3.org/1998/Math/MathML">3 代表布。小 lns="http://www.w3.org/1998/Math/MathML">a 和小 lns="http://www.w3.org/1998/Math/MathML">b 一共玩了 lns="http://www.w3.org/1998/Math/MathML">n 轮,请问最后的比赛结果是小 lns="http://www.w3.org/1998/Math/MathML">a 赢了还是小 lns="http://www.w3.org/1998/Math/MathML">b 赢了,还是平局?

注意:最终输赢按照小 lns="http://www.w3.org/1998/Math/MathML">a 和小 lns="http://www.w3.org/1998/Math/MathML">b 赢的总次数计算。例如:共比赛 lns="http://www.w3.org/1998/Math/MathML">7 局,小 lns="http://www.w3.org/1998/Math/MathML">a 赢了 lns="http://www.w3.org/1998/Math/MathML">4 局,小 lns="http://www.w3.org/1998/Math/MathML">b 赢了 lns="http://www.w3.org/1998/Math/MathML">3 局,那么输出“ a win ”。

Input

第一行,是一个整数 lns="http://www.w3.org/1998/Math/MathML">n ( lns="http://www.w3.org/1998/Math/MathML">n100 )

接下来 lns="http://www.w3.org/1998/Math/MathML">n 行,每行有 lns="http://www.w3.org/1998/Math/MathML">2 个数,分别代表每轮比赛中小 lns="http://www.w3.org/1998/Math/MathML">a 和小 lns="http://www.w3.org/1998/Math/MathML">b 的出拳。

Output

如果小 lns="http://www.w3.org/1998/Math/MathML">a 赢了,输出字符串“ a win ”,如果小 lns="http://www.w3.org/1998/Math/MathML">b 赢了,输出字符串“ b win ”,如果平局则输出字符串“ tie ”。(请注意:输出的字符串全部是小写)

Sample Input Copy

3
1 2
2 3
1 1

Sample Output Copy

a win