Journey to Un'Goro
题号:NC223803
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 1024 M,其他语言2048 M
64bit IO Format: %lld

题目描述

Recently, you've taken a trip to Un'Goro.
A small road in Un'Goro has attracted your eyes. The road consists of steps, each colored either red or blue.
When you go from the th step to the 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 , such that I'll be satisfied if I walk from the th step to the th?'' you wonder. Also, how to construct all colorings such that the number of pairs is maximized?

输入描述:

The only line contains an integer  , indicating the number of steps of the road.

输出描述:

Output 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 that represents a coloring scheme, in lexicographically ascending order. The th character is the color of the th step, where is for red and for blue.
If there are more than different colorings, just find the lexicographically smallest colorings.
Note that in lexicographical order, is ordered before .
示例1

输入

复制
1

输出

复制
1
r
示例2

输入

复制
2

输出

复制
2
br
rb
rr
示例3

输入

复制
3

输出

复制
4
brb
rbr
rrr