var
x: integer;
begin
x:=4321;
writeln (((x mod 100) div 10)*1000 + ((x mod 1000) div 100)*100+(x div 1000)*10 + x mod 10)
end.
var
x: integer;
begin
x:=4321;
writeln (((x mod 100) div 10)*1000 + ((x mod 1000) div 100)*100+(x div 1000)*10 + x mod 10)
end.