puts$<.drop(1).map{|e|['R','GR','RR','GRR','RGR','GGRR','GRGR'].any?{|f|f==e.chomp.tr('W','')} ? :possible : :impossible}