gets;while v=gets;puts (v.to_i+1).to_s(2).tr("01","LR")[1..-1];end