fork download
  1. if __name__ == '__main__':
  2. res = []
  3. q = int(input().strip())
  4. for _ in range(q):
  5. x,y,z = (int(n) for n in input().strip().split())
  6. if abs(x-z) == abs(y-z):
  7. res.append('Mouse C')
  8. elif abs(x-z) < abs(y-z):
  9. res.append('Cat A')
  10. else:
  11. res.append('Cat B')
  12. for _ in res:
  13. print(_)
Success #stdin #stdout 0.01s 27712KB
stdin
2
1 2 3
1 3 2
stdout
Cat B
Mouse C