Author:  М. Спорышев  Time limit:  1 sec  
Input file:  input.txt  Memory limit:  256 Mb  
Output file:  output.txt 
Sorted array of integers is represented implicitly. Instead of each element, a set of that element and its neighbors on the right and on the left is known. First and last array elements have no more than one neighbor. Note that the set does not represent neither the order of elements nor duplicate values.
Your program must output explicit representation of the array (all elements in order).
First line of input file contains integer N — number of elements in array.
Following N lines contain implicit representation of array elements: set size s_{i} and s_{i} different integers a_{ij} — a set of ith array element and its neighbors.
Output file must contain N integers — elements of original sorted array.
1 ≤ N ≤ 10^{5}
− 10^{9} ≤ a_{ij} ≤ 10^{9}
No.  Input file (input.txt ) 
Output file (output.txt ) 

1 


2 

