Humble Numbers

No attempts yetTime limit1sMemory limit128 MB

Problem

A number whose only prime factors are 2, 3, 5, or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... lists the first 20 humble numbers.

Write a program that finds and prints the $n$th element of this sequence.

Input

The input consists of one or more test cases. Each test case is a single integer $n$ ($1 \le n \le 5842$). The input is terminated by a line containing $0$, which is not processed.

Output

For each test case, print exactly one line in the following format:

The <n><suffix> humble number is <number>.

Here <number> is the $n$th humble number, and <suffix> is the correct English ordinal suffix for $n$ ("st", "nd", "rd", or "th"). For example, 1 becomes "1st", 2 becomes "2nd", 3 becomes "3rd", while 11, 12, and 13 become "11th", "12th", and "13th".