In the Principle of Computer Organization lab course, the instructor has arranged $$$n$$$ experiments for students to choose from.
Subsequently, $$$m$$$ events occur in chronological order. Each event takes one of the following two forms:
After all $$$m$$$ events have occurred, the instructor needs to print the course roster. Finally, for each experiment, you need to output the number of students, followed by the IDs of the students in this experiment, in ascending order of index.
The first line contains two integers $$$n, m$$$ ($$$1 \le n, m \le 3 \times 10^5$$$), representing the number of experiments and the number of events, respectively.
The next $$$m$$$ lines describe each event in chronological order, following one of the two formats below:
Output $$$n$$$ lines.
For the $$$i$$$-th line, first output the number of students who have chosen experiment $$$i$$$. If this number is non-zero, then output the student IDs of the students in experiment $$$i$$$ in ascending order of index. Adjacent integers on the same line should be separated by a single space.
3 4 1 1 250000001 1 3 250000006 2 3 1 1 1 1 1 250000003
2 250000006 250000003 0 1 250000001
4 9 1 3 835745037 1 3 927149742 1 2 468012503 1 4 314360098 2 3 1 4 1 1 4 501201700 1 3 271374639 2 4 2 2 1 1 3 678882127
0 1 501201700 4 314360098 927149742 271374639 678882127 2 835745037 468012503
| Название |
|---|


