#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <stack>
#include <queue>
#include <set>
#include <map>
using namespace std;
#define MOD @
#define ADD(X,Y) ((X) = ((X) + (Y)%MOD) % MOD)
typedef long long i64; typedef vector<int> ivec; typedef vector<string> svec;

int N;
char A[300];
vector<pair<int, int>> ans;

/*
void draw_curve(int mask, bool flip = false)
{
	vector<pair<int, int>> seq;
	seq.push_back({0, 0});
	for (int i = 0; i < N; ++i) {
		pair<int, int> src = make_pair(i, (mask >> i) & 1);
		pair<int, int> dest = make_pair(i + 1, (mask >> i) & 1);
		if (seq.back() != src) seq.push_back(src);
		seq.push_back(dest);
	}
	if (seq.back().second == 1) seq.push_back({N, 0});
	for (int i = N - 1; i >= 0; --i) seq.push_back({i, 0});
	if (flip) reverse(seq.begin(), seq.end());
	for (int i = 1; i < seq.size(); ++i) ans.push_back(seq[i]);
}
*/
void draw_curve(int p, bool flip = false)
{
	vector<pair<int, int>> seq;
	for (int i = 0; i <= p; ++i) seq.push_back({i, 0});
	seq.push_back({p, 1});
	seq.push_back({p + 1, 1});
	for (int i = p + 1; i >= 0; --i) seq.push_back({i, 0});
	if (flip) reverse(seq.begin(), seq.end());
	for (int i = 1; i < seq.size(); ++i) ans.push_back(seq[i]);
}

int main()
{
	scanf("%d%s", &N, A);
	for (int i = 0; i < (1 << N); ++i) {
		if (A[i] == '0') {
			for (int j = 0; j < N; ++j) if ((i & (1 << j)) == 0) {
				if (A[i | (1 << j)] == '1') {
					puts("Impossible");
					return 0;
				}
			}
		}
	}
	if (A[0] == '0') {
		puts("Impossible");
		return 0;
	}
	puts("Possible");
	vector<int> minima;
	for (int i = 0; i < (1 << N); ++i) {
		if (A[i] == '0') {
			bool flg = true;
			for (int j = 0; j < N; ++j) {
				if ((i & (1 << j)) != 0 && A[i ^ (1 << j)] == '0') flg = false;
			}
			if (flg) minima.push_back(i);
		}
	}
	ans.push_back({0, 0});
	for (int m : minima) {
		vector<int> bits;
		for (int i = 0; i < N; ++i) if (m & (1 << i)) bits.push_back(i);
		vector<int> seq;
		seq.push_back(bits[0]);
		for (int i = 1; i < bits.size(); ++i) {
			vector<int> seq2;
			seq2.push_back(bits[i]);
			for (int j = 0; j < seq.size(); ++j) {
				seq2.push_back(seq[j]);
			}
			seq2.push_back(~bits[i]);
			for (int j = seq.size() - 1; j >= 0; --j) {
				seq2.push_back(~seq[j]);
			}
			seq = seq2;
		}
		for (int i = 0; i < seq.size(); ++i) {
			//if (seq[i] >= 0) printf("%d ", seq[i]);
			//else printf("!%d ", ~seq[i]);
			if (seq[i] >= 0) draw_curve(seq[i]);
			else draw_curve(~seq[i], true);
		}
	}
	printf("%d\n", ans.size() - 1);
	for (auto p : ans) printf("%d %d\n", p.first, p.second);
	return 0;
}
