//by yjz
#include<bits/stdc++.h>
using namespace std;
#define FF first
#define SS second
#define PB push_back
#define MP make_pair
#ifndef LOCAL
#define cerr if(0)cout
#endif
typedef long long ll;
//My i/o stream
struct fastio
{
	char s[100000];
	int it, len;
	fastio() {it=len=0;}
	inline char get()
	{
		if (it<len) return s[it++]; it=0;
		len=fread(s, 1, 100000, stdin);
		if (len==0) return EOF; else return s[it++];
	}
	bool notend()
	{
		char c=get();
		while (c==' '||c=='\n') c=get();
		if (it>0) it--;
		return c!=EOF;
	}
}_buff;
#define geti(x) x=getnum()
#define getii(x,y) geti(x),geti(y)
#define getiii(x,y,z) getii(x,y),geti(z)
#define puti(x) putnum(x),putchar(' ')
#define putii(x,y) puti(x),puti(y)
#define putiii(x,y,z) putii(x,y),puti(z)
#define putsi(x) putnum(x),putchar('\n')
#define putsii(x,y) puti(x),putsi(y)
#define putsiii(x,y,z) putii(x,y),putsi(z)
inline ll getnum()
{
	ll r=0; bool ng=0; char c; c=_buff.get();
	while (c!='-'&&(c<'0'||c>'9')) c=_buff.get();
	if (c=='-') ng=1, c=_buff.get();
	while (c>='0'&&c<='9') r=r*10+c-'0', c=_buff.get();
	return ng?-r:r;
}
template <class T> inline void putnum(T x)
{
	if (x<0) putchar('-'), x=-x;
	register short a[20]={}, sz=0;
	while (x) a[sz++]=x%10, x/=10;
	if(sz==0) putchar('0');
	for (int i=sz-1; i>=0; i--) putchar('0'+a[i]);
}
inline char getreal() {char c=_buff.get(); while (c<=32) c=_buff.get(); return c;}

const int mod = 1e9+7;
ll qpow(ll x, ll k) {return k==0? 1: 1ll*qpow(1ll*x*x%mod,k>>1)*(k&1?x:1)%mod;}
int n;
char s[257];
char revc(char c)
{
	if (c>='a'&&c<='z') return 'A'+c-'a';
	else return 'a'+c-'A';
}
string getf(int msk)
{
	string ret;
	if (__builtin_popcount(msk)==1)
	{
		ret.PB(__builtin_ctz(msk)+'a');
		return ret;
	}
	else
	{
		int x = __builtin_ctz(msk&(-msk));
		int nmsk = msk-(1<<x);
		string t = getf(nmsk);
		ret += t;
		ret.PB('a'+x);
		reverse(t.begin(), t.end());
		for (int i=0; i<t.size(); i++) t[i] = revc(t[i]);
		ret += t;
		ret.PB('A'+x);
		return ret;
	}
}
vector<pair<int,int> > rt;
int curx, cury;
void go(int x, int y)
{
	while (curx<x) curx++, rt.PB(MP(curx, cury));
	while (curx>x) curx--, rt.PB(MP(curx, cury));
	while (cury<y) cury++, rt.PB(MP(curx, cury));
	while (cury>y) cury--, rt.PB(MP(curx, cury));
}
void out(string s)
{
	assert(s.size()<250000);
	curx = cury = 0;
	rt.PB(MP(0, 0));

	for (int i=0; i<s.size(); i++)
	{
		bool f;
		int x;
		if (s[i]>='a'&&s[i]<='z')
		{
			f = true;
			x = s[i]-'a';
		}
		else
		{
			f = false;
			x = s[i]-'A';
		}
		if (f)
		{
			go(x, 0);
			go(x, 1);
			go(x+1, 1);
			go(x+1, 0);
		}
		else
		{
			go(x+1, 0);
			go(x+1, 1);
			go(x, 1);
			go(x, 0);
		}
	}
	go(0, 0);
}
int main()
{
	cin>>n;
	cin>>s;
	for (int i=0; i<(1<<n); i++)
	{
		if (s[i]=='1')
		{
			for (int j=0; j<(1<<n); j++)
			{
				if ((i&j)==j&&s[j]=='0')
				{
					puts("Impossible");
					return 0;
				}
			}
		}
	}
	puts("Possible");
	string ans;
	vector<int> v;
	for (int i=0; i<(1<<n); i++)
	{
		if (s[i]=='0')
		{
			bool f = true;
			for (int j=0; j<i; j++)
			{
				if ((i&j)==j)
				{
					f &= s[j]=='1';
				}
			}
			if (f)
			{
				string t = getf(i);
				ans += t;
				if ((i&(-i))!=i) for (auto c : t) ans += revc(c);
			}
		}
	}
	cerr<<ans<<endl;
	out(ans);
	putsi(rt.size()-1);
	for (int i=0; i<rt.size(); i++) putsii(rt[i].FF, rt[i].SS);
	return 0;
}


Measured memory_bytes: 640