3 BWR
W In this case, we will pile up blocks as follows: * the $1$\-st and $2$\-nd blocks from the left in the bottom row are respectively blue and white, so we place a red block on top of it; * the $2$\-nd and $3$\-rd blocks from the left in the bottom row are respectively white and red, so we place a blue block on top of it; * the blocks in the $2$\-nd row from the bottom are respectively red and blue, so we place a white block on top of it. Thus, the block at the top will be white; we should print `W`.
4 RRBB
W In this case, we will pile up blocks as follows: * the $1$\-st and $2$\-nd blocks from the left in the bottom row are both red, so we place a red block on top of it; * the $2$\-nd and $3$\-rd blocks from the left in the bottom row are respectively red and blue, so we place a white block on top of it; * the $3$\-rd and $4$\-th blocks from the left in the bottom row are both blue, so we place a blue block on top of it; * the $1$\-st and $2$\-nd blocks from the left in the $2$\-nd row from the bottom are respectively red and white, so we place a blue block on top of it; * the $2$\-nd and $3$\-rd blocks from the left in the $2$\-nd row from the bottom are respectively white and blue, so we place a red block on top of it; * the blocks in the $3$\-rd row from the bottom are respectively blue and red, so we place a white block on top of it. Thus, the block at the top will be white; we should print `W`.
6 BWWRBW
B The figure below shows the final arrangement of blocks. The block at the top will be blue; we should print `B`.  Note that this is the case shown as an example in Problem Statement.
8 WWBRBBWB
R The figure below shows the final arrangement of blocks. The block at the top will be red; we should print `R`. 
21 BWBRRBBRWBRBBBRRBWWWR
B
{
"problem": {
"name": "Tricolor Pyramid",
"description": {
"content": "We have $N$ blocks arranged in a row, where each block is painted blue, white, or red. The color of the $i$\\-th block from the left $(1 \\leq i \\leq N)$ is represented by a character $c_i$; `B`, `W`, a",
"description_type": "Markdown"
},
"platform": "AtCoder",
"limit": {
"time_limit": 2000,
"memory_limit": 262144
},
"difficulty": "None",
"is_remote": true,
"is_sync": true,
"sync_url": null,
"sign": "arc117_c"
},
"statements": [
{
"statement_type": "Markdown",
"content": "We have $N$ blocks arranged in a row, where each block is painted blue, white, or red. The color of the $i$\\-th block from the left $(1 \\leq i \\leq N)$ is represented by a character $c_i$; `B`, `W`, a...",
"is_translate": false,
"language": "English"
}
]
}