Coming back home after triumphantly winning your long-coveted trophy, you discover that it was shattered to pieces in your trunk. Now you must repair it.
Your trophy had the shape of a rectangle of size 3 \times n, for some integer n \ge 1, thereby consisting of rows and columns, containing a total of unit squares. It was broken into pieces, the -th piece being a rectangle of size a_k \times b_k for some integers a_k and b_k such that 1 \le a_k \le b_k \le 3. Such pieces may have been rotated, or even flipped, in the havoc that occurred in your trunk.
As the first step towards repairing your trophy, you should reassemble them in the form of a rectangle of size 3 \times n. More precisely, you have drawn, on a sheet of paper, a 3 \times n rectangle on which you will place your pieces, and you need to know, for all integers i \le 3 and j \le n, which piece will cover the unit square on the -th row and -th column of your rectangle.
The input consists of three lines, each containing integers. The first line contains the numbers and . The second line contains the numbers a_1, a_2, \dots, a_k. The third line contains the numbers b_1, b_2, \dots, b_k.
The output should contain three lines, each consisting of integers. If you plan to cover the unit square on the -th row and -th column with the -th piece, the -th number on the -th output line should be .
If there are several ways to reassemble your pieces in the form of a rectangle of size 3 \times n, every output representing one of these ways is considered correct.
Example 1. This output represents the following reassembly:
Example 2. This output represents the following reassembly:
Both reassemblies are valid, even though sample inputs and are the same.
Example 1
Example 2