#include <bits/stdc++.h>
using namespace std;
//#define cerr if (false) cerr
#define db(x) cerr << #x << "=" << x << endl
#define db2(x, y) cerr << #x << "=" << x << "," << #y << "=" << y << endl
#define db3(x, y, z) cerr << #x << "=" << x << "," << #y << "=" << y << "," << #z << "=" << z << endl
#define dbv(v) cerr << #v << "="; for (auto _x : v) cerr << _x << ", "; cerr << endl
#define dba(a, n) cerr << #a << "="; for (int _i = 0; _i < (n); ++_i) cerr << a[_i] << ", "; cerr << endl
template <typename A, typename B>
ostream& operator<<(ostream& os, const pair<A, B>& x) {
	return os << "(" << x.first << "," << x.second << ")";
}
typedef long long ll;
typedef long double ld;
char str[305];
int main() {
	int n;
	scanf("%d%s", &n, str);
	int m = 1 << n;
	vector<int> S;
	bool sol = true;
	for (int i = 1; i < m; ++i) {
		bool bad = false;
		if (str[i] == '1') continue;
		for (int j = 0; j < n; ++j) {
			if (i & (1 << j)) {
				if (str[i ^ (1 << j)] == '0') bad = true;
			} else {
				if (str[i ^ (1 << j)] == '1') sol = false;
			}
		}
		if (!bad) S.push_back(i);
	}
	if (!sol) printf("Impossible\n");
	else {
		vector<pair<int, int>> ans = {{0, 0}};
		for (int b : S) {
			vector<pair<int, int>> curve;
			int las = -1;
			for (int i = n - 1; i >= 0; --i) {
				if (!(b & (1 << i))) continue;
				if (las == -1) {
					curve = {{i, 0}, {i, 1}, {i + 1, 1}, {i + 1, 0}, {i, 0}};
					las = i;
					continue;
				}
				vector<pair<int, int>> ncurve;
				ncurve.emplace_back(i, 0);
				for (int j = i; j <= las; ++j) ncurve.emplace_back(j, 1);
				ncurve.insert(ncurve.end(), curve.begin(), curve.end());
				for (int j = las; j >= i; --j) ncurve.emplace_back(j, 1);
				ncurve.emplace_back(i, 0);
				ncurve.emplace_back(i + 1, 0);
				for (int j = i + 1; j <= las; ++j) ncurve.emplace_back(j, 1);
				ncurve.insert(ncurve.end(), curve.rbegin(), curve.rend());
				for (int j = las; j >= i + 1; --j) ncurve.emplace_back(j, 1);
				ncurve.emplace_back(i + 1, 0);
				ncurve.emplace_back(i, 0);
				curve = ncurve;
				las = i;
			}
			if (las) {
				vector<pair<int, int>> ncurve = {{0, 0}};
				for (int j = 0; j <= las; ++j) ncurve.emplace_back(j, 1);
				ncurve.insert(ncurve.end(), curve.begin(), curve.end());
				for (int j = las; j >= 0; --j) ncurve.emplace_back(j, 1);
				ncurve.emplace_back(0, 0);
				curve = ncurve;
			}
			ans.pop_back();
			ans.insert(ans.end(), curve.begin(), curve.end());
		}
		printf("Possible\n%d\n", (int)ans.size() - 1);
		for (auto& a : ans) printf("%d %d\n", a.first, a.second);
	}
}
