program doc_so;
uses crt;
var i,n:longint;
st1,st2:string;
begin
clrscr;
write('nhap n:');readln(n);
str(n,st1);
st2:=''
if length(st1)=6 then
begin
case st1[1] of
'1':st2:=st2+'mot'
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'nam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
st2:=st2+' tram '
case st1[2] of
'1':st2:=st2+'mot'
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'nam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
st2:=st2+' muoi '
case st1[3] of
'1':st2:=st2+'mot'
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'nam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
st2:=st2+' nghin '
case st1[4] of
'1':st2:=st2+'mot'
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'nam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
st2:=st2+' tram '
case st1[5] of
'1':st2:=st2+'mot'
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'nam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
st2:=st2+' muoi '
case st1[6] of
'1':st2:=st2+'mot'
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'lam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
writeln(st2);
end;
if length(st1)=5 then
begin
case st1[1] of
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'nam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
st2:=st2+' muoi '
case st1[2] of
'1':st2:=st2+'mot'
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'nam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
st2:=st2+' nghin '
case st1[3] of
'1':st2:=st2+'mot'
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'nam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
st2:=st2+' tram '
case st1[4] of
'1':st2:=st2+'mot'
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'nam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
st2:=st2+' muoi '
case st1[5] of
'1':st2:=st2+'mot'
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'lam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
writeln(st2);
end;
if length(st1)=4 then
begin
case st1[1] of
'1':st2:=st2+'mot'
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'nam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
st2:=st2+' nghin '
case st1[2] of
'1':st2:=st2+'mot'
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'nam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
st2:=st2+' tram '
case st1[3] of
'1':st2:=st2+'mot'
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'nam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
st2:=st2+' muoi '
case st1[4] of
'1':st2:=st2+'mot'
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'lam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
writeln(st2);
end;
if length(st1)=3 then
begin
case st1[1] of
'1':st2:=st2+'mot'
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'nam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
st2:=st2+' tram '
case st1[2] of
'1':st2:=st2+'mot'
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'nam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
st2:=st2+' muoi '
case st1[3] of
'1':st2:=st2+'mot'
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'lam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
writeln(st2);
end;
if length(st1)=2 then
begin
case st1[1] of
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'nam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
st2:=st2+' muoi '
case st1[2] of
'1':st2:=st2+'mot'
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'lam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
writeln(st2);
end;
if length(st1)=1 then
begin
case st1[1] of
'1':st2:=st2+'mot'
'2':st2:=st2+'hai'
'3':st2:=st2+'ba'
'4':st2:=st2+'bon'
'5':st2:=st2+'nam'
'6':st2:=st2+'sau'
'7':st2:=st2+'bay'
'8':st2:=st2+'tam'
'9':st2:=st2+'chin'
end;
writeln(st2);
end;
readln;
end.