#include <bits/stdc++.h>
using namespace std;
int n, a[1005];
int main(){
cin >> n;
for (int i = 0; i < n; i++){
cin >> a[i];
cout << a[i] << " ";
} cout << endl;
for (int i = n - 1; i >= 0; i--) cout << a[i] << " ";
cout << endl;
for (int i = 0; i < n; i+=2) cout << a[i] << " ";
cout << endl;
for (int i = 1; i < n; i+=2) cout << a[i] << " ";
cout << endl;
for (int i = 0; i < n - 1; i++) cout << a[i] + a[i + 1] << " ";
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiBpbnQgbiwgYVsxMDA1XTsKaW50IG1haW4oKXsKICAgICAgY2luID4+IG47CiAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKXsKICAgICAgICBjaW4gPj4gYVtpXTsKICAgICAgICBjb3V0IDw8IGFbaV0gPDwgIiAiOwogICAgICB9IGNvdXQgPDwgZW5kbDsKICAgICAgZm9yIChpbnQgaSA9IG4gLSAxOyBpID49IDA7IGktLSkgY291dCA8PCBhW2ldIDw8ICIgIjsKICAgICAgY291dCA8PCBlbmRsOwogICAgICBmb3IgKGludCBpID0gMDsgaSA8IG47IGkrPTIpIGNvdXQgPDwgYVtpXSA8PCAiICI7CiAgICAgIGNvdXQgPDwgZW5kbDsKICAgICAgZm9yIChpbnQgaSA9IDE7IGkgPCBuOyBpKz0yKSBjb3V0IDw8IGFbaV0gPDwgIiAiOwogICAgICBjb3V0IDw8IGVuZGw7CiAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbiAtIDE7IGkrKykgY291dCA8PCBhW2ldICsgYVtpICsgMV0gPDwgIiAiOwogICAgICByZXR1cm4gMDsKfSA=