for _ in range(int(input())): N = int(input()) L, R = 0, 0 flag = False for i in reversed(range(60)): if 1<= L2*R2: print(L, R) else: print(L2, R2)