Xenospeak

No attempts yetTime limit1sMemory limit128 MB

Problem

Bob Roberts is a linguist who studies the language of the alien M'ca. Every word in that language is built by joining the pieces a, ab and bb. The real M'ca characters cannot be printed, so a and b stand in for them here. For example aaabbbbb and aababb are M'ca words, but babb is not, and you would be a laughingstock in any M'ca establishment if you tried to use babb in a sentence. The alphabet is small enough that every string the three pieces can build is a legal word, up to a certain length that does not matter in this problem.

Bob is compiling a dictionary that renders every legal M'ca word into English. The words follow the traditional M'ca ordering. All words of length 1 come first in alphabetical order, then all words of length 2 in alphabetical order, and so on.

Within one dictionary every page holds the same number of words, though that number changes from edition to edition with the page size and the font size. As in any dictionary, the first and the last word of a page are printed at the top of that page so readers can search faster. Given the number of words per page and a page number, report the two words printed at the top of that page.

Input

Each test case is a single line with two positive integers n and m. n is the number of words per page and m is the page number. n30n \le 30 and m1018m \le 10^{18}.

The last line of input contains 0 0 and is not a test case.

Output

For each test case print Case k: x y on one line, where k is the test case number counted from 1, x is the first word on page m and y is the last word on page m. Separate the three parts with single spaces.