T=int(input()) for t in range(T): N=int(input()) A=[0]*(N-1) for i in range(1,N-1,2): A[i]=1 ans=[0]*N for i in range(10): print("? ",*A, flush=True) B=list(map(int, input().split())) ans[0]=B[0] for i in range(1,N): if B[i-1]!=B[i]: ans[i]=B[i] else: A[i-1]^=1 print("! ",*ans, flush=True)