#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int arr[n];
for(int i = 0; i < n; i++){
cin >> arr[i];
}
for(int i = 1; i < n; i+=2){
int q = arr[i];
arr[i] = arr[i-1];
arr[i-1] = q;
}
for(int i = 0; i < n; i++){
cout << arr[i] << " ";
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbjsKCWNpbiA+PiBuOwoJaW50IGFycltuXTsKCWZvcihpbnQgaSA9IDA7IGkgPCBuOyBpKyspewoJCWNpbiA+PiBhcnJbaV07Cgl9Cglmb3IoaW50IGkgPSAxOyBpIDwgbjsgaSs9Mil7CgkJaW50IHEgPSBhcnJbaV07CgkJYXJyW2ldID0gYXJyW2ktMV07CgkJYXJyW2ktMV0gPSBxOwoJfQoJZm9yKGludCBpID0gMDsgaSA8IG47IGkrKyl7CgkJY291dCA8PCBhcnJbaV0gPDwgIiAiOwoJfQoJcmV0dXJuIDA7Cn0=