Consider the following problem. There is a standard 8 \times 8 chessboard. You need to place knights on the board so that no two knights can attack each other, with exactly r_i knights in the -th row and exactly c_j knights in the -th column, where the sum of all r_i equals the sum of all c_j and equals . A chess knight is a piece that moves two squares in a horizontal or vertical direction, then one square in the perpendicular direction. Only the squares to which the knight can move are considered attacked. Each square can have at most one knight.
Given the values r_i, determine the values c_j so that the original problem has exactly one solution.
The first line contains eight integers: r_1, r_2, \ldots, r_8 (0 \leq r_i \leq 8).
Output eight integers: c_1, c_2, \ldots, c_8 (0 \leq c_j \leq 8). If it is impossible to choose such numbers, output eight s, separated by spaces. If there are several answers, output the lexicographically smallest one (i.e., with the smallest possible c_1; if there are ties, then the smallest c_2, etc.).
Ejemplo 1