Hourglass#7319

Hourglass

13 seconds
64 megabytes
Easy

In this problem, you have to solve a puzzle involving a planar board and pieces.

The Hourglass Puzzle of size looks as follows. The board is drawn on a plane which consists of (2 \cdot n + 1) rows. The rows are horizontal and lie one under the other. Each row consists of positions: the middle row contains one position, and each other row below or above the middle contains one more position than its neighbor towards the middle. The positions in neighboring rows are connected so that each position of the shorter row has exactly two neighboring positions in the longer one. The board for n = 2 is illustrated below.

There are some pieces on the board. Initially, each position of the top rows contains a red piece (sand), and each position of the bottom rows contains a blue piece (air). The goal of the puzzle is to swap the pieces, that is, to fill top rows by air and bottom rows by sand. Pieces of the same color are considered the same. There can be at most one piece in each position at any given moment. The initial and final positions for n = 2 are illustrated below. Red pieces are denoted by "X" while blue pieces are denoted by "O".

Moving the pieces complies with the following rules.

The pictures below illustrate the sequence of moves allowing to solve the puzzle for n = 2.

The sequence of moves can be written down in the following way.

The intuitive meaning of this notation is that the tail of each letter shows the direction of a movement or jump.

It turns out that the information provided by such notation is enough to restore all intermediate states of the puzzle.

Given , the size of the puzzle, print out its solution. Note that you don't have to minimize or maximize the number of moves.

Input

The size (1 \le n \le 10) of the puzzle.

Output

Print one line containing a solution to the puzzle of the given size. This line must contain only lowercase English letters «b», «d», «p» and «q» and no other characters, in particular, no spaces. If there are several possible solutions, print any one of them.

Examples

Example 1

Loading
Loading