import sequtils,strutils,strscans,algorithm,math,future,sets,queues,tables template get*():string = stdin.readLine() template times*(n:int,body:untyped): untyped = (for _ in 0..= W or ny >= H or nx < 0 or ny < 0 : continue if nx == prex and ny == prey : continue if stages[nx][ny] != num: continue if colors[nx][ny] != currentColor: colors[nx][ny] = currentColor dfs(nx,ny,x,y) else: echo "possible" quit() dfs(x,y,-1,-1) echo "impossible"