n = int(input()) bus = [] pair = [] for i in range(n): bus.append(input()) for t in bus: if t.count("G") == t.count("R"): for s in range(len(t)-1,0,-1): if t[s] == "R": pair.append("R") elif t[s] == "G" and pair.count("G") - pair.count("R"): pair.append("G") elif t[s] == "W": pass else: print("impossible") break else: print("possible") else: print("impossible") break