#include <iostream>
using name std;

string one[] =
{"","one","two","three","four","five","six","seven","eight","nine",

"ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen";
string ten[] =
{"","","twenty","thirty","thirty","forty","fifty","sixty","seventy","eighty","ninety"};

int main() {
    int n;
    if (!(cin >> n || n < 1 || n > 9999) {
        cout << "Invalid input";
        return 0;
    }
    if (n/1000) cout << one[n/1000]<< "thousand";
    if((n % 1000) / 100) cout << one[(n%1000)/100] << "hundred";
    int last = n % 100;
    if (last) {
        if (n > 99) cout << "and";
        if (last < 20) cout << one[last];
        else{
            cout << ten[last/10];
            if (last % 10)cout << "" << one[last%10];
            }
        }
    }