编程介的小学生 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 Matlab怎么求解含参的二重积分?
  • ¥15 苹果手机突然连不上wifi了?
  • ¥15 cgictest.cgi文件无法访问
  • ¥20 删除和修改功能无法调用
  • ¥15 kafka topic 所有分副本数修改
  • ¥15 小程序中fit格式等运动数据文件怎样实现可视化?(包含心率信息))
  • ¥15 如何利用mmdetection3d中的get_flops.py文件计算fcos3d方法的flops?
  • ¥40 串口调试助手打开串口后,keil5的代码就停止了
  • ¥15 电脑最近经常蓝屏,求大家看看哪的问题
  • ¥60 高价有偿求java辅导。工程量较大,价格你定,联系确定辅导后将采纳你的答案。希望能给出完整详细代码,并能解释回答我关于代码的疑问疑问,代码要求如下,联系我会发文档