Problem: Ivan is a novice painter. He has dyes of different colors. He also knows exactly pairs of colors which harmonize with each other.
Ivan also enjoy playing chess. He has rooks. He wants to take rooks, paint each of them in one of colors and then place this rooks on a chessboard of size .
Let's call the set of rooks on the board connected if from any rook we can get to any other rook in this set moving only through cells with rooks from this set. Assume that rooks can jump over other rooks, in other words a rook can go to any cell which shares vertical and to any cell which shares horizontal.
Ivan wants his arrangement of rooks to have following properties:
- For any color there is a rook of this color on a board;
- For any color the set of rooks of this color is connected;
- For any two different colors union of set of rooks of color and set of rooks of color is connected if and only if this two colors harmonize with each other.
Please help Ivan find such an arrangement.
Input Format: The first line of input contains integers , (, ) — number of colors and number of pairs of colors which harmonize with each other.
In next lines pairs of colors which harmonize with each other are listed. Colors are numbered from to . It is guaranteed that no pair occurs twice in this list.
Output Format: Print blocks, -th of them describes rooks of -th color.
In the first line of block print one number () — number of rooks of color . In each of next lines print two integers and () — coordinates of the next rook.
All rooks must be on different cells.
Total number of rooks must not exceed .
It is guaranteed that the solution exists.
Note: Rooks arrangements for all three examples (red is color , green is color and blue is color ).