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