#include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(ll i=0;i<n;i++)
#define repl(i,l,r) for(ll i=(l);i<(r);i++)
#define per(i,n) for(ll i=n-1;i>=0;i--)
#define perl(i,r,l) for(ll i=r-1;i>=l;i--)
#define fi first
#define se second
#define mp make_pair
#define pb push_back
#define ins insert
#define pqueue(x) priority_queue<x,vector<x>,greater<x>>
#define all(x) (x).begin(),(x).end()
#define CST(x) cout<<fixed<<setprecision(x)
#define vtpl(x,y,z) vector<tuple<x,y,z>>
#define rev(x) reverse(x);
using ll=long long;
using vl=vector<ll>;
using vvl=vector<vector<ll>>;
using pl=pair<ll,ll>;
using vpl=vector<pl>;
using vvpl=vector<vpl>;
const ll MOD=1000000007;
const ll MOD9=998244353;
const int inf=1e9+10;
const ll INF=4e18;
const ll dy[8]={1,0,-1,0,1,1,-1,-1};
const ll dx[8]={0,-1,0,1,1,-1,1,-1};
template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
int main(){
    ll a,b;cin >> a >>b;
    cout << 100 <<" " <<100 <<endl;
    vector<vector<char>> g(100,vector<char>(100,'.'));
    rep(i,50){
        rep(j,100){
            g[i][j]='#';
        }
    }
    a--;b--;
    ll i=0,j=0;
    while(a!=0){
        if(j%2==0){g[i][j]='.';a--;}
        j++;if(j==100){j=0;i+=2;}
    }
    i=99;j=99;
    while(b!=0){
        if(j%2==0){g[i][j]='#';b--;}
        j--;if(j==-1){j=99;i-=2;}
    }
    rep(i,100){
        rep(j,100){
            cout << g[i][j];
        }
        cout <<endl;
    }
}
#include<iostream>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>

using namespace std;

inline int read()
{
    int x=0;char ch=getchar();
    while(ch<'0' || '9'<ch)ch=getchar();
    while('0'<=ch && ch<='9')x=x*10+(ch^48),ch=getchar();
    return x;
}

const int M=1e5+9;

int m;
int a[M],b[M],top;

int main()
{
    int n=read(),m=read();
    int odd1=-1,odd2=-1;
    for(int i=1;i<=m;i++)
    {
        a[i]=read();
        if(a[i]&1)
        {
            if(odd1==-1)
                odd1=i;
            else if(odd2==-1)
                odd2=i;
            else
            {
                puts("Impossible");
                return 0;
            }
        }
    }

    if(m==1)
    {
        if(a[1]==1)
            printf("1\n1\n1\n");
        else
            printf("%d\n2\n1 %d\n",a[1],a[1]-1);
        return 0;
    }

    if(odd1!=-1)
        swap(a[1],a[odd1]);
    if(odd2!=-1)
        swap(a[m],a[odd2]);

    for(int i=1;i<=m;i++)
        printf("%d%c",a[i]," \n"[i==m]);

    if(a[m]==1)
    {
        printf("%d\n",m-1);
        printf("%d ",a[1]+1);
        for(int i=2;i<m;++i)
            printf("%d ",a[i]);
        puts("");
        return 0;
    }

    b[1]=a[1]+1;
    for(int i=2;i<m;i++)
        b[i]=a[i];
    b[m]=a[m]-1;

    printf("%d\n",m);
    for(int i=1;i<=m;i++)
        printf("%d%c",b[i]," \n"[i==m]);

    return 0;
}