#include<bits/stdc++.h>
#define register register
#define cs const
using std::cerr;
using std::cout;
using pii=std::pair<int,int>;
#define fi first
#define se second

std::string inv(std::string s){
	std::string res="";
	std::reverse(s.begin(),s.end());
	for(char c:s)
		if(isupper(c))res+=c-'A'+'a';
		else res+=c-'a'+'A';
	return res;
}

int n;
std::string A;

void Main(){
	std::cin>>n>>A;
	if(A[0]=='0')
	{
		puts("Impossible");
		return ;
	}
	int register i=0;
	while(i<(1<<n))
	{ 
		if(A[i]=='1')
		{
			int register j=i;
			while(j)
			{
				if(A[j]=='0')
				{
					puts("Impossible");
					return ;
				}
				j=i&(j-1);
			}
		}
		++i;
	}
	std::vector<pii> p({{0,0}});
	int register s=0;
	while(s<(1<<n))
	{
		if(A[s]=='0')
		{
			bool flag=true;
			int register t=s&(s-1);
			while((t)&&(flag))
			{
				if(A[t]=='0')flag=false;
				t=s&(t-1);
			}
			if(!flag)
			{
				++s;
				continue;
			}
			std::string q;
			int register i=0;
			while(i<n)
			{
				if(s&(1<<i))
				{
					if(q.empty()) q+='a'+i;
					else q=(char)('a'+i)+q+(char)('A'+i)+inv(q);
				}
				++i;
			}
			int nw=0;
			int k=0;
			while(k<q.size())
			{
				char c=q[k];
				int i,dir;
				if(isupper(c))
				{
					i=c-'A';
					dir=0;
				}
				else
				{ 
					i=c-'a';
					dir=1;
				}
				int j=nw+1;
				while(j<=i)
				{
					p.push_back({j,0});
					++j;
				}
				j=nw-1;
				while(j>=i)
				{
					p.push_back({j,0});
					--j;
				}
				nw=i;
				if(dir)
				{
					p.push_back({i,1});
					p.push_back({i+1,1});
					p.push_back({i+1,0});
					p.push_back({i,0});
				}
				else
				{
					p.push_back({i+1,0});
					p.push_back({i+1,1});
					p.push_back({i,1});
					p.push_back({i,0});
				}
				++k;
			}
			int j=nw-1;
			while(~j)
			{
				p.push_back({j,0});
				--j;
			}
		}
		++s;
	}
	cout<<"Possible\n"<<(p.size()-1)<<"\n";
	i=0;
	while(i<p.size())
	{
		cout<<p[i].fi<<" "<<p[i].se<<"\n";
		++i;
	}
}
signed main()
{
	Main();
	return 0;
}