If you have enough identical cube-shaped stones, you can build a pyramid. There are two kinds.
High pyramid. Place a $10 \times 10$ square of stones on the bottom, then $9 \times 9$ on top of it, then $8 \times 8$, shrinking each side by 1 per layer until a single $1 \times 1$ stone sits on top. A high pyramid with base length $n$ has height $n$ and uses $1^2 + 2^2 + \cdots + n^2$ stones.
Low pyramid. Place $n \times n$ on the bottom, then shrink each side by 2 per layer: $(n-2) \times (n-2)$, $(n-4) \times (n-4)$, …. If the base length is even the top layer is $2 \times 2$; if it is odd the top layer is $1 \times 1$. A low pyramid with base length $n$ has height $\lceil n/2 \rceil$.
Long ago a pharaoh inherited an enormous number of cube stones and ordered that all of them be used to build pyramids. His architect explained that what can be built depends on the number of stones: with 10 stones you can build a low pyramid of base 3, with 5 stones a high pyramid of base 2, but with 7 stones no pyramid can be built using every stone.
The pharaoh was furious, and after several days set the following conditions.
Given the number of stones, determine how the pyramids should be built to satisfy these conditions.
The input consists of several test cases. Each test case is a single line containing the number of stones $c$ ($1 \le c \le 10^6$). The last line contains a single $0$, which is not processed.
For each test case, first print Case t: using the test-case number $t$ (starting from 1). Then print the pyramids to build, in order from the one using the most stones to the fewest, separated by spaces. Each pyramid is written as its base length followed by L for a low pyramid or H for a high pyramid (for example, a high pyramid of base 3 is 3H). If two pyramids use exactly the same number of stones, print the high pyramid (H) first. If no set of pyramids can satisfy the pharaoh's conditions, print impossible.