[print(i,end=' ')for i in{m:i+1for i,m in zip(range(int(input())),list(map(int,input().split())))}.values()]

print((*[i for i inlist({m:i+1for i,m in zip(list(range(int(eval(input())))),list(map(int,input().split())))}.values())]))
[
    print(i, end=" ")
    for i in {
        m: i + 1 for i, m in zip(range(int(input())), list(map(int, input().split())))
    }.values()
]

print((*[i for i inlist({m:i+1for i,m in zip(list(range(int(eval(input())))),list(map(int,input().split())))}.values())]))
-[ -    print(i, end=" ") -    for i in { -        m: i + 1 for i, m in zip(range(int(input())), list(map(int, input().split()))) -    }.values() -] +print((*[i for i inlist({m:i+1for i,m in zip(list(range(int(eval(input())))),list(map(int,input().split())))}.values())]))