Problem1677--A+B Again

1677: A+B Again

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

A+B是没个JudgeOnline必备的试题,但是今天的A+B有些特别。AB是以英文形式给出,请你求出AB的和,并且要以英文形式输出。

 

整数在英文中的表示规则如下(仅仅是小于10^9的非负整数):数字abc,def,ghi 可以写成"[abc] million [def] thousand [ghi]"的形式。这里 "[xyz] " 表示英文中xyz 的写法。

在英文表示中如果abc = 0 ,则"[abc] million" 将被省略。同理若def = 0 ghi = 0,则"[def] thousand" "[ghi] " 将被省略。如果所有数都为0,则这个数值为0,写作"zero". 注意,"million""thousand" 都是单数。

1000以下的数按照如下规则:数字xyz 应写成"[x] hundred and [yz]的格式。 (yz = 0 那么只需要“[x] hundred”。否则如果y = 0 写成“[x] hundred and [z]”的形式)。如果x = 0"[x] hundred and" 将被省略。"hundred" 也永远是单数。

20以下的数分别是 "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "twelve", "thirteen", "fourteen", "fifteen", "sixteen", "seventeen", "eighteen", "nineteen"。 从20 99 的数字,xy 写成 "[x0] [y] ", 其中可以被10整除的数写成 "twenty", "thirty", "forty", "fifty", "sixty", "seventy", "eighty""ninety"

例如987,654,312 应写成"nine hundred and eighty seven million six hundred and fifty four thousand three hundred and twelve", 100,000,037 应写成 "one hundred million thirty seven", 1,000写成 "one thousand".

Input

输入一个整数T (1 <= T <= 1900) 表示有T个测试数据

每组测试数据两行,每行一个用英文表示的非负整数,表示AB

AB都是非负整数且小于10^9

Output

对于每组数据,输出一行字符串,表示为AB和的英文形式。保证AB之和小于10^9

Sample Input Copy

3
one
eleven
one
one hundred and two
eleven
one hundred and two

Sample Output Copy

twelve
one hundred and three
one hundred and thirteen

Source/Category