import sys
input = sys.stdin.readline

N, M = map(int, input().split())

a = set()
for i in range(N):
    a.add(input().rstrip())
    
b = set()
for i in range(M):
    b.add(input().rstrip())
    
result = sorted(list(a & b))

print(len(result))
for i in result:
    print(i)

+ Recent posts