var
n:integer;
begin
read(n);
write( n div 1000 mod 10 ,' ', n div 100 mod 10, ' ', n div 10 mod 10 , ' ', n mod 10);
end.
var
n:integer;
begin
read(n);
write( n div 1000 mod 10 ,' ', n div 100 mod 10, ' ', n div 10 mod 10 , ' ', n mod 10);
end.