#include #define int long long const int inf=8938103643641919514ll; const int mod=1000000007; const int dd[]={0,-1,0,1,0}; using namespace std; int a,b,c,d; char p[100000][3]; unordered_set se; vector ve; void saiki(int u){ if(u==a){ for(int i=0;i>a; for(i=0;i>p[i]; saiki(0); cout<<"Impossible"<