Falsification of results
In the city of N., the informatics olympiad consists of two rounds, each scored out of 400 points. For simplicity, all participants are numbered from 1 to N.
Right after the olympiad, the jury received some troubling news from a courier: there was a directive from "above" that a participant named Vasya, who is numbered 1, must finish in position A. This means exactly A-1 participants should have a higher total score than Vasya across the two rounds. The rankings for each round have already been published and cannot be altered. For each round, a list is provided showing participant numbers in the order of their rankings—a permutation of numbers from 1 to N. The jury's task is to assign integer scores from 1 to 400 to each participant in both rounds so that Vasya ends up in position A in the final standings, while maintaining the published rankings for each round.
No two participants should receive the same score in the same round. However, identical total scores in the final standings are allowed.
Your task is to either accomplish this for the jury or determine that it is not feasible.
Input
The first line contains two integers N, A (1 ≤ N ≤ 200, 1 ≤ A ≤ N)—the number of participants in the olympiad and the required position for Vasya, respectively. The second line lists the participant numbers in the order of their rankings in the first round (from first place to N-th). The third line describes the second round in the same format. The numbers in the second and third lines are separated by spaces.
Output
If it is not possible to assign the scores as required, output a single word Impossible. Otherwise, on the first line, output Possible. On the second line, provide N integers from 1 to 400, representing the score assignments for participants in the first round, where the i-th number is the score for the participant who took the i-th place. Similarly, output N integers for the second round. Separate the numbers in the lines with spaces.
No two participants should receive the same score in the same round. If there are multiple valid ways to assign the scores, any solution is acceptable.