import sys input = sys.stdin.readline write = sys.stdout.write flush = sys.stdout.flush def query(A): write("? {}\n".format(" ".join(str(x) for x in A))) flush() B = list(map(int, input().split())) return B def answer(A): write("! {}\n".format(" ".join(str(x) for x in A))) flush() def solve(): N = int(input()) sgn = 0 P = [-1] * N fix = [-1] * N for _ in range(10): A = [sgn] * N for i in range(N): if fix[i] != -1: A[i] = fix[i] B = query(A[1:]) P[0] = B[0] for i in range(1, N): if B[i] != B[i-1]: P[i] = B[i] if fix[i] == -1: fix[i] = sgn sgn = 1 - sgn if all(p != -1 for p in P): break answer(P) T = int(input()) for _ in range(T): solve()