while True:
try:
n,l1,n1,l2 = int(input()),input().split(),int(input()),input().split()
a = 0
for i in l2:
if i not in l1:
a += 1
for i in l1:
print(i + ' : ' + str(l2.count(i)))
print('Invalid' + ' : ' + str(a))
except:
break 
京公网安备 11010502036488号