import java.util.* ; public class Main{ public static void main(String...args) { Scanner sc = new Scanner(System.in) ; while(sc.hasNextLine()) { String input = sc.nextLine() ; if(input.matches("\\d+")) { System.out.println(solu(input)) ; } else { System.out.println("error") ; } } } public static String solu(String str) { int num = Integer.parseInt(str) ; if(num == 0) { return "zero" ; } if(num < 100) { return two(str) ; //百 } else if( num < 1000) { return three(str) ; //千 } else if(num < 1000000) { return thousand(str.substring(0,str.length()-3))+three(str.substring(str.length()-3)) ; //百万 } else { return million(str.substring(0,str.length()-6)) + thousand(str.substring(str.length()-6,str.length()-3))+three(str.substring(str.length()-3)) ; } } //百万 public static String million(String str) { String ret = "million " ; int num = Integer.parseInt(str) ; if(num == 0) { return " " ; } if(num < 100) { return two(str) + ret ; } return three(str) + ret ; } //千 public static String thousand(String str) { String ret = "thousand " ; int num = Integer.parseInt(str) ; if(num == 0) { return " " ; } if(num < 100) { return two(str) + ret ; } return three(str) + ret ; } //三位数 public static String three(String str) { String ret = "and " ; int num = Integer.parseInt(str) ; if(num == 0) { return " " ; } if(num < 100) { return two(str.substring(1)) ; } else { return two(str.substring(0,1)) + "hundred " + ret + two(str.substring(1)) ; } } //两位以内 public static String two(String str) { int num = Integer.parseInt(str) ; if(num == 0) { return "" ; } else { if(num <= 10) { switch(num) { case 1:return "one "; case 2:return "two "; case 3:return "three "; case 4:return "four "; case 5:return "five "; case 6:return "six "; case 7:return "seven "; case 8:return "eight "; case 9:return "nine "; case 10:return "ten "; } } else { switch(num/10) { //11-20 case 1: { switch(num%10) { case 1:return "eleven "; case 2:return "twenty "; case 3:return "thirteen "; case 4:return "fourteen "; case 5:return "fifteen "; case 6:return "sixteen "; case 7:return "seventeen "; case 8:return "eighteen "; case 9:return "nineteen "; } } //20-99 case 2:return "twenty " + two((num%10)+""); case 3:return "thirty " + two((num%10)+""); case 4:return "forty " + two((num%10)+""); case 5:return "fifty " + two((num%10)+""); case 6:return "sixty " + two((num%10)+""); case 7:return "seventy " + two((num%10)+""); case 8:return "eighty " + two((num%10)+""); case 9:return "ninety " + two((num%10)+""); } } } return " "; } }