$<.drop(1).each{|e|s=e.chomp.tr('W','') puts s=='GR'||s=='GGRR'||s=='GRGR' ? :possible : :impossible}