import java.util.*; import java.lang.*; import java.io.*; class Ideone{ public static void main(String[] args) throws Exception{ // your code goes here BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int n = Integer.parseInt(br.readLine()); start:for(int i=0;i=0;j--){ char c = str.charAt(j); if(c=='W'){ if(bus==0){ System.out.println("impossible"); continue start; } w++; }else if(c=='R'){ r++; }else if(c=='G'){ if(r==0){ System.out.println("impossible"); continue start; } r--; bus++; } } if(r==0 && w>=bus) System.out.println("possible"); else System.out.println("impossible"); } } }