* Line 1: Two space-separated integers: N and K

* Lines 2..2*K+1: Line 2*i and 2*i+1 will contain a single query.

Line 2*i will contain just one character: 'Q' if the cows are lining

up and asking Farmer John for their line number or 'P' if Farmer

John gives the cows a line number.

If the line 2*i is 'Q', then line 2*i+1 will contain N space-separated

integers B_ij which represent the cow line. If the line 2*i is 'P',

then line 2*i+1 will contain a single integer A_i which is the line

number to solve for.

第1行：N和K

第2至2*K+1行：Line2*i ，一个字符‘P’或‘Q’，指明类型。

如果Line2*i是P，则Line2*i+1，是一个整数，表示行号；

如果Line2*i+1 是Q ，则Line2+i，是N个空格隔开的整数，表示牛的排列方式。