#include <stdio.h>
const int PMAX=390;
const int N=200;
int res[N][2], p[N][2], n, a;
int get()
{
    int r=0;
    for(int i=0; i<n; ++i)
        if(res[i][0]+res[i][1]>res[0][0]+res[0][1]) r++;
    return r;
}
int main()
{
    freopen("juggling.in", "r", stdin);
    freopen("juggling.out", "w", stdout);
    scanf("%d%d", &n, &a); a--;
    for(int j=0; j<2; ++j)
        for(int i=0; i<n; ++i)
        {
            scanf("%d", &p[i][j]);
            p[i][j]--;
        }
    for(int i=0; i<=n; ++i)
    {
        int pts=PMAX;
        for(int j=0; j<i; ++j)
            res[p[j][0]][0]=pts, pts--;
        pts=n-i;
        for(int j=i; j<n; ++j)
            res[p[j][0]][0]=pts, pts--;
        for(int j=0; j<=n; ++j)
        {
            pts=PMAX;
            for(int k=0; k<j; ++k)
                res[p[k][1]][1]=pts, pts--;
            pts=n-j;
            for(int k=j; k<n; ++k)
                res[p[k][1]][1]=pts, pts--;
            if(get()==a)
            {
                printf("Possible\n");
                for(int t=0; t<2; ++t)
                {
                    for(int k=0; k<n; ++k)
                        printf("%d ", res[p[k][t]][t]);
                    printf("\n");
                }
                return 0;
            }
        }
    }
    printf("Impossible");
    return 0;
}
