Chairman K has prepared a game for the participants of the spring training camp.
There are $N$ participants in the training camp, each assigned a unique number from $1$ to $N$. Each participant has a board. The game follows these steps:
Chairman K selects one participant to be the parent, while all other participants become children. However, the identity of the parent is not revealed to the participants.
Chairman K writes the letter ‘T’ on the parent’s board and the letter ‘F’ on all the children’s boards.
Each participant reads the letter on their own board. Then, following a predefined strategy, they perform the following turn-based process for $L$ turns:
T’ or ‘F’. Then, they submit their board to Chairman K.After $L$ turns, each participant must guess who the parent is.
The goal of the game is to establish a strategy beforehand so that, regardless of who is chosen as the parent, all participants can correctly identify the parent by the end of the process.
A smaller value of $L$ results in a higher score. Your goal is to devise a strategy that minimizes $L$ while ensuring that all participants correctly identify the parent by the end of the process.
A strategy consists of a non-negative integer $L$, representing the number of turns, and a set of rules that determine the actions of each participant. The rules are as follows:
For participant $i$ ($1 ≤ i ≤ N$), at the beginning of turn $t$ ($1 ≤ t ≤ L$), if the sequence of letters they have read up to that point is $a_0, a_1, \dots , a_{t-1}$, then based only on this information $(i, t, a_0, a_1, \dots , a_{t-1})$, they must determine:
For participant $i$ ($1 ≤ i ≤ N$), after the $L$-th turn, if the sequence of letters they have read up to that point is $a_0, a_1, \dots , a_L$, then based only on this information $(i, L, a_0, a_1, \dots , a_L)$, they must determine the participant number of the parent.
Devise a strategy that allows all participants to correctly identify the parent, regardless of who is chosen as the parent. Then, for each possible parent selection $(1, 2, \dots , N)$, output the values that each participant writes on their board and the participant they choose to observe in each turn, following the established strategy.
Read the following data from the standard input.
$N$
Print the output in the following format:
$L$
$acts_1$
$acts_2$
$\vdots$
$acts_N$
Here, $acts_s$ represents the sequence of actions taken by each participant when participant $s$ is the parent. The format of $acts_s$ is as follows:
First, print the integer $s$. For each participant $i$ ($1 ≤ i ≤ N$), print a single line containing the sequence of actions they take during the $L$ turns. Each line should have the following values:
T’ or ‘F’), which the participant writes on their board in turn $t$.These values should be printed for each turn $t$ ($1 ≤ t ≤ L$) in sequence. Thus, the output format for $acts_s$ is:
$s$
$c_{1,1}$ $p_{1,1}$ $c_{1,2}$ $p_{1,2}$ $\cdots$ $c_{1,L}$ $p_{1,L}$
$c_{2,1}$ $p_{2,1}$ $c_{2,2}$ $p_{2,2}$ $\cdots$ $c_{2,L}$ $p_{2,L}$
$\vdots$
$c_{N,1}$ $p_{N,1}$ $c_{N,2}$ $p_{N,2}$ $\cdots$ $c_{N,L}$ $p_{N,L}$