while(0<1)println{var i,n,c=5 n=readInt c=""(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))}