#include <iostream>
#include<string>
using namespace std;
int main() {
    int h, m;
    cin >> h >> m;
    string arr[24] = {"zero", "one", "two", "three", "four", "five", 
    "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen",
   "fourteen", "fifteen", "sixteen", "seventeen", "eighteen",
        "nineteen", "twenty", "twenty one", "twenty two", "twenty three"};
	cout << arr[h] << " ";   //输出字符串数组中保存的“时” 
    if (m == 0)              //当m为0,按要求输出 o'clock 
        cout << "o'clock";
    int m_g = m % 10;
   int m_s = m / 10;
     if (m_s == 0 && m_g != 0) 
	 {               // (十位(0))直接读个位 
        cout << arr[m_g];
    }
    if (m_s == 1)
	 {                       //十位(1)(包括个位) 
        cout << arr[m_g+ 10];
     }
    switch(m_s)
	 {                             //十位 (2-5)
        case 2: cout << "twenty "; break;
        case 3: cout << "thirty "; break;//有空格 
        case 4: cout << "forty "; break;
        case 5: cout << "fifty "; break;
        default: break;
    }
    if (m_s != 0 && m_s != 1 && m_g!= 0)
	 {   // 个位 
        cout << arr[m_g];
    }
    return 0;
}