The first line of input contains one integer, indicating the number of ladies and gentlemen invited.
In the next followinglines, there is a integer
first, indicating the number of gentlemen that the
-th lady dislikes. Then followed with
integers
.
You should outputintegers if there exists a perfect matching, the
-th number indicating the gentleman ID that the
-th lady chooses. Please output
if no such matching exists.