#include<iostream>
#include<iomanip>
#include<algorithm>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<map>
#include<queue>
#include<vector>

using namespace std;

int main() {
	long long int a,b,c,d,e;
	long int s[5];
	cin >> a>>b>>c>>d>>e;
	s[0]=a;
	s[1]=b;
	s[2]=c;
	s[3]=d;
	s[4]=e;
	for(int i=4;i>0;i--)
		cout << s[i] << " ";
	cout << s[0] <<endl;
	
	return 0;
}
