a = list(map(int, ("0 " + eval(input())).split()))

b = 0

a.sort()

for i in range(1, 4):

    if a[i] != a[i-1]:

        b += 1

print(b)

a = {}

for i in list(map(int, input().split())):

    a[i] = 1

print((len(a)))

a = list(map(int, ("0 " + eval(input())).split()))
b = 0
a.sort()
for i in range(1, 4):
    if a[i] != a[i - 1]:
        b += 1
print(b)

a = {}
for i in list(map(int, input().split())):
    a[i] = 1
print((len(a)))

-a = list(map(int, ("0 " + eval(input())).split())) -b = 0 -a.sort() -for i in range(1, 4): -    if a[i] != a[i - 1]: -        b += 1 -print(b) +a = {} +for i in list(map(int, input().split())): +    a[i] = 1 +print((len(a)))