semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int n,a[101],b[101],i;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&a[i]);
		b[i]=a[i];
	}
	for(i=1;i<=n;i++)
	{
		a[i]=b[n-i+1];
if(i!=n)
		printf("%d ",a[i]);
else printf("%d",a[i]);
	}
	return 0;
}
/*
 * shuzunixu(p).cpp
 *
 *  Created on: 2012-12-12
 *      Author: 1200012791??
 *      ???????????????????
 */
int main() {
	int a[101];//??1?????
	int n = 0, i = 0, temp = 0;//??3??????n?????????
	int *p = a;//??1????????a
	cin >> n;//??n
	for (i = 0; i < n; i++)//????
		cin >> *(p + i);//?????????
	for (i = 0; i < n / 2; i++) {//????????????
		temp = *(p + i);//??????
		*(p + i) = *(p + n - i - 1);
		*(p + n - i - 1) = temp;
	}
	cout << *p;//?????????
	for (i = 1; i < n; i++)//????
		cout << ' ' << *(p + i);//??????????????
	return 0;
}
int main()
{
     int a[100],b[100],i,n,k,t;
     cin>>n;
     for(i=0;i<=n-1;i++)cin>>a[i];
     cin>>k;
     cout<<a[n-1];
     for(i=1;i<=n-1;i++){b[i]=a[n-i-1];cout<<" "<<b[i];}
     return 0;
}
int main ()
{
    int n ;
    cin >> n ;
    int yeah[100] = {0} ;              //?????? 
    for ( int i = 1 ; i <= n ; i++ )
        cin >> yeah[i-1] ;             //??????
    for ( int i = n ; i >= 2 ; i-- )
        cout << yeah[i-1] << " " ;     //??????
    cout << yeah[0] ;                  //???????????
    return 0 ; 
}
// ( > w < ) finished~
int main()
{
    int sz[100];
    int n,i,e;
    scanf("%d",&n);
    for(i=0;i<n;i=i+1){
                       scanf("%d ",&sz[i]);
                       }
    for(i=0;i<n/2;i=i+1){
                       e=sz[i];
                       sz[i]=sz[n-1-i];
                       sz[n-1-i]=e;
                       }
    for(i=0;i<n;i=i+1){
                       if(i<n-1) printf("%d ",sz[i]);
                       else printf("%d",sz[i]);
                       }
    
    return 0;
}
int main()
{
	int n;
	cin>>n;
	int c[100];
	for(int i=1;i<=n;i++)
		{
			int a;
			cin>>a;
			c[n-i]=a;
	}
	for(int t=1;t<=(n-1);t++)
	cout<<c[t-1]<<' ';
	cout<<c[n-1];
	
	return 0;
}
int main(){
  int x[100],y[100];
  int i,n,j;
  scanf("%d",&n);
  for(i=0,j=n-1;i<n;i++,j--)
   {scanf("%d",&x[i]);
    y[j]=x[i];}
  for(j=0;j<n-1;j++)
   {printf("%d ",y[j]);}
   printf("%d",y[n-1]);
   return 0;
}
int main(){
 int n,i,b;
 scanf("%d",&n);
 int a[n];
for(i=0;i<n;i++){scanf("%d",&a[i]);}

for(i=n-1;i>=0;i--){printf("%d",a[i]);
if(i!=0){printf(" ");}
}
 return 0;
}
void main()
{
	int *p,*hd;int i,n;scanf("%d",&n);
	hd=p=(int *)malloc(n*sizeof(int));
	for(i=0;i<n;i++,p++)
	{scanf("%d",p);}
	for(p=hd+n-1,i=0;i<n;i++,p--)
	{if(i==0) printf("%d",*p);
	else printf(" %d",*p);}

}
int main()
{
 int a[100],b[100],n,i,j,f=0;
 scanf("%d",&n);
 for(i=0;i<n;i++)
 {
     scanf("%d",&a[i]);
     b[n-i-1]=a[i];
 }
 for(i=0;i<n;i++)
 {
     if(f==0)
     {
         printf("%d",b[i]);
         f=1;
     }
     else
     {
         printf(" %d",b[i]);
     }
 }
 printf("\n");
 return 0;
}
int main()
{
	int n;
	cin>>n;
	int tem;
	int *p=NULL;
	int a[n];
	p=a;
	for(int i=0;i<n;i++)
	{
		cin>>p[i];
	}
	for(int i=0,j=n-1;i<j;i++,j--)
	{
		tem=*(p+i);
		*(p+i)=*(p+j);
		*(p+j)=tem;
	}
	for(int i=0;i<n;i++)
	{
		cout<<*(p+i);
		if(i!=n-1) cout<<' ';
	}
}
int main()
{
    int n; 
    int a[100]={0};
    cin>>n;
    for (int i=0;i<n;i++)
    {
        int x;
        cin>>x;
        a[i]=x;
   }  
   for (int i=n-1;i>0;i--)
   cout<<a[i]<<" ";
   cout<<a[0];
   return 0;
}
int main(){
int n,i,a,b,e,sz[100];
scanf("%d\n",&n);
for(i=0;i<n;i++){scanf("%d",&sz[i]);}
if(n%2==1){
a=(n-1)/2;
for(i=0;i<a;i++){
e=sz[n-1-i];
sz[n-1-i]=sz[i];
sz[i]=e;
}}
else{
b=n/2;
for(i=0;i<b;i++){
e=sz[n-1-i];
sz[n-1-i]=sz[i];
sz[i]=e;
}}
for(i=0;i<n-1;i++){printf("%d ",sz[i]);}
printf("%d",sz[n-1]);
return 0;
}
int main()
{
	int n;
	int a[100];
	int j,i;
	scanf("%d",&n);
	for(j=0;j<n;j++)
	{
		scanf("%d",&(a[j]));
	}
    for(j=n-1,i=0;j>-1;j--)
	{
		if(i<n-1)
		{
			printf("%d ",a[j]);
			i++;
		}
		if(i==n-1)
		{
			printf("%d",a[0]);
			i++;
		}
	}
    return 0;
}
/*??
?????????????????????????8,6,5,4,1?????1,4,5,6,8?
????
?????????????????n?1 < n < 100)?????n?????????????????
????
??????????????????????????????
????
5

8 6 5 4 1
????
1 4 5 6 8
*/
int main()
{
    int n=0;
    cin>>n;
    int *point=NULL;
    int a[100];
    point=a;
    for(int i=0;i<n;i++)
    {
        cin>>point[i];
    }
    for(point=a+n-1;point>=a;point--)
    {
        if(point==a)
        {
            cout<<*point;
        }
        else
        {
            cout<<*point<<" ";
        }
    }
    return 0;
    
}
int main()
{
    int n,i=0,j=0,k=0,sum=0;
    scanf("%d",&n);
    int an[100],bn[100];
    for(k=0;k<n;k++){
       scanf("%d",&an[k]);
       bn[n-1-k]=an[k];
       }
    for(i=0;i<n-1;i++){
       printf("%d ",bn[i]);
       }
    printf("%d",bn[n-1]);
           return 0;
}
int main(){
  int n,i,sz[100];
  
 scanf("%d",&n);
 
 for(int i=0;i<n;i++){
	scanf("%d",&sz[i]);
	}  

for(int i=n-1;i>0;i--){
	printf("%d ",sz[i]);
	} 
	printf("%d",sz[0]);	

return 0;
}
int main()
{
	int sz[100],i,n,t;
	scanf("%d",&n);

	for(i=0;i<n;i++)
	{
		scanf("%d",&sz[i]);
	}

	if(n%2==0)
	{
		for(i=0;i<(n/2);i++)
		{
			t=sz[i];
			sz[i]=sz[n-1-i];
			sz[n-1-i]=t;
		}

	}
	else if(n%2!=0)
	{
		for(i=0;i<((n-1)/2);i++)
		{
			t=sz[i];
			sz[i]=sz[n-1-i];
			sz[n-1-i]=t;
		}
	}

	for(i=0;i<n;i++)
	{
		if(i==0)
		{
			printf("%d",sz[i]);
		}
		else
		{
			printf(" %d",sz[i]);
		}
	}

	return 0;
}
int main() {
	int i,n;
	cin>>n;
	int a[n],b[n];						//?????????a,b
	for(i=0;i<n;i++)
		cin>>a[i];						//????
	for(i=0;i<n;i++){
		b[i]=a[n-1-i];					//????
		if(i<n-1)
		cout<<b[i]<<" ";
		else cout<<b[i];				//????????
	}
	return 0;
}
void daoxu(int n);
int main()
{
	int n;
	cin>>n;
	int b;
	cin>>b;
	daoxu(n-1);
	cout<<b;   //???????
	
	return 0;
}
void daoxu(int n)  //??
{
	int a;
	cin>>a;
	if(n==1)cout<<a<<' ';
	else {daoxu(n-1);
	cout<<a<<' ';}
}
int main()
{
	int a[100]={0},i=0,n=0;
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>a[i];
	}
	for(i=n-1;i>0;i--)
	{
		cout<<a[i]<<' ';
	}
	cout<<a[0]<<endl;
	return 0;
}
int i=0;int n;
int f()
{
	int a;
	cin>> a;i++;    //???????????????
	if(i==n) {cout<< a;return 0;}  //?????????????????
	if(i!=n) {f();}   //?????????????????
	cout<<" "<< a;  //???????????????
}
int main()
{
	cin>> n;
	f();
	return 0;
}
int main()                      //???
{
	int n,i=0,a[100];           //????n,i???a[100]
	cin>>n;                     //??n
	while(i<n)                  //???????i<n?????????
	{
		cin>>a[i];              //??????a[i]
		i++;}                   //?????i??1
	for(;i>1;i--)               //????????????????i>1????????i??1
	{
		cout<<a[i-1]<<" ";        //?????????????
	}
	cout<<a[0]<<endl;            //????????????
	return 0;                   //??????
}
int main()
{
    int n,a[100],b[100],i;
    cin>>n;
    for (i=0;i<n;i++) cin>>a[i];   //?? 
    for (i=0;i<n;i++) b[i]=a[n-i-1];   //?? 
    for (i=0;i<n-1;i++) cout<<b[i]<<' ';
    cout<<b[n-1];   //?? 
    return 0;
}
int main()
{
	int n;
	scanf("%d",&n);
	int sz[98];
	int i=0;
	while(i<n){
		scanf("%d",&(sz[i]));
		i ++;
	}
	
		int a;
		int j=0;
		while(j<=(n/2)-1){
			a = sz[n-j-1];
			sz[n-j-1] = sz[j];
			sz[j] = a;
			j ++;
		}
	
	
	int l=0;
	while(l<n-1){
		printf("%d ",sz[l]);
		l ++;
	}
	printf("%d",sz[n-1]);
	return 0;
	
}
int a[100001];
void swap(int n,int m)
{
	int t=a[n];
	a[n]=a[m];
	a[m]=t;
}
int main()
{
	int m,n,i,j;
	cin>>n;
	for(i=1;i<=n;i++)
	cin>>a[i];
	for(i=1,j=n;i<=j;i++,j--)
	swap(i,j);
	for(i=1;i<n;i++)
	cout<<a[i]<<' ';
	cout<<a[n];
	return 0;
}
int main()
{
	int n,i,j,t;
    int b[100];
	scanf("%d",&n);
	for (i=0;i<n;i++)
	{
		scanf("%d",&b[i]);
	}
	if(n%2==0)
	{
        for (j=n-1,i=0;i<(n/2);i++,j--)
		{
                      t=b[i];
		  b[i]=b[j];
		  b[j]=t;
		}
	}
    if(n%2!=0)
	{
        for (j=n-1,i=0;i<((n-1)/2);i++,j--)
		{
                      t=b[i];
		  b[i]=b[j];
		  b[j]=t;
		}
	}
	for (i=0;i<(n-1);i++)
	{
		printf("%d ",b[i]);
	}	
         printf("%d",b[n-1]);
	return 0;
}
int main()
{
    int n;
	scanf("%d\n",&n);
	int sz[n];
	int i,x,y;
    for(i=0;i<n;i++)
	{
		scanf("%d",&sz[i]);
	}
    x=n-1;
	y=x/2;
	for(i=0;i<=y;i++)
	{   
		int e;
		
		e=sz[i];
		sz[i]=sz[n-i-1];
		sz[n-i-1]=e;
		
	}
	for(i=0;i<n;i++)
	{   if(i!=n-1)
	{printf("%d ",sz[i]);}
	else
	{
		printf("%d",sz[i]);
	}
	}
	return 0;
}
/*
 * duanwenpaixu.cpp
 *
 *  Created on: 2013-12-5
 *      Author: ???
 */
int main()
{
	int a[100];
	int n;
	int *p=NULL;
	cin>>n;
	for(p=a;p<=&a[n-1];p++)
		cin>>*p;
	for(;p>a+1;)
		cout<<*--p<<' ';
	cout<<*--p;
	return 0;


}
int main(){
    int sz[100];
	int i,b,n;
	i=0;
    scanf("%d",&n);
	b=n-1;
	for(i=0;i<n;i++){
           scanf("%d",&sz[i]);
	}
	for(b=n-1;b>0;b--){
		printf("%d ",sz[b]);
	}
	    b=0;
		printf("%d",sz[b]);

	
	return 0;
}
int main(){
	int a[10000],n,b,i;
	i=1;
	scanf("%d",&n);
	while(i<n){
		scanf("%d ",&a[i]);
		i++;
	}
	scanf("%d",&a[n]);
	i=1;
	while(i<=n/2){
		b=a[n-i+1];
		a[n-i+1]=a[i];
		a[i]=b;
		i++;
	}
	i=1;
	while(i<n){
		printf("%d ",a[i]);
		i++;
	}
	printf("%d",a[n]);
	return 0;
}
int main()
{
	int sz[100];
	int n;
	scanf("%d",&n);
    for(int m=0;m<n;m++)
	{
		scanf("%d",&sz[m]);
	}
	if(n%2==0)
	{
		for(int i=0;i<n/2;i++)
		{
			int e;
			e=sz[i];
			sz[i]=sz[n-i-1];
			sz[n-i-1]=e;
		}
	}
	else
	{
		for(int k=0;k<=(n-1)/2;k++)
		{
			int f;
			f=sz[n-1-k];
			sz[n-1-k]=sz[k];
			sz[k]=f;

		}
	}
	for(int a=0;a<n-1;a++)
	{
		printf("%d ",sz[a]);
	
	}
		printf("%d",sz[n-1]);
	return 0;
}
int main(){
int n;
scanf("%d",&n);
int a[100];
int i;
for(i=0;i<n;i++){
scanf("%d",&a[i]);
}
int x;
x=n/2;
int y;
for(i=0;i<n-x;i++){
y=a[i];
a[i]=a[n-i-1];
a[n-i-1]=y;
}
for(i=0;i<n-1;i++){
printf("%d ",a[i]);
}
printf("%d",a[n-1]);
return 0;
}
//============================================================================
// Name        : 8.cpp
// Author      : 
// Version     :
// Copyright   : Your copyright notice
// Description : 
//============================================================================


int main() {
	int n=0,i=0,j=0,t=0;
	cin>>n;
	int a[100000];
	for (i=0;i<n;i++){
		cin>>a[i];
	}
	for (i=0,j=n-1;i<j;i++,j--){
		t=a[i];
		a[i]=a[j];
		a[j]=t;
	}
	for (i=0;i<n-1;i++){
		cout<<a[i]<<" ";
	}
	cout<<a[n-1];
	return 0;
}
int main()                                            //?????
{
	int n;                                            //????n
	cin>>n;                                           //????n
	int a[100];                                       //????a
	for(int i = 0 ; i < n ; i++)                      //????a
	{
		cin>>a[i];                                    
	}
	for(int j = n-1 ; j >= 0 ; j--)                   //??????a
	{
		if(j!=0)
		cout<<a[j]<<" ";
		if(j==0)
		cout<<a[j]<<endl;
	}
	return 0;                                         //???????????????????
}
int main(int argc, char* argv[])
{
	int n;
	scanf("%d",&n);
	int org[100],opp[100];
	int i;
	for(i=0;i<n;i++)
	{
		scanf("%d",&org[i]);
	}
	for(i=0;i<n;i++)
	{
		opp[i]=0;
	}
	for(i=0;i<n;i++)
	{
		opp[n-1-i]=org[i];
	}
	int k;
	for(k=0;k<n-1;k++)
	{
		printf("%d ",opp[k]);
	}
	printf("%d",opp[n-1]);
	return 0;
}
int main() {
	int n,temp,i;
	cin>>n;
	int a[n];
	for(i=0;i<n;i++)
		cin>>a[i];
	int *p=NULL;
	     p=a;
	     for(i=0;i<n/2;i++)
	     {
	    	 temp=*(p+i);
	    	 *(p+i)=*(p+n-1-i);
	    	 *(p+n-1-i)=temp;
	     }
	for(i=0;i<n-1;i++)
		cout<<*(p+i)<<" ";
	cout<<*(p+n-1);
	return 0;
}
void function(int len,int rem);
int main()
{
	int len,rem;
	cin>>len;
	rem=len;
	function(len,rem);
	
	return 0;
}

void function(int len,int rem)
{ int num;
  if(len>0){
  cin>>num;
  function(len-1,rem);
     if(len==rem)cout<<num;
	 else cout<<num<<" ";
  }
}
void main()
{
	int n,a[100],i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	scanf("%d",&a[n-i-1]);
	for(i=0;i<n-1;i++)
	printf("%d ",a[i]);
	printf("%d",a[i]);
}
int main()
	{
	int n,a[100]={0},i,j,m;
	cin>>n;
	for(i=1;i<=n;i++)
		{
		cin>>a[i];
		}
	for(j=1;j<=(n/2);j++)
		{
			m=a[j];
			a[j]=a[n-j+1];
			a[n-j+1]=m;
			
		}
	for(i=1;i<n;i++)
		{
		cout<<a[i]<<" ";
		}
	cout<<a[n];
	return 0;
	}
int main()
{
	int a[100];
	int n,i;
	cin>>n;
	for(i=1;i<=n;i++){
		cin>>a[i];
	}
	for(i=1;i<=n;i++){
		
		if(i==n){
			cout<<a[1];
		}
		else{
			cout<<a[n-i+1]<<' ';
		}
	}
	return 0;
}
int main()
{
	int n=0;
	cin>>n;
	int i=n,a[100]={0};
	int *p=NULL,b;
	p=a;
	while(i>0)
	{
		cin>>*p;
		p++;
		i--;
	}
	p=a;
	for(i=0;i<n/2;i++)//?
	{
		b=*(p+i);
		*(p+i)=*(p+n-i-1);
		*(p+n-i-1)=b;
	}
	i=n-1;
	cout<<*p;
	p++;
	while(i>0)
	{
		cout<<" "<<*p;
		p++;
		i--;
	}

	return 0;
}
int main(int argc, char* argv[])
{
	int n,i,a[N];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&a[i]);
	i--;
	printf("%d",a[i]);
	i--;
	for(;i>=0;i--)
 	    printf(" %d",a[i]);
	return 0;
}
int main (){
     int i,n[100],k;
     scanf("%d",&k);
     for(i=0;i<=k-1;i++)
     scanf("%d",&n[i]);
     for(i=0;i<=(k-1)/2;i++){
         int e;
        e=n[k-i-1];
       n[k-i-1]=n[i];
         n[i]=e;    
     }
     for(int i=0;i<=k-2;i++){
         printf("%d ",n[i]);
     }
      printf("%d",n[k-1]);
return 0;
}
int main(void)
{
	int n,a[100];
	int *a_pointer=NULL;
	cin>>n;
	a_pointer=a;
	for(int i=0;i<n;i++) cin>>*a_pointer++;
	*a_pointer--;
	for(int i=0;i<n-1;i++) cout<<*a_pointer--<<' ';
	cout<<*a_pointer;
	return 0;
}
int main ()
{
	int a[100] = {0};
	int num;
	int cur;
	int *temp = &cur;
	cin >> num;
	for ( int i = 0; i < num; i ++ )
		cin >> *(a+i);
	for ( int i = 0; i < num/2; i ++ )
	{
		*temp = *(a+i);
		*(a+i) = *(a+num-i-1);
		*(a+num-i-1) = *temp;
	}
	cout << *a;
	for ( int i = 1; i < num; i ++ )
		cout << " " << *(a+i);
	return 0;
}
struct N{
int a;
struct N* next;
};
int main(){
	int *p,*q,n,a[100],x;
 scanf("%d",&n);
 for(p=a;p<a+n;p++){
                    scanf("%d",p);}
                    for(p=a,q=a+n-1;p<a+n/2;p++,q--){
                                         x=*p;
                                         *p=*q;
                                         *q=x;
                                         }
 for(p=a;p<a+n;p++){
                    if(p==a){printf("%d",*p);}
                    
                    else{printf(" %d",*p);}
                    }
 scanf("%d",&n);
 return 0;
}
int main(){
    
    int m,n,i;
    scanf("%d",&n);
    int sz[100];
	if((n>1)&&(n<100)){
	  for(i=0;i<n;i++){
		  scanf("%d",&(sz[i]));
	  }
	  for(m=n-1;m>=0;m--){
          if(m>0){
              printf("%d ",sz[m]);
              }
		  else
              printf("%d",sz[m]);
	  }
	}
	return 0;
}
int main(){
	int a[102]={0},n;
	cin>>n;
	for(int i=0;i<n;i++){
		cin>>*(a+i);
		}//?? 
	for(int i=n-1;i>=0;i--){
		if(i==n-1)cout<<*(a+i);
		else cout<<" "<<*(a+i);
		}//?? 
		
		return 0; 
	}
void main() 
    {
      int i,j,h,n;
      int a[100],b[100];
      scanf("%d\n",&n);
      for(i=0;i<n;i++)
       scanf("%d",&a[i]);
      for(j=0;j<n;j++)
       b[j]=a[n-1-j];
      for(h=0;h<n-1;h++)
       printf("%d ",b[h]);
      printf("%d",b[n-1]);
     }
int main()
{int n=0;
    scanf("%d",&n);
    int i=0,as[100];
    while(i<n)
	{scanf("%d",&as[i]);
	i++;
	}
int zx[100];
i=0;
while(i<n)
{
	zx[i]=as[i];
	i++;
}
i=n-1;
while(i>0)
{
	printf("%d ",zx[i]);
		i--;
}
printf("%d",zx[0]);
}
int main(){
    int N;
    cin>>N;
    int * ar;
    if(NULL==(ar=(int *) malloc(N*sizeof(int)))){
        perror("error...");
        exit(1);
    }
    for(int i=0;i<N;i++) cin>>*(ar+i);
    for(int i=0;i<N;i++) {
        cout<<*(ar+N-i-1);
        if(i!=N-1) cout<<' ';
    }
    free(ar);
    ar=NULL;
    return 0;
}
void main()
{
	int k,i,j,n,m,t,a[100];
	scanf("%d\n",&n);
	for(k=0;k<n;k++)
	{		scanf("%d",&m);
		a[k]=m;
	}
	for(i=0;i<(n+1)/2;i++)
	{
		t=a[i];
		a[i]=a[n-i-1];
		a[n-i-1]=t;
	}
	for(j=0;j<n-1;j++)
		printf("%d ",a[j]);
	printf("%d",a[n-1]);
}
int main(){
    int N,i,e;
    int sz[100];
    scanf("%d",&N);
    for(i=0;i<N;i++){
                     scanf("%d",&(sz[i]));
                     }
    if(N%2==0){
               for(i=0;i<N/2;i++){
                                   e=sz[N-1-i];
                                   sz[N-1-i]=sz[i];
                                   sz[i]=e;
                                   }
    }else{
          for(i=0;i<(N-1)/2;i++){
                                 e=sz[N-1-i];
                                   sz[N-1-i]=sz[i];
                                   sz[i]=e;
                                   }
                                   }
    for(i=0;i<N-1;i++){
                     printf("%d ",sz[i]);
                     }
                     printf("%d",sz[N-1]);
    return 0;
}
/*
 * zhizheng.cpp
 *?? - ????
 *  Created on: 2012-12-11
 *      Author: ???
 */
int n,N,temp,i;
int *p=NULL,*q=NULL;
int main(){
	cin>>n;
	const int N=n;
	int a[N];
	for(i=0;i<n;i++)
	cin>>a[i];
	for(p=a,q=a+n-1;p<q;p++,q--)
	{
		temp=*p;
		*p=*q;
		*q=temp;
	}
	for(p=a;p<a+n-1;p++)
		cout<<*p<<' ';
	cout<<*p<<endl;
	return 0;
}
int main()
{
	int a,b[100],i;
	scanf("%d",&a);
	for(i=a;i>0;i--)
	{
		scanf("%d",&(b[i-1]));
	}
	for(i=0;i<a;i++)
	{
		switch(a-1-i)
		{
		case 0:
			printf("%d",b[i]);
			break;
		default:
			printf("%d ",b[i]);
			break;
		}
	}
	return 0;
}
int main() {
	int n, a[10000], temp;
	int *p = NULL;
	cin >> n;
	for(int i = 0; i < n; i ++)
		cin >> a[i];
	p = a;
	for(int j = 0; j < n/2; j ++){
		temp = *(p+j);
		*(p+j) = *(p+n-1-j);
		*(p+n-1-j) = temp;
	}
	cout << *p;
	p++;
	for(int i = 1; i < n; i ++ ,p ++)
		cout << ' ' << *p;
	return 0;
}
int main(){
    int n,i=0;
	scanf("%d",&n);
	int a[100],s=n-1;
	for(i=0;i<n-1;i++){
		scanf("%d \n",&a[i]);
	}
	scanf("%d",&a[n-1]);
	for(s=n-1;s>0;s--){
		printf("%d ",a[s]);
	}
	printf("%d",a[0]);
	return 0;
}
/*
 *????.cpp
 *
 *  Created on: 2012-10-15
 *      Author: ???
 */

int main() {
	int n = 0, b = 0, i = 0;  //??????????????
	cin >> n;
	int a[n];
	for (i = 0; i < n; i++) {  //??
		cin >> a[i];
	}
	for (i = 0; i < n / 2; i++) {  //??????
		b = a[i];
		a[i] = a[n - 1 - i];
		a[n - 1 - i] = b;
	}
	cout << a[0];
	for (i = 1; i < n; i++) {   //??
		cout << " " << a[i];
	}
	return 0;
}
int main()
{
	int a[100]={0};//??????
	int n,i,t;
	cin>>n;
	for(i=n-1;i>=0;i--)//???????????
	{
		cin>>t;
		a[i]=t;
	}
    for(i=0;i<n-1;i++)//????
	{
		cout<<a[i]<<' ';
	}
	    cout<<a[n-1];
        return 0;
}
int main(){
	int n;
	scanf("%d",&n);
	int sz[100];
	for(int a=0;a<=n-1;a++){
		scanf("%d",&(sz[a]));
	}
	for(int b=n-1;b>=1;b=b-1){
		printf("%d ",sz[b]);
	}
	printf("%d",sz[0]);
	return 0;
}
int main()
{
	int n;
	cin>>n;
	int i,a[100]={0};
    for(i=1;i<=n;i++)
		cin>>a[i];
	int j=0,b=n/2,t;
	for(j=0;j<=b;j++)
	{
		t=a[j];
		a[j]=a[n-j];
		a[n-j]=t;
	}
	int x=1;
	for(i=0;i<n;i++)
	{
		if(x==1)
		{
			cout<<a[0];
			x=0;
		}
		else
			cout<<" "<<a[i];

	}
	return 0;
	}
int main ()
{
	int n,c[100],i,k = 0,a;
	cin >> n;
	for (i = 0; i < n; i++)
		cin >> c[i];
	for (i = (n - 1); i >= 0; i--)
	{
		if (k == 1)
			cout << " " ;
		cout << c[i] ;
		k = 1;
	}
	cout << endl;
	return 0;
}
int main()
{
int i,j,n;
scanf("%d",&n);
int a[100];
for(i=0;i<n;i++)
{
scanf("%d ",&a[i]);
}
int m;
for(i=n-1;i>0;i--)
{
for(j=0;j<i;j++)
{
m=a[j+1];
a[j+1]=a[j];
a[j]=m;
}
}
for(i=0;i<n;i++)
{
if(i==n-1)printf("%d",a[i]);
else printf("%d ",a[i]);
}
}
int main(){
     int i,n,a[100],b[100];
	 scanf("%d",&n);
	 for(i=0;i<n;i++)
	 {
	 scanf("%d",&a[i]);
	 } 
	 for(i=0;i<n;i++)
	 b[i]=a[i];
	 for(i=0;i<n;i++)
	 a[i]=b[n-1-i];
	 for(i=0;i<n-1;i++)
	 printf("%d ",a[i]);
	 printf("%d",a[n-1]);
return 0;
}
int main()
{
    int n,i;
    1 < n < 100;
    cin >> n;
    int a[n],b[n];
    for(i=0;i<=n-1;i++)
    {
        cin >> a[i];
    }
    for(i=0;i<=n-2;i++)
    {
        b[i] = a[n-i-1];
        cout << b[i] << " ";
    }
       b[n-1] = a[0];
       cout << b[n-1];
        return 0;
}
int main(int argc, char* argv[])
{
	int a[100];
	int i;
	int n;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);

	}
	for(i=n-1;i>0;i--)
	{
		printf("%d ",a[i]);
	}
	i=0;
	printf("%d\n",a[i]);

	return 0;
}
void jiaohuan(int*,int*);
int main(){
	int yuan[101];
	int i,n;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&(yuan[i]));
	}
	for(i=0;i<n/2;i++){
		jiaohuan(&(yuan[i]),&(yuan[n-1-i]));
	}
	for(i=0;i<n-1;i++){
		printf("%d ",yuan[i]);
	}
	printf("%d",yuan[n-1]);
	return 0;
}
void jiaohuan(int*a,int*b){
	int e=*a;
		*a=*b;
		*b=e;
}
int main(){
    int n;    
	scanf("%d",&n);    
	int N[100],i,e;    
	for (i = 0;i < n;scanf("%d",&N[i++]));    
	for (i=0; i<n/2; e = N[i], N[i]=N[n-i-1], N[n-i-1]=e, i++);    
	for (i = 0;i < n-1;printf("%d ",N[i++]));
printf("%d",N[n-1]);
return 0;
}
/*
 * 3.cpp
 *????
 *  Created on: 2012-11-5
 *      Author: ???
*/
int main()
{
    int N,i,j;
    cin>>N;
    const int n=N;
    int a[n];
    for(i=0;i<n;i++)
    cin>>a[i];
    cout<<a[n-1];
    for(j=1;j<n;j++)
    	cout<<" "<<a[n-1-j];
}
/*
 * 5.8ReversedOrder.cpp
 *
 *  Created on: 2012-11-11
 *      Author: ???
 *      ???????????????????
 */
int main(){
	int n,i,j,temp,a[200];
	cin>>n;
	for(i=0;i<n;i++)
		cin>>a[i];              //????
	for(i=0;i<n-1;i++)
		for(j=0;j<n-i-1;j++)    //??????????????????
			{
			temp=a[j];          //??????
			a[j]=a[j+1];
			a[j+1]=temp;
			}
	for(i=0;i<n;i++)
		cout<<a[i]<<(i<(n-1)?" ":"\n");//???????????
	return 0;

}
int main()
{
	int n;
	cin>>n;
	int a[105];
	int i=0;
    int b;
	while(i<n)
	{
		cin>>a[i];
        i++;
	}
	int c=n-1;
	while(c>=1 && c<=(n-1))
	{
		cout<<a[c];
		cout<<" ";
		c--;
	}
	cout<<a[0];
	return 0 ;
}
void main()
{
	int n,a[MAX];
	int *p;
	scanf("%d",&n);
	for(p=a;p<a+n;p++)
		scanf("%d",p);
	
	for(p=a+n-1;p>=a;p--){
		if(p==a+n-1)
			printf("%d",*p);
		else
			printf(" %d",*p);
	}
	printf("\n");
}
int main()
{
	int n=0;
	cin>>n;
	int a[n];
	int b[n];
	int i=0;

	for (i=0;i<n;i++)
	{
		cin>>a[i];
	}
	for (i=0;i<n;i++)
	{
		b[i]=a[n-1-i];
	}

	for (i=0;i<n;i++)
		{
			a[i]=b[i];
			if (i<n-1)cout<<a[i]<<" ";
			else cout<<a[i];

		}
	return 0;

}
void main()
{
	int a[100];
	int n,i=0;
	scanf("%d",&n);
	while(i<n)
	{
		scanf("%d",&a[i]);
		i=i+1;
	}
	i=n-1;
	while(i>0)
	{
		printf("%d ",a[i]);
		i=i-1;
	}
	printf("%d",a[0]);
}
int main(){
	int sz[100],n;
	scanf("%d\n",&n);
	int i;
	for(i=1;i<=n;i++){
		if(i<n){
			scanf("%d ",&sz[i-1]);
		}
		else{
			scanf("%d",&sz[i-1]);
		}
	}
	for(i=n;i>=1;i--){
		if(i>1){
			printf("%d ",sz[i-1]);
		}
		else{
			printf("%d",sz[i-1]);
		}
	}
	return 0;
}
//*************************************************
//***???????????***
//***??????***
//***???2013.1.13***
//*************************************************

int a[11][11],b[11][11];

void f()
{	
	int i,j;
	for (i = 1; i <= 9; i++)
	{
		for (j = 1; j <= 9; j++)
		{
			b[i][j] = 2 * a[i][j] + a[i - 1][j] + a[i + 1][j] + a[i][j - 1] + a[i][j + 1] + a[i - 1][j - 1] + a[i - 1][j + 1] + a[i + 1][j - 1] + a[i + 1][j + 1];
		}
	}
	for (i = 1; i <= 9; i++)
	{
		for (j = 1; j <= 9; j++)
		{
			a[i][j] = b[i][j];
		}
	}
}

int main ()
{
	int i,j,n,m;
	cin >> n >> m;
	for (i = 0; i < 11; i++)
	{
		for (j = 0; j < 11; j++)
		{
			a[i][j] = 0;
		}
	}
	a[5][5] = n;
	for (i = 0; i < m; i++)
	{
		f();
	}
	for (i = 1; i <= 9; i++)
	{
		for (j = 1; j <= 9; j++)
		{
			cout << a[i][j];
			if (j != 9)
				cout << " ";
		}
		cout << endl;
	}
	return 0;
}
int main (   )
{
	int m,n,tian,i,j;
	int num[6][11][11];
	cin>>m>>n;
	for(tian=0;tian<=n+1;tian++)
	{
		for(i=0;i<=10;i++)
		{
			for(j=0;j<=10;j++)
			{
				num[tian][i][j]=0;
			}
		}
	}
	num[1][5][5]=m;
	for(tian=1;tian<=n;tian++)
	{
		for(i=1;i<=9;i++)
		{
			for(j=1;j<=9;j++)
			{
				num[tian+1][i][j]=2*num[tian][i][j]+num[tian][i-1][j-1]+num[tian][i-1][j]+num[tian][i-1][j+1]+num[tian][i][j-1]+num[tian][i][j+1]+num[tian][i+1][j-1]+num[tian][i+1][j]+num[tian][i+1][j+1];
			}
		}
	}
	for(i=1;i<=9;i++)
	{
		for(j=1;j<=9;j++)
		{
			if(j!=9)cout<<num[n+1][i][j]<<" ";
			else cout<<num[n+1][i][j];
		}
		cout<<endl;
	}
	return 0;
}