Windows Of CCPC

TimeLimit:1000MS  MemoryLimit:65536KB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description

In recent years, CCPC has developed rapidly and gained a large number of competitors .One contestant designed a design called CCPC Windows .The 1-st order CCPC window is shown in the figure:



And the 2-nd order CCPC window is shown in the figure:



We can easily find that the window of CCPC of order k is generated by taking the window of CCPC of order k−1 as C of order k, and the result of inverting C/P in the window of CCPC of order k−1 as P of order k.
And now I have an order k ,please output k-order CCPC Windows , The CCPC window of order k is a 2^k∗2^k matrix.

Input

The input file contains T test samples.(1<=T<=10)

The first line of input file is an integer T.

Then the T lines contains a positive integers k , (1≤k≤10

Output
For each test case,you should output the answer .
SampleInput
3
1
2
3
SampleOutput
CC
PC
CCCC
PCPC
PPCC
CPPC
CCCCCCCC
PCPCPCPC
PPCCPPCC
CPPCCPPC
PPPPCCCC
CPCPPCPC
CCPPPPCC
PCCPCPPC
Submit
题目统计信息详细
总AC数6
通过人数6
尝试人数6
总提交量10
AC率60.00%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: