SP21177 TAP2014J - Distracted judges
Description
**\[ The original version of this problem (in Spanish) can be found at [http://dc.uba.ar/events/icpc/download/problems/tap2014-problems.pdf](http://dc.uba.ar/events/icpc/download/problems/tap2014-problems.pdf "http://dc.uba.ar/events/icpc/download/problems/tap2014-problems.pdf") \]**
This problem was included in this contest at the last minute, replacing another one that the jury could not fully prepare in time. We will not tell you much about the original problem because we will use it for the contest next year. We will only say that it was called "_Playing with lists_" because it deals with integer lists. The input for the problem was formed by **L** lists of integers, and its format was:
\- a line with an integer **N $ _{1} $** indicating the amount of numbers in the first list;
\- **N $ _{1} $** lines each representing an integer in the first list;
\- a line with an integer **N $ _{2} $** indicating the amount of numbers in the second list;
\- **N $ _{2} $** lines each representing an integer in the second list;
...
\- a line with an integer **N $ _{L} $** indicating the amount of numbers in the last list;
\- **N $ _{L} $** lines each representing an integer in the last list.
In an unfortunate accident, Joaquin -a member of the jury- erased the first line of each input file (the one which contains **N $ _{1} $** ). We need your help to restore the input files so we can use the problem next year. Given the file without the first line, we ask you to tell us which are the possible values of **N $ _{1} $** such that, if we add a line with that value at the beginning, the resulting file will be a valid input according to the description given above.
This problem was included in this contest at the last minute, replacing another one that the jury could not fully prepare in time. We will not tell you much about the original problem because we will use it for the contest next year. We will only say that it was called "Playing with lists" because it deals with integer lists. The input for the problem was formed by L lists of integers, and its format was:
Input Format
The first line contains an integer **T** (**1 ****10 $ ^{5} $** ) which indicates the number of lines remaining in the input file. Each of the next **T** lines contains an integer **R $ _{i} $** which represents the number left on the **i**-th line of the input file after the accident (**1** ****R $ _{i} $** ****10 $ ^{5} $** for **i = 1, 2, ... , T**).********
Output Format
Print a line for each possible value of **N $ _{1} $** . Print all possible answers in increasing order.