The Stern–Brocot tree is an elegant method for constructing the set of all nonnegative fractions , where and are relatively prime. The idea is to start with two fractions and then repeatedly perform the following operation:
Insert a new fraction between every two adjacent fractions.
For example, the first step inserts a new fraction between the starting two. The next step inserts two more, then four, and so on. The entire structure can be viewed as an infinite binary tree, and the tree's upper levels look like this.
This construction preserves order, so the same fraction does not appear in more than one place.
In fact, the Stern–Brocot tree can be thought of as a number system that represents rational numbers, because each positive, reduced fraction appears in the tree exactly once. We use the letters and to indicate moving left or right as we descend from the root of the tree to a particular fraction; thus, a string of s and s uniquely identifies a position in the tree. For example, means going left, then right, right, and left. We can consider to represent a certain fraction. Every positive fraction corresponds to exactly one such string.
Technically, there is one exception: the fraction corresponds to the empty string. We denote this by , as it resembles and stands for "identity".
In this problem, given a positive rational fraction, represent it in the Stern–Brocot number system.
The input consists of multiple test cases. Each test case consists of two relatively prime positive integers and . The final test contains two ones and should not be processed.
For each test case, output a line with the representation of the given fraction in the Stern–Brocot number system.
Example 1