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