#include<iostream>
#include<cmath>
using namespace std;

int main()
{
	int s[100],n,i,j,k,a,b;
	cin>>n;
	for(i=0;i<=n-1;i++){
		cin>>a;
		s[i]=a;
		
	}
	b=s[0];
	
	for(j=0;j<=n-2;j++){
		s[j]=s[j+1];
	}
	s[n-1]=b;
	for(k=0;k<=n-1;k++){
		cout<<s[k]<<" ";
	}
	
	return 0;
}
