#abc276b. [abc276_b]Adjacency List
[abc276_b]Adjacency List
Problem Statement
There are cities numbered , and roads connecting cities.
The -th road connects city and city .
Print lines as follows.
- Let be the number of cities directly connected to city , and those cities be city , , city , in ascending order.
- The -th line should contain integers in this order, separated by spaces.
Constraints
- $1 \\leq A_i \\lt B_i \\leq N \\, (1 \\leq i \\leq M)$
- if .
- All values in the input are integers.
Input
The input is given from Standard Input in the following format:
Output
Print lines as specified in the Problem Statement.
Sample Input 1
6 6
3 6
1 3
5 6
2 5
1 2
1 6
Sample Output 1
3 2 3 6
2 1 5
2 1 6
0
2 2 6
3 1 3 5
The cities directly connected to city are city , city , and city . Thus, we have , so you should print in the first line in this order, separated by spaces.
Note that must be in ascending order. For instance, it is unacceptable to print in the first line in this order.
Sample Input 2
5 10
1 2
1 3
1 4
1 5
2 3
2 4
2 5
3 4
3 5
4 5
Sample Output 2
4 2 3 4 5
4 1 3 4 5
4 1 2 4 5
4 1 2 3 5
4 1 2 3 4