S=input().split(' ') for i in range(10): if(int(S[i])!=i): print(i+1)