const N = 10;
var a: array [1..N] of longint;
i,d,j:longint;
begin
for i:=1 to N do
read(a[i]);
for j:=1 to 3 do begin
d:=a[n];
for i:=N downto 2 do
a[i] := a[i-1];
a[1]:=d;
end;
writeln('После сдвига: ');
for i:=1 to N do
write(a[i],' ');
writeln;
end.