a,b='*-' S=[input()for x in a*int(input().split()[0])] for i in S: c=i.count(a) if sum(c<1