fork(1) download
  1. t = int(input())
  2. while t > 0:
  3. t -= 1
  4. numbers = [int(x) for x in input().split()]
  5. numbers.reverse()
  6. del numbers[-1]
  7. print(*numbers, sep=" ")
  8.  
Success #stdin #stdout 0.02s 9268KB
stdin
2
7 1 2 3 4 5 6 7
3 3 2 11
stdout
7 6 5 4 3 2 1
11 2 3