编程介的小学生 2017-08-31 11:24 采纳率: 20.5%
浏览 835
已采纳

Die

One day, WashingBone and gali play a game. WashingBone shoot dice for several times, and then, gali had to guess the points number of every face of the die. Every time gali can only see three face, front, right and top, of the die.

Your task is to help gali to guess the points number of six faces of the die.

Input

There are several test cases. In every test case:

A line consist a interger number n > 0, represent the times of WashingBone shoot dice.

In next n lines, every line consist three initerger number 1 <= a, b, c <= 6, represent the front, right and top of the die.

Output

If the there is no dice can be shoot the same as input, output a "T_T", else if there are several dice can be shoot the same as input, output a "=.-", else output the front, back, right, left, bottom and top face of the die.

Because the die can be rolled, so should output the minimum sequence of the six faces, see the sample output.

Sample Input

3
2 6 1
5 6 2
5 6 1
3
2 6 4
4 2 6
1 4 3
2
1 2 3
4 5 6

Sample Output

T_T
1 6 2 3 5 4
=.-

  • 写回答

1条回答 默认 最新

报告相同问题?

悬赏问题

  • ¥15 求差集那个函数有问题,有无佬可以解决
  • ¥15 【提问】基于Invest的水源涵养
  • ¥20 微信网友居然可以通过vx号找到我绑的手机号
  • ¥15 寻一个支付宝扫码远程授权登录的软件助手app
  • ¥15 解riccati方程组
  • ¥15 display:none;样式在嵌套结构中的已设置了display样式的元素上不起作用?
  • ¥15 使用rabbitMQ 消息队列作为url源进行多线程爬取时,总有几个url没有处理的问题。
  • ¥15 Ubuntu在安装序列比对软件STAR时出现报错如何解决
  • ¥50 树莓派安卓APK系统签名
  • ¥65 汇编语言除法溢出问题