N = int(eval(input()))

inputVal = [int(eval(input())) for i in range(N)]

inputVal.sort()

default = 0

count = 0



for i in inputVal:

    if i != default:

        count += 1

        default = i



print(count)
N = int(eval(input()))

inputVal = [int(eval(input())) for i in range(N)]

print((len(set(inputVal))))
N = int(eval(input()))
inputVal = [int(eval(input())) for i in range(N)]
inputVal.sort()
default = 0
count = 0
for i in inputVal:
    if i != default:
        count += 1
        default = i
print(count)

N = int(eval(input()))
inputVal = [int(eval(input())) for i in range(N)]
print((len(set(inputVal))))

-inputVal.sort() -default = 0 -count = 0 -for i in inputVal: -    if i != default: -        count += 1 -        default = i -print(count) +print((len(set(inputVal))))