#include<stdio.h>
int main(){



    int a,b,c,d,e,f,g,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;
  
}