A gateway received k telemetry logs. Each log is already sorted in non-decreasing order. Merge all logs into a single non-decreasing sequence and print every value in order (duplicates included).
Input format
Line 1: an integer k, the number of logs.
Next k lines: each line starts with an integer L (the log's length) followed by L non-decreasing integers. L may be 0 (an empty log, so the line is just 0).
Output format
One line containing all merged values in non-decreasing order, space-separated. If there are no values at all, print an empty line.
Constraints
- 1 <= k <= 5000
- 0 <= L for each log
- The total number of values across all logs is at most 200000.
- -1000000000 <= each value <= 1000000000