while(0<1)println{var i,n,c=5 n=readInt c="\x07\x0e\x15\x1c\x0f\x16\x1d\x17\x1e\x1f"(n/96) ("RKR"/:(Seq(c%7,c/7,n/16%6)++Seq(n%4*2+1,n/4%4*2).sorted))(_.patch(_,""+"BBQNN"{i-=1 i},0))}
Note that non-ascii characters in the above source code will be escaped (such as \x9f).