Two people find themselves stuck on a remote island. One day, a terrible monster appears. The monster says that he intends to eat the pair, but will give them the following chance to survive: later that day, the monster will line them up face-to-face. The monster will then place either a black or white hat on each person's head. Each person can see the hat on his or her counterpart, but cannot see his or her own hat.

The monster will then ask both people at once to simultaneously guess the color of his or her own hat. The person can say only one word — either white or black. If both people are wrong, the monster will devour them on the spot. Otherwise they can go free. The two people have all afternoon to plan their strategy. The question is — what should they do?

There exists a rock-solid strategy that will lead to exactly one person guessing correctly. It's easiest to explain this strategy by observing that either the hats have the same or a different color. That is the paradigm shift you have to make to understand that the strategy simply is to decide which of the two players will guess same and which will guess different, based on what they see. In other words, the persons have to agree who will always call out whatever color hat he or she sees on the other person's head, and who will call out the opposite color of what he or she sees. This will, incredibly, always allow one person to guess his or her own hat color correctly, and thereby saving both from being devoured by the terrible monster.

monsters and hats

Input

The first two lines each contain the color of the hat that is on the head of the first, respectively the second person: black or white. The third line of input contains an integer (1 of 2) that indicates which of the two persons will say the opposite color he or she sees on the head of the counterpart. The other person will say the same color.

Output

Write two lines of output that contain the color (black or white) that is given as the answer by the first, respectively the second person, based on the strategy as explained above.

Example

Input:

white
black
2

Output:

black
black