""" """ from sys import stdin T,R = map(int,stdin.readline().split()) for loop in range(T): NS = list(stdin.readline().split()) N = NS[0] S = NS[1:] print (0)