n = int(input()) a = input().split() tot = n//2 for i in range(tot): j = i*2 a[j],a[j+1] = a[j+1],a[j] b =[str(x) for x in a] print(' '.join(b))