//Author:xht37
#include <bits/stdc++.h>

#define ui unsigned int
#define ll long long
#define ul unsigned ll
#define ld long double

#define pi pair <int, int>
#define fi first
#define se second
#define mp make_pair

#define ls (p << 1)
#define rs (ls | 1)
#define md ((t[p].l + t[p].r) >> 1)

#define vi vector <int>
#define pb push_back
#define pq priority_queue

#define dbg(x) cerr << #x" = " << x << endl
#define debug(...) fprintf(stderr, __VA_ARGS__)

#define fl(x) freopen(x".in", "r", stdin), freopen(x".out", "w", stdout)

using namespace std;

namespace io {
	const int SI = 1 << 21 | 1;
	char IB[SI], *IS, *IT, OB[SI], *OS = OB, *OT = OS + SI - 1, c, ch[100];
	int f, t;
	#define gc() (IS == IT ? (IT = (IS = IB) + fread(IB, 1, SI, stdin), IS == IT ? EOF : *IS++) : *IS++)
	inline void flush() {
		fwrite(OB, 1, OS - OB, stdout), OS = OB;
	}
	inline void pc(char x) {
		*OS++ = x;
		if (OS == OT) flush();
	}
	template <class I>
	inline void rd(I &x) {
		for (f = 1, c = gc(); c < '0' || c > '9'; c = gc()) if (c == '-') f = -1;
		for (x = 0; c >= '0' && c <= '9'; x = (x << 3) + (x << 1) + (c & 15), c = gc());
		x *= f;
	}
	template <class I>
	inline void rd(I &x, I &y) {
		rd(x), rd(y);
	}
	template <class I>
	inline void rd(I &x, I &y, I &z) {
		rd(x), rd(y), rd(z);
	}
	template <class I>
	inline void rda(I *a, int n) {
		for (int i = 1; i <= n; i++) rd(a[i]);
	}
	inline void rdc(char &c) {
		for (c = gc(); c < 33 || c > 126; c = gc());
	}
	inline void rds(char *s, int &x) {
		for (c = gc(); c < 33 || c > 126; c = gc());
		for (x = 0; c >= 33 && c <= 126; s[++x] = c, c = gc());
		s[x+1] = '\0';
	}
	template <class I>
	inline void print(I x, char k = '\n') {
		if (!x) pc('0');
		if (x < 0) pc('-'), x = -x;
		while (x) ch[++t] = x % 10 + '0', x /= 10;
		while (t) pc(ch[t--]);
		pc(k);
	}
	template <class I>
	inline void print(I x, I y) {
		print(x, ' '), print(y);
	}
	template <class I>
	inline void print(I x, I y, I z) {
		print(x, ' '), print(y, ' '), print(z);
	}
	inline void printc(char c) {
		pc(c);
	}
	inline void prints(string s) {
		int x = s.length();
		while (t < x) pc(s[t++]);
		pc('\n'), t = 0;
	}
	struct Flush {
		~Flush() {
			flush();
		}
	} flusher;
}
using io::rd;
using io::rda;
using io::rdc;
using io::rds;
using io::print;
using io::printc;
using io::prints;

#define Fail prints("Impossible"), exit(0)
#define vp vector<pi>
int n, f[1<<8|1];
string s;
vp p[1<<8|1], ans(1, mp(0, 0));

inline bool pd(int i) {
	for (int j = (i - 1) & i; j; j = (j - 1) & i)
		if (s[j] == '0') return 0;
	return 1;
}

inline void merge(vp &a, vp b) {
	for (pi o : b) a.pb(o);
}

//inline vp prime(vp a) {
//	for (pi &o : a) o.se ^= 1;
//	return a;
//}

inline vp work(int i) {
	if (p[i].size()) return p[i];
	int j = i & -i, k = f[j];
	p[i].pb(mp(k, 1));
	p[i].pb(mp(k + 1, 1));
	vp t = work(i - j);
	merge(p[i], t);
	p[i].pb(mp(k + 1, 1));
	p[i].pb(mp(k, 1));
	p[i].pb(mp(k, 0));
	p[i].pb(mp(k + 1, 0));
	p[i].pb(mp(k + 1, 1));
	reverse(t.begin(), t.end());
	merge(p[i], t);
	p[i].pb(mp(k + 1, 1));
	p[i].pb(mp(k + 1, 0));
	p[i].pb(mp(k, 0));
	p[i].pb(mp(k, 1));
	return p[i];
}

inline vp get(pi a, pi b) {
	vp ret(1, a);
	if (a.se != b.se) return ret.pb(b), ret;
	while (a != b)
		a.fi += a.fi < b.fi ? 1 : -1, ret.pb(a);
	return ret;
}

inline vp update(vp a) {
	if (a.size() == 1u) return a;
	vp b;
	for (ui i = 1; i < a.size(); i++) merge(b, get(a[i-1], a[i]));
	return b;
}

//inline void print(vp ans) {
//	ans.erase(unique(ans.begin(), ans.end()), ans.end());
//	dbg(ans.size() - 1);
//	for (pi o : ans) debug("%d %d\n", o.fi, o.se);
//}

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0), cout.tie(0);
	cin >> n >> s;
	if (s[0] == '0') Fail;
	for (int i = 0; i < (1 << n); i++)
		if (s[i] == '1')
			for (int j = i; j; j = (j - 1) & i)
				if (s[j] == '0') Fail;
	for (int i = 0; i < n; i++) {
		f[1<<i] = i;
		p[1<<i].pb(mp(i, 1));
		p[1<<i].pb(mp(i + 1, 1));
		p[1<<i].pb(mp(i + 1, 0));
		p[1<<i].pb(mp(i, 0));
		p[1<<i].pb(mp(i, 1));
	}
	for (int i = 0; i < (1 << n); i++)
		if (s[i] == '0' && pd(i))
			ans.pb(mp(0, 1)), merge(ans, work(i)),
			ans.pb(mp(0, 1)), ans.pb(mp(0, 0));
//	print(work(6));
	ans = update(ans);
	ans.erase(unique(ans.begin(), ans.end()), ans.end());
	prints("Possible");
	print(ans.size() - 1);
	for (pi o : ans) print(o.fi, o.se);
	return 0;
}
### Prompt

Develop a solution in CPP to the problem described below:

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
//Author:xht37
#include <bits/stdc++.h>

#define ui unsigned int
#define ll long long
#define ul unsigned ll
#define ld long double

#define pi pair <int, int>
#define fi first
#define se second
#define mp make_pair

#define ls (p << 1)
#define rs (ls | 1)
#define md ((t[p].l + t[p].r) >> 1)

#define vi vector <int>
#define pb push_back
#define pq priority_queue

#define dbg(x) cerr << #x" = " << x << endl
#define debug(...) fprintf(stderr, __VA_ARGS__)

#define fl(x) freopen(x".in", "r", stdin), freopen(x".out", "w", stdout)

using namespace std;

namespace io {
	const int SI = 1 << 21 | 1;
	char IB[SI], *IS, *IT, OB[SI], *OS = OB, *OT = OS + SI - 1, c, ch[100];
	int f, t;
	#define gc() (IS == IT ? (IT = (IS = IB) + fread(IB, 1, SI, stdin), IS == IT ? EOF : *IS++) : *IS++)
	inline void flush() {
		fwrite(OB, 1, OS - OB, stdout), OS = OB;
	}
	inline void pc(char x) {
		*OS++ = x;
		if (OS == OT) flush();
	}
	template <class I>
	inline void rd(I &x) {
		for (f = 1, c = gc(); c < '0' || c > '9'; c = gc()) if (c == '-') f = -1;
		for (x = 0; c >= '0' && c <= '9'; x = (x << 3) + (x << 1) + (c & 15), c = gc());
		x *= f;
	}
	template <class I>
	inline void rd(I &x, I &y) {
		rd(x), rd(y);
	}
	template <class I>
	inline void rd(I &x, I &y, I &z) {
		rd(x), rd(y), rd(z);
	}
	template <class I>
	inline void rda(I *a, int n) {
		for (int i = 1; i <= n; i++) rd(a[i]);
	}
	inline void rdc(char &c) {
		for (c = gc(); c < 33 || c > 126; c = gc());
	}
	inline void rds(char *s, int &x) {
		for (c = gc(); c < 33 || c > 126; c = gc());
		for (x = 0; c >= 33 && c <= 126; s[++x] = c, c = gc());
		s[x+1] = '\0';
	}
	template <class I>
	inline void print(I x, char k = '\n') {
		if (!x) pc('0');
		if (x < 0) pc('-'), x = -x;
		while (x) ch[++t] = x % 10 + '0', x /= 10;
		while (t) pc(ch[t--]);
		pc(k);
	}
	template <class I>
	inline void print(I x, I y) {
		print(x, ' '), print(y);
	}
	template <class I>
	inline void print(I x, I y, I z) {
		print(x, ' '), print(y, ' '), print(z);
	}
	inline void printc(char c) {
		pc(c);
	}
	inline void prints(string s) {
		int x = s.length();
		while (t < x) pc(s[t++]);
		pc('\n'), t = 0;
	}
	struct Flush {
		~Flush() {
			flush();
		}
	} flusher;
}
using io::rd;
using io::rda;
using io::rdc;
using io::rds;
using io::print;
using io::printc;
using io::prints;

#define Fail prints("Impossible"), exit(0)
#define vp vector<pi>
int n, f[1<<8|1];
string s;
vp p[1<<8|1], ans(1, mp(0, 0));

inline bool pd(int i) {
	for (int j = (i - 1) & i; j; j = (j - 1) & i)
		if (s[j] == '0') return 0;
	return 1;
}

inline void merge(vp &a, vp b) {
	for (pi o : b) a.pb(o);
}

//inline vp prime(vp a) {
//	for (pi &o : a) o.se ^= 1;
//	return a;
//}

inline vp work(int i) {
	if (p[i].size()) return p[i];
	int j = i & -i, k = f[j];
	p[i].pb(mp(k, 1));
	p[i].pb(mp(k + 1, 1));
	vp t = work(i - j);
	merge(p[i], t);
	p[i].pb(mp(k + 1, 1));
	p[i].pb(mp(k, 1));
	p[i].pb(mp(k, 0));
	p[i].pb(mp(k + 1, 0));
	p[i].pb(mp(k + 1, 1));
	reverse(t.begin(), t.end());
	merge(p[i], t);
	p[i].pb(mp(k + 1, 1));
	p[i].pb(mp(k + 1, 0));
	p[i].pb(mp(k, 0));
	p[i].pb(mp(k, 1));
	return p[i];
}

inline vp get(pi a, pi b) {
	vp ret(1, a);
	if (a.se != b.se) return ret.pb(b), ret;
	while (a != b)
		a.fi += a.fi < b.fi ? 1 : -1, ret.pb(a);
	return ret;
}

inline vp update(vp a) {
	if (a.size() == 1u) return a;
	vp b;
	for (ui i = 1; i < a.size(); i++) merge(b, get(a[i-1], a[i]));
	return b;
}

//inline void print(vp ans) {
//	ans.erase(unique(ans.begin(), ans.end()), ans.end());
//	dbg(ans.size() - 1);
//	for (pi o : ans) debug("%d %d\n", o.fi, o.se);
//}

int main() {
	ios::sync_with_stdio(0);
	cin.tie(0), cout.tie(0);
	cin >> n >> s;
	if (s[0] == '0') Fail;
	for (int i = 0; i < (1 << n); i++)
		if (s[i] == '1')
			for (int j = i; j; j = (j - 1) & i)
				if (s[j] == '0') Fail;
	for (int i = 0; i < n; i++) {
		f[1<<i] = i;
		p[1<<i].pb(mp(i, 1));
		p[1<<i].pb(mp(i + 1, 1));
		p[1<<i].pb(mp(i + 1, 0));
		p[1<<i].pb(mp(i, 0));
		p[1<<i].pb(mp(i, 1));
	}
	for (int i = 0; i < (1 << n); i++)
		if (s[i] == '0' && pd(i))
			ans.pb(mp(0, 1)), merge(ans, work(i)),
			ans.pb(mp(0, 1)), ans.pb(mp(0, 0));
//	print(work(6));
	ans = update(ans);
	ans.erase(unique(ans.begin(), ans.end()), ans.end());
	prints("Possible");
	print(ans.size() - 1);
	for (pi o : ans) print(o.fi, o.se);
	return 0;
}
```