#include<iostream>
using namespace 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<<end;
    return 0;
    
}