var x:integer;
begin
x:=1234;
write((x mod 10) * 1000 + (x div 1000) + ((x mod 1000) div 10) * 10);
end.
var x:integer;
begin
x:=1234;
write((x mod 10) * 1000 + (x div 1000) + ((x mod 1000) div 10) * 10);
end.