#include <bits/stdc++.h>
using namespace std;

void fail(){
	cout << "Impossible" << '\n';
	exit(0);
}

mt19937 mt(48);

vector<int> inv(vector<int> x){
	reverse(x.begin(), x.end());
	for(int& a : x) a = -a;
	return x;
}

vector<int> make(vector<int> val){
	if(val.size() == 1){
		return val;
	}
	vector<int> nval[2];
	vector<int> nx[2];
	for(int i = 0; i < (int)val.size(); i++){
		nval[i & 1].push_back(val[i]);
	}
	nx[0] = make(nval[0]);
	nx[1] = make(nval[1]);
	vector<int> x;
	for(int r : nx[0]) x.push_back(r);
	for(int r : nx[1]) x.push_back(r);
	for(int r : inv(nx[0])) x.push_back(r);
	for(int r : inv(nx[1])) x.push_back(r);
	return x;
}

void pr(vector<int> x){
	vector<pair<int,int> > path;
	path.push_back({0, 0});
	for(int f : x){
		int c = 0;
		int val = abs(f) - 1;
		while(c < val){
			c++;
			path.push_back({c, 0});
		}
		if(f > 0){
			path.push_back({c, 1});
			path.push_back({c+1, 1});
			path.push_back({c+1, 0});
			path.push_back({c, 0});
		} else {
			path.push_back({c+1, 0});
			path.push_back({c+1, 1});
			path.push_back({c, 1});
			path.push_back({c, 0});
		}
		while(c > 0){
			c--;
			path.push_back({c, 0});
		}
	}
	cout << "Possible" << '\n';
	cout << (int)path.size() - 1 << '\n';
	for(pair<int,int> a : path){
		cout << a.first << ' ' << a.second << '\n';
	}
}

int main(){
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	int n;
	cin >> n;
	int N = (1 << n);
	string s(N, '0');
	cin >> s;
	// for(int j = 0; j < N; j++){
	// 	s[j] = "01"[(__builtin_popcount(j | (j >> 1)) <= 3)];
	// }

	for(int i = 0; i < N; i++){
		for(int j = 0; j < N; j++){
			if((i & j) == i){
				if(s[i] < s[j]){
					fail();
				}
			}
		}
	}
	vector<vector<int> > q;
	for(int i = 0; i < N; i++){
		if(s[i] == '1') continue;
		vector<int> val;
		bool fail = false;
		for(int j = 0; j < n; j++){
			if((i >> j) & 1){
				val.push_back((j+1));
				if(s[i ^ (1 << j)] == '0') fail = true;
			}
		}
		if(fail) continue;
		q.push_back(val);
	}
	vector<int> ans;
	for(vector<int> val : q){
		vector<int> z = make(val);
		for(int v : z) ans.push_back(v);
	}
	bool works = true;
	for(int j = 0; j < N; j++){
		vector<int> stk = {0};
		for(int f : ans){
			if((j >> (abs(f) - 1)) & 1){
				if(stk.back() == -f){
					stk.pop_back();
				} else {
					stk.push_back(f);
				}
			}
		}
		int wins = (stk.size() == 1);
		if(wins != s[j] - '0'){
			cerr << j << ' ' << wins << ' ' << (s[j] - '0') << '\n';
			works = false;
			break;
		}
	}
	cerr << ans.size() << '\n';
	for(int x : ans){
		cerr << x << ' ';
	}
	cerr << '\n';
	pr(ans);
}
### Prompt

In CPP, your task is to solve the following problem:

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.

Constraints

* 1 \leq N \leq 8
* A_i = 0,1 \quad (0 \leq i \leq 2^N-1)
* A_0 = 1

Input

Input is given from Standard Input in the following format:


N
A_0A_1 \cdots A_{2^N-1}


Output

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.

Examples

Input

1
10


Output

Possible
4
0 0
0 1
1 1
1 0
0 0


Input

2
1000


Output

Possible
6
1 0
2 0
2 1
1 1
0 1
0 0
1 0


Input

2
1001


Output

Impossible


Input

1
11


Output

Possible
0
1 1

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;

void fail(){
	cout << "Impossible" << '\n';
	exit(0);
}

mt19937 mt(48);

vector<int> inv(vector<int> x){
	reverse(x.begin(), x.end());
	for(int& a : x) a = -a;
	return x;
}

vector<int> make(vector<int> val){
	if(val.size() == 1){
		return val;
	}
	vector<int> nval[2];
	vector<int> nx[2];
	for(int i = 0; i < (int)val.size(); i++){
		nval[i & 1].push_back(val[i]);
	}
	nx[0] = make(nval[0]);
	nx[1] = make(nval[1]);
	vector<int> x;
	for(int r : nx[0]) x.push_back(r);
	for(int r : nx[1]) x.push_back(r);
	for(int r : inv(nx[0])) x.push_back(r);
	for(int r : inv(nx[1])) x.push_back(r);
	return x;
}

void pr(vector<int> x){
	vector<pair<int,int> > path;
	path.push_back({0, 0});
	for(int f : x){
		int c = 0;
		int val = abs(f) - 1;
		while(c < val){
			c++;
			path.push_back({c, 0});
		}
		if(f > 0){
			path.push_back({c, 1});
			path.push_back({c+1, 1});
			path.push_back({c+1, 0});
			path.push_back({c, 0});
		} else {
			path.push_back({c+1, 0});
			path.push_back({c+1, 1});
			path.push_back({c, 1});
			path.push_back({c, 0});
		}
		while(c > 0){
			c--;
			path.push_back({c, 0});
		}
	}
	cout << "Possible" << '\n';
	cout << (int)path.size() - 1 << '\n';
	for(pair<int,int> a : path){
		cout << a.first << ' ' << a.second << '\n';
	}
}

int main(){
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
	int n;
	cin >> n;
	int N = (1 << n);
	string s(N, '0');
	cin >> s;
	// for(int j = 0; j < N; j++){
	// 	s[j] = "01"[(__builtin_popcount(j | (j >> 1)) <= 3)];
	// }

	for(int i = 0; i < N; i++){
		for(int j = 0; j < N; j++){
			if((i & j) == i){
				if(s[i] < s[j]){
					fail();
				}
			}
		}
	}
	vector<vector<int> > q;
	for(int i = 0; i < N; i++){
		if(s[i] == '1') continue;
		vector<int> val;
		bool fail = false;
		for(int j = 0; j < n; j++){
			if((i >> j) & 1){
				val.push_back((j+1));
				if(s[i ^ (1 << j)] == '0') fail = true;
			}
		}
		if(fail) continue;
		q.push_back(val);
	}
	vector<int> ans;
	for(vector<int> val : q){
		vector<int> z = make(val);
		for(int v : z) ans.push_back(v);
	}
	bool works = true;
	for(int j = 0; j < N; j++){
		vector<int> stk = {0};
		for(int f : ans){
			if((j >> (abs(f) - 1)) & 1){
				if(stk.back() == -f){
					stk.pop_back();
				} else {
					stk.push_back(f);
				}
			}
		}
		int wins = (stk.size() == 1);
		if(wins != s[j] - '0'){
			cerr << j << ' ' << wins << ' ' << (s[j] - '0') << '\n';
			works = false;
			break;
		}
	}
	cerr << ans.size() << '\n';
	for(int x : ans){
		cerr << x << ' ';
	}
	cerr << '\n';
	pr(ans);
}
```