from collections import* n,*s=open(0).read().split() t=Counter(s) for i in range(0,int(n)*2,2):t[s[i]]>1