Being Smarty!

No attempts yetTime limit1sMemory limit128 MB

Problem

A web template engine is software designed to process web templates together with content information in order to produce web documents. A template is an HTML page without the content. In a way, a template system helps separate the information in a web page from the way it is presented.

A template system normally comes with a (restricted and specialized) programming language that lets the presentation vary depending on certain properties of the information. For example, when presenting a bank statement, the bank may decide to display in red any transaction with an amount above $1,000 in order to grab the user's attention.

Another technique, frequently used when printing tables, is to alternate the background color of rows so that the reader can more easily follow a row visually. For example, the background color in Table (a) alternates after every row, while in Table (b) the color alternates every three rows.

A well-designed template language would provide a construct that lets the designer alternate the properties of table rows. In this problem we focus on one such construct that takes three arguments: $N$, $P_1$, and $P_2$. The engine applies $P_1$ to the first $N$ rows, $P_2$ to the next $N$ rows, then $P_1$ again to the following $N$ rows, and so on.

Write a program that, given the current row number (starting at one), the value $N$, and the properties $P_1$ and $P_2$, determines which of $P_1$ or $P_2$ should be applied to the current row.

Input

Your program will be tested on one or more test cases. Each test case is given on a separate line and specifies four values: $R$, $N$, $P_1$, and $P_2$, all separated by one or more spaces.

$R$ is the current row number (the first row is numbered 1) and $N$ is as described above. Note that $0 < R, N < 10^9$.

$P_1$ and $P_2$ are properties. A property is a string made of upper- or lower-case letters, digits, and/or spaces. A property may be surrounded by double quotes (the double quotes are not part of the property). If a property contains spaces, the surrounding double quotes are mandatory. No property is longer than 512 characters (including the double quotes, if present).

The last line of the input is a single zero.

Output

For each test case, print one line in the format k. result, where k is the test case number (starting at 1) and result is $P_1$ or $P_2$. The surrounding double quotes are never printed, and every letter is printed in lower case.