output_description: If there is no closed curve that satisfies the condition, print `Impossible`.
  
  If such a closed curve exists, print `Possible` in the first line. Then, print
  one such curve in the following format:
  
      
      
      L
      x_0 y_0
      x_1 y_1
      :
      x_L y_L
      
  
  This represents the closed polyline that passes
  (x_0,y_0),(x_1,y_1),\ldots,(x_L,y_L) in this order.
  
  Here, all of the following must be satisfied:
  
    * 0 \leq x_i \leq N, 0 \leq y_i \leq 1, and x_i, y_i are integers. (0 \leq i \leq L)
    * |x_i-x_{i+1}| + |y_i-y_{i+1}| = 1. (0 \leq i \leq L-1)
    * (x_0,y_0) = (x_L,y_L).
  
  Additionally, the length of the closed curve L must satisfy 0 \leq L \leq
  250000.
  
  It can be proved that, if there is a closed curve that satisfies the condition
  in Problem Statement, there is also a closed curve that can be expressed in
  this format.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
      A_0A_1 \cdots A_{2^N-1}
attempt: import sys
  
  N = int(input())
  
  on = 0
  for i in range(1 << N):
      a = int(sys.stdin.read(1))
      if bin(i).count("1") == 1 and not a:
          on |= i
      if not a ^ bool(i & on):
          print("Impossible")
          break
  else:
      raise ValueError
  
problem_description: Statement
  
  Given are a positive integer N and a sequence of length 2^N consisting of 0s
  and 1s: A_0,A_1,\ldots,A_{2^N-1}. Determine whether there exists a closed
  curve C that satisfies the condition below for all 2^N sets S \subseteq
  \\{0,1,\ldots,N-1 \\}. If the answer is yes, construct one such closed curve.
  
    * Let x = \sum_{i \in S} 2^i and B_S be the set of points \\{ (i+0.5,0.5) | i \in S \\}.
    * If there is a way to continuously move the closed curve C without touching B_S so that every point on the closed curve has a negative y-coordinate, A_x = 1.
    * If there is no such way, A_x = 0.
  
  For instruction on printing a closed curve, see Output below.
samples: [{"input": "1\n    10", "output": "Possible\n    4\n    0 0\n    0 1\n    1 1\n    1 0\n    0 0\n    \n\nWhen S = \\emptyset, we can move this curve so that every point on it has a\nnegative y-coordinate.\n\n![](https://img.atcoder.jp/agc043/d44ca639698b4c14bb84b90da5442ca6.png)\n\nWhen S = \\\\{0\\\\}, we cannot do so.\n\n![](https://img.atcoder.jp/agc043/5a960a0c4167e8593b6c8f8af685253d.png)\n\n* * *"}, {"input": "2\n    1000", "output": "Possible\n    6\n    1 0\n    2 0\n    2 1\n    1 1\n    0 1\n    0 0\n    1 0\n    \n\nThe output represents the following curve:\n\n![](https://img.atcoder.jp/agc043/283e490d520a451f1b15160900c9b545.png)\n\n* * *"}, {"input": "2\n    1001", "output": "Impossible\n    \n\n* * *"}, {"input": "1\n    11", "output": "Possible\n    0\n    1 1"}]