Program HOC24;
var x: integer;
begin
write('Nhap so: '); readln(x);
if x div 1000=1 then write('Mot nghin ');
if x div 1000=2 then write('Hai nghin ');
if x div 1000=3 then write('Ba nghin ');
if x div 1000=4 then write('Bon nghin ');
if x div 1000=5 then write('Nam nghin ');
if x div 1000=6 then write('Sau nghin ');
if x div 1000=7 then write('Bay nghin ');
if x div 1000=8 then write('Tam nghin ');
if x div 1000=9 then write('Chin nghin ');
if x div 1000<>0 then
if x div 100=0 then write('khong tram ');
if x div 100=1 then write('mot tram ');
if x div 100=2 then write('hai tram ');
if x div 100=3 then write('ba tram ');
if x div 100=4 then write('bon tram ');
if x div 100=5 then write('nam tram ');
if x div 100=6 then write('sau tram ');
if x div 100=7 then write('bay tram ');
if x div 100=8 then write('tam tram ');
if x div 100=9 then write('chin tram ');
if (x div 1000<>0) or (x div 100<>0) then
begin
if (x div 10<>0) then
begin
if x div 10=1 then write('muoi ');
if x div 10=2 then write('hai muoi ');
if x div 10=3 then write('ba muoi ');
if x div 10=4 then write('bon muoi ');
if x div 10=5 then write('nam muoi ');
if x div 10=6 then write('sau muoi ');
if x div 10=7 then write('bay muoi ');
if x div 10=8 then write('tam muoi ');
if x div 10=9 then write('chin muoi ');
if x mod 10=1 then write('mot');
if x mod 10=2 then write('hai');
if x mod 10=3 then write('ba');
if x mod 10=4 then write('bon');
if x mod 10=5 then write('lam');
if x mod 10=6 then write('sau');
if x mod 10=7 then write('bay');
if x mod 10=8 then write('tam');
if x mod 10=9 then write('chin');
end else
begin
if x mod 10=1 then write('le mot');
if x mod 10=2 then write('le hai');
if x mod 10=3 then write('le ba');
if x mod 10=4 then write('le tu');
if x mod 10=5 then write('le nam');
if x mod 10=6 then write('le sau');
if x mod 10=7 then write('le bay');
if x mod 10=8 then write('le tam');
if x mod 10=9 then write('le chin');
end;
readln
end.