import sys input = sys.stdin.readline T=int(input()) for tests in range(T): N=int(input()) A=list(map(int,input().split())) ANS=N+1-sum(A) for i in range(N+1): if i!=ANS: print(i) break