#include <bits/stdc++.h>
using std::cerr;using std::cin;using std::cout;using std::abs;using std::min;using std::max;using std::swap;using std::map;using std::unordered_map;using std::unordered_set;using std::bitset;using std::pair;using std::set;using std::string;using std::vector;using std::sort;using ll=long long;using uint=unsigned int;using pii=pair<int,int>;using pll=pair<ll,ll>;using ull = unsigned long long;using ld=long double;template<typename T>void _(const char*s,T h){cerr<<s<<" = "<<h<<"\n";}template<typename T,typename...Ts>void _(const char*s,T h,Ts...t){int b=0;while(((b+=*s=='(')-=*s==')')!=0||*s!=',')cerr<<*s++;cerr<<" = "<<h<<",";_(s+1,t...);}// break continue pop_back 998244353
#define int ll
#define pii pll
#define f first
#define s second
#define pb emplace_back
#define forn(i,n) for(int i=0;i<(n);++i)
#define sqr(x) ((x)*(x))
struct init{init(){cin.tie(0);std::iostream::sync_with_stdio(0);cout<<std::fixed<<std::setprecision(10);cerr<<std::fixed<<std::setprecision(5);}~init(){
#ifdef LOCAL
#define dbg(...) _(#__VA_ARGS__,__VA_ARGS__)
cerr<<"Time elapsed: "<<(double)clock()/CLOCKS_PER_SEC<<"s.\n";
#else
#define dbg(...) 
#endif
}}init;template<typename T,typename U>void upx(T&x,U y){if(x<y)x=y;}template<typename T,typename U>void upn(T&x,U y){if(x>y)x=y;}

const int N=2020;
int a[N];
vector<pii> ans={{0,0}};
int n;
string pep(vector<int> v,int x){
    string res;
    if(v.back()>x){
        res+=char('a'+x);
        res+=pep(v,x+1);
        res+=char('a'+x);
    }else{
        assert(v.back()==x);
        if(v.size()>1){
            v.pop_back();
            auto s=pep(v,x+1);
            res+=char('A'+x);
            res+=s;
            res+=char('A'+x);
            reverse(s.begin(), s.end());
            res+=char('a'+x);
            res+=s;
            res+=char('a'+x);
        }else{
            res+=char('A'+x);
            res+=char('a'+x);
        }
    }
    return res;
}
void add(int mask){
    vector<int> v;
    forn(i,n)if(mask>>i&1)v.pb(i);
    reverse(v.begin(), v.end());
    dbg(mask);
    string s=pep(v,0);
    dbg(mask,s);
    int x=0,y=0;
    for(char c:s){
        dbg(x,y,c);
        if('a'<=c&&c<='z'){
            int r=c-'a';
            if(r==x){
                if(!y){
                    ans.pb(x+1,0);
                }else{
                    ans.pb(x,0);
                    ans.pb(x+1,0);
                }
            }else{
                assert(r==x-1);
                if(!y){
                    ans.pb(x-1,0);
                }else{
                    ans.pb(x,0);
                    ans.pb(x-1,0);
                }
            }
        }else{
            int r=c-'A';
            if(r==x){
                if(!y){
                    ans.pb(x,1);
                    ans.pb(x+1,1);
                }else{
                    ans.pb(x+1,1);
                }
            }else{
                assert(r==x-1);
                if(!y){
                    ans.pb(x,1);
                    ans.pb(x-1,1);
                }else{
                    ans.pb(x-1,1);
                }
            }
        }
        x=ans.back().f;
        y=ans.back().s;
    }
}
int32_t main(){

    cin>>n;
    forn(i,1<<n){
        char c;
        cin>>c;
        a[i]=c-'0';
    }
    int ok=1;
    vector<int> kek;
    forn(m1,1<<n){
        forn(m2,1<<n){
            if((m1&m2)==m2){
                if(!a[m2]&&a[m1])ok=0;
            }
        }
        if(!a[m1]){
            int kok=1;
            forn(m2,1<<n){
                if((m1&m2)==m2&&m1!=m2){
                    if(!a[m2])kok=0;
                }
            }
            if(kok)kek.pb(m1);
        }
    }
    if(!ok){
        cout<<"Impossible\n";
        return 0;
    }
    for(int i:kek)add(i);
    cout<<"Possible\n";
    cout<<ans.size()-1<<'\n';
    for(pii p:ans)cout<<p.f<<' '<<p.s<<'\n';

    return 0;
}


Measured memory_bytes: 640