#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
using namespace std;
template<class S,class T> ostream& operator<<(ostream& o,const pair<S,T> &p){
	return o<<"("<<p.fs<<","<<p.sc<<")";
}
template<class T> ostream& operator<<(ostream& o,const vector<T> &vc){
	o<<"{";
	for(const T& v:vc) o<<v<<",";
	o<<"}";
	return o;
}
using ll = long long;
template<class T> using V = vector<T>;
template<class T> using VV = vector<vector<T>>;
constexpr ll TEN(int n) { return (n == 0) ? 1 : 10 * TEN(n-1); }

#ifdef LOCAL
#define show(x) cerr << "LINE" << __LINE__ << " : " << #x << " = " << (x) << endl
#define dump(x) cerr << "LINE" << __LINE__ << " : " << #x << " = {";  \
	for(auto v: x) cerr << v << ","; cerr << "}" << endl;
#else
#define show(x) true
#define dump(x) true
#endif

using P = pair<int,int>;
int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);		//DON'T USE scanf/printf/puts !!
	cout << fixed << setprecision(20);

	int n; cin >> n;
	string A; cin >> A;
	int N = 1<<n;
	rep(i,N) rep(j,N){
		if((i&j) == j && A[i] == '1' && A[j] == '0'){
			cout << "Impossible" << endl;
			return 0;
		}
	}
	V<int> minimal0s;
	rep(i,N) if(A[i] == '0'){
		bool minimal = true;
		rep(j,i) if((i&j) == j && A[j] == '0') minimal = false;
		if(minimal) minimal0s.pb(i);
	}
	auto rev = [&](string s){
		reverse(all(s));
		for(char& c: s){
			if(c == 'l' || c == 'r') c ^= 'l'^'r';
			else c ^= 'u'^'d';
		}
		return s;
	};
	string ans;
	if(false){
		minimal0s.clear();
		n = 8; N = 1<<n;
		rep(i,N){
			if(__builtin_popcount(i) == 7) minimal0s.pb(i);
//			minimal0s.pb(i);
		}
	}
	for(int s: minimal0s){
		show(s);
		V<int> xs = {0};
		rep(i,n) if(s&1<<i) xs.pb(i+1);
		{
			V<int> ds;
			rep(i,xs.size()-1) ds.pb(xs[i+1]-xs[i]);
			xs = ds;
		}
		string t;
		int K = xs.size();
		for(int i=K-1;i>=0;i--){
			if(i == K-1){
				t = string(xs[i],'r') + "dlu" + string(xs[i]-1,'l');
			}else{
				string nt;
				nt += string(xs[i],'r');
				nt += t;
				nt += "ldru";
				nt += rev(t);
				nt += "dlu";
				nt += string(xs[i]-1,'l');
				t = nt;
			}
		}
		ans += t;
	}

	cout << "Possible" << endl;
	cout << ans.size() << endl;
//	return 0;
	int x=0,y=0; cout << x << " " << y << endl;
	for(char c: ans){
		if(c == 'r') x++;
		if(c == 'l') x--;
		if(c == 'd') y++;
		if(c == 'u') y--;
		cout << x << " " << y << endl;
	}
}
### Prompt

Create a solution in cpp for 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>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define rep1(i,n) for(int i=1;i<=(int)(n);i++)
#define all(c) c.begin(),c.end()
#define pb push_back
#define fs first
#define sc second
#define chmin(x,y) x=min(x,y)
#define chmax(x,y) x=max(x,y)
using namespace std;
template<class S,class T> ostream& operator<<(ostream& o,const pair<S,T> &p){
	return o<<"("<<p.fs<<","<<p.sc<<")";
}
template<class T> ostream& operator<<(ostream& o,const vector<T> &vc){
	o<<"{";
	for(const T& v:vc) o<<v<<",";
	o<<"}";
	return o;
}
using ll = long long;
template<class T> using V = vector<T>;
template<class T> using VV = vector<vector<T>>;
constexpr ll TEN(int n) { return (n == 0) ? 1 : 10 * TEN(n-1); }

#ifdef LOCAL
#define show(x) cerr << "LINE" << __LINE__ << " : " << #x << " = " << (x) << endl
#define dump(x) cerr << "LINE" << __LINE__ << " : " << #x << " = {";  \
	for(auto v: x) cerr << v << ","; cerr << "}" << endl;
#else
#define show(x) true
#define dump(x) true
#endif

using P = pair<int,int>;
int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);		//DON'T USE scanf/printf/puts !!
	cout << fixed << setprecision(20);

	int n; cin >> n;
	string A; cin >> A;
	int N = 1<<n;
	rep(i,N) rep(j,N){
		if((i&j) == j && A[i] == '1' && A[j] == '0'){
			cout << "Impossible" << endl;
			return 0;
		}
	}
	V<int> minimal0s;
	rep(i,N) if(A[i] == '0'){
		bool minimal = true;
		rep(j,i) if((i&j) == j && A[j] == '0') minimal = false;
		if(minimal) minimal0s.pb(i);
	}
	auto rev = [&](string s){
		reverse(all(s));
		for(char& c: s){
			if(c == 'l' || c == 'r') c ^= 'l'^'r';
			else c ^= 'u'^'d';
		}
		return s;
	};
	string ans;
	if(false){
		minimal0s.clear();
		n = 8; N = 1<<n;
		rep(i,N){
			if(__builtin_popcount(i) == 7) minimal0s.pb(i);
//			minimal0s.pb(i);
		}
	}
	for(int s: minimal0s){
		show(s);
		V<int> xs = {0};
		rep(i,n) if(s&1<<i) xs.pb(i+1);
		{
			V<int> ds;
			rep(i,xs.size()-1) ds.pb(xs[i+1]-xs[i]);
			xs = ds;
		}
		string t;
		int K = xs.size();
		for(int i=K-1;i>=0;i--){
			if(i == K-1){
				t = string(xs[i],'r') + "dlu" + string(xs[i]-1,'l');
			}else{
				string nt;
				nt += string(xs[i],'r');
				nt += t;
				nt += "ldru";
				nt += rev(t);
				nt += "dlu";
				nt += string(xs[i]-1,'l');
				t = nt;
			}
		}
		ans += t;
	}

	cout << "Possible" << endl;
	cout << ans.size() << endl;
//	return 0;
	int x=0,y=0; cout << x << " " << y << endl;
	for(char c: ans){
		if(c == 'r') x++;
		if(c == 'l') x--;
		if(c == 'd') y++;
		if(c == 'u') y--;
		cout << x << " " << y << endl;
	}
}
```