Bard
Every evening villagers in a small village gather around a bigfire and sing songs.
A prominent member of the community is the bard. Every evening, if the bard is present, he sings a brand new song that no villager has heard before, and no other song is sung that night. In the event that the bard is not present, other villagers sing without him and exchange all songs that they know.
Given the list of villagers present for E consecutive evenings, output all villagers that know all songs sung during that period.
Input
The first line of input contains an integer N, 1 ≤ N ≤ 100, the number of villagers. The villagers are numbered 1 to N. Villager number 1 is the bard.
The second line contains an integer E, 1 ≤ E ≤ 50, the number of evenings.
The next E lines contain the list of villagers present on each of the E evenings. Each line begins with a positive integer K, 2 ≤ K ≤ N, the number of villagers present that evening, followed by K positive integers separated by spaces representing the villagers.
No villager will appear twice in one night and the bard will appear at least once across all nights.
Output
Output all villagers that know all songs, including the bard, one integer per line in ascending order.