A. Attracting Attendees
time limit per test
4 seconds
memory limit per test
1024 megabytes
input
standard input
output
standard output

Lineup of the skybird fest.

You are the organizer of the first Global Chart Pop Concert (GCPC), and you want to find a good lineup for your festival to become a hit.

You have already gathered a list of $$$n$$$ bands that are available to perform at GCPC and a list of $$$m$$$ people that consider going to the festival. From a quick market analysis, you know that a person will only attend the festival if at least half of their favourite bands perform. And even if they attend the festival they still watch the performances of only their favourite bands at the festival. Luckily, you have also gathered the favourite bands of each of the $$$m$$$ people during your analysis. With this information, picking a good lineup might seem trivial, but there is one last catch. A band refuses to perform if less than $$$c$$$ fans are watching since nobody likes a boring crowd.

To avoid the GCPC becoming a flop, you need to ensure that the crowd for each performing band is large enough. Obviously, a festival without any band is a complete flop.

Input

The input consists of:

  • One line with three integers $$$n$$$, $$$m$$$, and $$$c$$$ ($$$1 \leq n, m, c \leq 2\cdot10^5$$$), the number of bands, the number of people, and the minimum required crowd size of each performance.
  • $$$2 \cdot m$$$ lines, each two consecutive lines describing the favourite bands of one of the $$$m$$$ people:
    • One line with an integer $$$k$$$ ($$$1 \leq k \leq n$$$), the number of the person's favourite bands.
    • One line with $$$k$$$ distinct integers $$$b_1, \dots, b_k$$$ ($$$1 \leq b_i \leq n$$$), the person's favourite bands.
It is guaranteed that the sum over the number of favourite bands is at most $$$5\cdot10^5$$$.
Output

If it is impossible to avoid a flop, output "impossible". Otherwise, output "possible". If it is possible to avoid a flop, output in addition the number of bands in the chosen lineup, followed by the bands in that lineup in any order.

If there are multiple lineups that avoid a flop, you may output any one of them.

Examples
Input
3 3 2
1
1
2
1 2
3
3 2 1
Output
possible
2
1 2
Input
3 2 2
1
1
3
1 2 3
Output
impossible
Note

In the first sample, the lineup consisting only of band $$$1$$$ will also be accepted.