408604: GYM103202 D Journey to Un'Goro
Description
Recently, you've taken a trip to Un'Goro.
A small road in Un'Goro has attracted your eyes. The road consists of $$$n$$$ steps, each colored either red or blue.
When you go from the $$$i$$$th step to the $$$j$$$th, you count the number of red steps you've stepped. You will be satisfied if the number is odd.
"What is the maximum number of pairs $$$(i, j)$$$ $$$(1 \leq i \leq j \leq n)$$$, such that I'll be satisfied if I walk from the $$$i$$$th step to the $$$j$$$th?" you wonder. Also, how to construct all colorings such that the number of pairs is maximized?
InputThe only line contains an integer $$$n$$$ $$$(1 \le n \le 10^5)$$$, indicating the number of steps of the road.
OutputOutput an integer in the first line, denoting the maximum number of pairs that make you satisfied.
Each of the following several lines contains a string with length $$$n$$$ that represents a coloring scheme, in lexicographically ascending order. The $$$i$$$th character is the color of the $$$i$$$th step, where r is for red and b for blue.
If there are more than $$$100$$$ different colorings, just find the lexicographically smallest $$$100$$$ colorings.
Note that in lexicographical order, b is ordered before r.
ExamplesInput1Output
1 rInput
2Output
2 br rb rrInput
3Output
4 brb rbr rrr