//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;
}

Measured memory_bytes: 1024