#n27b. 转换时间

转换时间

Background

我靠,这外国人咋看不懂我写的时间啊?

Description

一个字符串SS, 表示时间(n:mn:m),如果nm>=9n,m>=9那么增加前导0,请你把它转成英文中最复杂的描述时间方式(past,topast,to)。

如何来转换成最复杂的时间呢? 首先前30分钟我们都用pastpast表示,两边都是无限接近1212,是用加法,就像01:05转换成最复杂的就是55 pastpast 11。如果是15分钟,那么就用quarterquarter,就像是2:15就用aa quarterquarter pastpast 22;如过正好是半时那么用halfhalf pastpast nn,就像是3:30,就是halfhalf pastpast 33;如果是超过30分钟我们都用toto表示,toto用减法,公式乃:6060 - mm toto n+1n+1;如果是45分钟,那么就用quarterquarter,就像是2:45就用aa quarterquarter toto 33;如果为整点那么输出atat nn oclocko'clock

Input

一个字符串SS, 表示时间(n:mn:m),如果nm>=9n,m>=9那么增加前导0

Output

英文中最复杂的描述时间方式(past,topast,to)。

Samples

06:10
10 past 6

Limitation

1s,1024KiBforeachtestcase.1s, 1024KiB for each test case.

S=5S=5