io.Source.stdin.getLines.foreach{s=>println(s.split(" ").sorted.apply(if(s.diff("R")!=s)0 else 1))}