N,M,K=map(int,input().split()) A=list(map(int,input().split())) S=1 ALL=(1<<(M+1))-1 for i in range(K): NS=1 for a in A: NS|=S<