The first line of the input file consists of the number $N$ of disks. The second line consists of three integers $s_1,s_2,s_3$ with $0≤ s_1,s_2,s_3 ≤ N$ and $s_1+s_2+s_3 = N$, the number of disks on each of the three pegs. Lines three to five each contain the sizes of the disks for one peg. More precisely: The $(i+2)-th$ line of the input file consists of integer numbers $m_{i,1} ...m_{i,s_i}$ with $1≤ m{i,j} ≤ N$, the sizes of the disks on peg $i$. The disks are given from bottom to top, thus $m_{i,1} > m_{i,2} > ... > m_{i,s_i}$. Note that an empty stack is given by an empty line. The set of $N$ disks have different sizes. All numbers are separated by a single space.

