import random T = int(input()) for _ in range(T): n = int(input()) f = list(map(int,input().split())) print(random.randrange(n+1))