Program tt;
Var a: array [1..100] of integer;
N,B:integer;
Begin
Read(n);
For i:=1 to n do
Read(a[i]);
B:=a[1];
A[1]:=a[2];
A[2]:=b;
B:=a[n];
A[n]:=a[n-1];
A[n-1]:=b;
write(a[i],’,’);
End.
Program tt;
Var a: array [1..100] of integer;
N,B:integer;
Begin
Read(n);
For i:=1 to n do
Read(a[i]);
B:=a[1];
A[1]:=a[2];
A[2]:=b;
B:=a[n];
A[n]:=a[n-1];
A[n-1]:=b;
For i:=1 to n do
write(a[i],’,’);
End.