// editor5
#include<stdio.h>
int main(){
    int a;
    int b;
    int c;
    int d;
    int e;
    int f;
    int g;
    int h;
    scanf("%d %d %d %d %d %d %d %d",&a,&b,&c,&d,&e,&f,&g,&h);
    printf("%d %d %d %d %d %d %d %d",h,a,b,c,d,e,f,g,);
    return 0;
}