n = gets.to_i n.times do puts gets.chomp.scan(/R$/).any? ? "possible" : "impossible" end