#include<iostream>
using namesspace std;
int main(){
    int a, b, c, d, e, f, g, h, temp;
     temp = a;
    a = h;
    h = g;
    g = f;
    f = e;
    e = d;
    d = c;
    c = b;
    b = temp;
    cout << a << " " << b << " " << c << " " << d << " " << e << " " << f << " " << g << " " << h <<endl;
    return 0;
}