var a:integer;
begin
readln(a);
writeln(a mod 10,' edinic');
a:=a div 10;
writeln(a mod 10,' desyatkov');
writeln(a mod 10,' soten');
writeln(a,' tisyach');
end.
var a:integer;
begin
readln(a);
writeln(a mod 10,' edinic');
a:=a div 10;
writeln(a mod 10,' desyatkov');
a:=a div 10;
writeln(a mod 10,' soten');
a:=a div 10;
writeln(a,' tisyach');
end.