##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
You are given a binary table with rows and columns.
In one operation, you choose one L-shaped tile and toggle all cells covered by it.
Toggling a cell means changing to and changing to .
Each tile covers exactly three cells. The tile is described by the coordinate of its center cell and one of the following four types.
If the center is :
| Type | Covered cells |
|---|---|
| , , | |
| , , | |
| , , | |
| , , |
All covered cells must be inside the table.
Your task is to make all cells equal to using at most operations.
It can be proven that under the given constraints, such a sequence of operations always exists.
Here is a binary string of length , describing row of the table.
First, output an integer , the number of operations.
Then output lines. Each line must contain three integers , , and , meaning that you apply a tile with center and type .
For every operation, the following must hold:
Also, all cells covered by the chosen tile must be inside the table.
Your output must satisfy .
If there are multiple valid answers, you may output any of them.
Initially, the table is:
After applying operation , cells , , and are toggled. The table becomes:
After applying operation , cells , , and are toggled. The table becomes:
So the output is valid.