编程介的小学生 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 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大
  • ¥15 import arcpy出现importing _arcgisscripting 找不到相关程序