#include <iostream>
using namespace std;
void cout4(int w)
{
switch(w){
case 0: cout<<"zero"<<endl;break;
case 1: cout<<"one"<<endl;break;
case 2: cout<<"two"<<endl;break;
case 3: cout<<"three"<<endl;break;
case 4: cout<<"four"<<endl;break;
case 5: cout<<"five"<<endl;break;
case 6: cout<<"six"<<endl;break;
case 7: cout<<"seven"<<endl;break;
case 8: cout<<"eight"<<endl;break;
case 9: cout<<"nine"<<endl;break;
case 10: cout<<"ten"<<endl;break;
case 11: cout<<"eleven"<<endl;break;
case 12: cout<<"twelve"<<endl;break;
case 13: cout<<"thirteen"<<endl;break;
case 14: cout<<"fourteen"<<endl;break;
case 15: cout<<"fifteen"<<endl;break;
case 16: cout<<"sixteen"<<endl;break;
case 17: cout<<"seventeen"<<endl;break;
case 18: cout<<"eighteen"<<endl;break;
case 19: cout<<"nineteen"<<endl;break;
case 20: cout<<"twenty"<<endl;break;}
}
void cout3(int x)
{
switch(x){
case 2: cout<<"twenty";break;
case 3: cout<<"thirty";break;
case 4: cout<<"forty";break;
case 5: cout<<"fifty";break;
case 6: cout<<"sixty";break;
case 7: cout<<"seventy";break;
case 8: cout<<"eighty";break;
case 9: cout<<"ninety";break;
}
}
void cout2(int y)
{
switch(y){
case 1: cout<<"one hundred" ;break;
case 2: cout<<"two hundred" ;break;
case 3: cout<<"three hundred";break;
case 4: cout<<"four hundred";break;
case 5: cout<<"five hundred";break;
case 6: cout<<"six hundred";break;
case 7: cout<<"seven hundred";break;
case 8: cout<<"eight hundred";break;
case 9: cout<<"nine hundred";break;
}
}
void cout1(int z)
{
switch(z){
case 1: cout<<"one thousand";break;
case 2: cout<<"two thousand";break;
case 3: cout<<"three thousand";break;
case 4: cout<<"four thousand";break;
case 5: cout<<"five thousand";break;
case 6: cout<<"six thousand";break;
case 7: cout<<"seven thousand";break;
case 8: cout<<"eight thousand";break;
case 9: cout<<"nine thousand";break;}
}
int main()
{
int n[10005],j=0,a,b,c,d;
while(cin>>n[j])
{
if(n[j]<0||n[j]>9999) break;
else if(n[j]>=0&&n[j]<=20)
cout4(n[j]);
else if(n[j]>20&&n[j]<100)
{
a=n[j]/10;b=n[j]-a*10;
if(b!=0){
cout3(a);
cout<<"-";
cout4(b);}
else{
cout3(a);
cout<<endl;}
}
else if(n[j]==100)
cout<<"one hundred"<<endl;
else if(n[j]>100&&n[j]<1000)
{
a=n[j]/100;b=(n[j]-a*100)/10;c=n[j]-a*100-b*10;
if(b==0&&c==0){
cout2(a);
cout<<endl;}
else if(b!=0&&c==0)
{
if(b>2){
cout2(a);
cout<<" and ";
cout3(b);
cout<<endl;}
else{
cout2(a);
cout<<" and ";
cout4(n[j]-a*100);
}
}
else if(b==0&&c!=0){
cout2(a);
cout<<" and ";
cout3(b);
cout4(c);
}
else{
if(b>=2){
cout2(a);
cout<<" and ";
cout3(b);
cout<<"-";
cout4(c);}
else
{
cout2(a);
cout<<" and ";
cout4(n[j]-a*100);
}
}}
else if(n[j]==1000)
cout<<"one thousand"<<endl;
else if(n[j]>1000&&n[j]<10000)
{
a=n[j]/1000;b=(n[j]-a*1000)/100;c=(n[j]-a*1000-b*100)/10;d=n[j]-a*1000-b*100-c*10;
if(b==0&&c==0&&d==0){
cout1(a);
cout<<endl;}
else if(b!=0&&c==0&&d==0){
cout1(a);
cout<<" and ";
cout2(b);
cout<<endl;}
else if(b==0&&c!=0&&d==0)
{
if(c>=2){
cout1(a);
cout<<" and ";
cout3(c);
cout<<endl;}
else{
cout1(a);
cout<<" and ten"<<endl;}
}
else if(b!=0&&c==0&&d!=0){
cout1(a);
cout<<" and ";
cout2(b);
cout<<" and ";
cout4(d);
}
else if(b!=0&&c!=0&&d==0){
if(c>=2){
cout1(a);
cout<<" and ";
cout2(b);
cout<<" and ";
cout3(c);
cout<<endl;}
else{
cout1(a);
cout<<" and ";
cout2(b);
cout<<" and ";
cout4(n[j]-a*1000-b*100);}
}
else if(b==0&&c==0&&d!=0){
cout1(a);
cout<<" and ";
cout4(n[j]-a*1000);
}
else if(b==0&&c!=0){
if(c>=2){
cout1(a);
cout<<" and ";
cout3(c);
cout<<"-";
cout4(d);}
else{
cout1(a);
cout<<" and ";
cout4(n[j]-a*1000);}
}
else
{
if(c>=2){
cout1(a);
cout<<" and ";
cout2(b);
cout<<" and ";
cout3(c);
cout<<"-";
cout4(d);}
else{
cout1(a);
cout<<" and ";
cout2(b);
cout<<" and ";
cout4(n[j]-a*1000-b*100);
}
}
}
j++;
}
return 0;
}