num=int(input())
p=list(map(int,input().split()[:num]))
p.sort()
for v in p:
  print(v,end=" ")

579ddf9872c649f1e8ef45eb0887a37ad41a8dc8
<mask token>

<mask token>
p.sort()
for v in p:
    print(v, end=' ')

num = int(input())
p = list(map(int, input().split()[:num]))
p.sort()
for v in p:
    print(v, end=' ')

num=int(input())
p=list(map(int,input().split()[:num]))
p.sort()
for v in p:
  print(v,end=" ")
