Problem: Given are a positive integer N and a sequence of length 2^N consisting of 0s and 1s: A_0,A_1,\ldots,A_{2^N-1}. Determine whether there exists a closed curve C that satisfies the condition below for all 2^N sets S \subseteq \\{0,1,\ldots,N-1 \\}. If the answer is yes, construct one such closed curve.

* Let x = \sum_{i \in S} 2^i and B_S be the set of points \\{ (i+0.5,0.5) | i \in S \\}.
* If there is a way to continuously move the closed curve C without touching B_S so that every point on the closed curve has a negative y-coordinate, A_x = 1.
* If there is no such way, A_x = 0.



For instruction on printing a closed curve, see Output below.

Constraints

* 1 \leq N \leq 8
* A_i = 0,1 \quad (0 \leq i \leq 2^N-1)
* A_0 = 1

Input

Input is given from Standard Input in the following format:


N
A_0A_1 \cdots A_{2^N-1}


Output

If there is no closed curve that satisfies the condition, print `Impossible`.

If such a closed curve exists, print `Possible` in the first line. Then, print one such curve in the following format:


L
x_0 y_0
x_1 y_1
:
x_L y_L


This represents the closed polyline that passes (x_0,y_0),(x_1,y_1),\ldots,(x_L,y_L) in this order.

Here, all of the following must be satisfied:

* 0 \leq x_i \leq N, 0 \leq y_i \leq 1, and x_i, y_i are integers. (0 \leq i \leq L)
* |x_i-x_{i+1}| + |y_i-y_{i+1}| = 1. (0 \leq i \leq L-1)
* (x_0,y_0) = (x_L,y_L).



Additionally, the length of the closed curve L must satisfy 0 \leq L \leq 250000.

It can be proved that, if there is a closed curve that satisfies the condition in Problem Statement, there is also a closed curve that can be expressed in this format.

Examples

Input

1
10


Output

Possible
4
0 0
0 1
1 1
1 0
0 0


Input

2
1000


Output

Possible
6
1 0
2 0
2 1
1 1
0 1
0 0
1 0


Input

2
1001


Output

Impossible


Input

1
11


Output

Possible
0
1 1

Solution (in CPP):

Solution:
//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;
}