#백준 1764번 듣보잡
N,M = map(int,input().split())
nolisten = []
nosee = []
for _ in range(N):
a = input()
nolisten.append(a)
for _ in range(M):
a = input()
nosee.append(a)
no = set(nolisten).intersection(set(nosee))
no = sorted(no)
print(len(no))
for i in no:
print(i)
Uploaded by Notion2Tistory v1.1.0