#include <bits/stdc++.h>

using namespace std;
using ll = long long;
// #define int ll
using PII = pair<ll, ll>;

#define FOR(i, a, n) for (ll i = (ll)a; i < (ll)n; ++i)
#define REP(i, n) FOR(i, 0, n)
#define ALL(x) x.begin(), x.end()

template<typename T> T &chmin(T &a, const T &b) { return a = min(a, b); }
template<typename T> T &chmax(T &a, const T &b) { return a = max(a, b); }
template<typename T> bool IN(T a, T b, T x) { return a<=x&&x<b; }
template<typename T> T ceil(T a, T b) { return a/b + !!(a%b); }

template<typename T> vector<T> make_v(size_t a) { return vector<T>(a); }
template<typename T,typename... Ts>
auto make_v(size_t a,Ts... ts) {
    return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...));
}
template<typename T,typename V> typename enable_if<is_class<T>::value==0>::type
fill_v(T &t, const V &v) { t=v; }
template<typename T,typename V> typename enable_if<is_class<T>::value!=0>::type
fill_v(T &t, const V &v ) { for(auto &e:t) fill_v(e,v); }

template<class S,class T>
ostream &operator <<(ostream& out,const pair<S,T>& a){
    out<<'('<<a.first<<','<<a.second<<')'; return out;
}
template<typename T>
istream& operator >> (istream& is, vector<T>& vec){
    for(T& x: vec) {is >> x;} return is;
}
template<class T>
ostream &operator <<(ostream& out,const vector<T>& a){
    out<<'['; for(T i: a) {out<<i<<',';} out<<']'; return out;
}

int dx[] = {0, 1, 0, -1}, dy[] = {1, 0, -1, 0}; // DRUL
const int INF = 1<<30;
const ll LLINF = 1LL<<60;
const ll MOD = 1000000007;

signed main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);

    ll n, m;
    cin >> n >> m;
    vector<ll> a(m);
    REP(i, m) cin >> a[i];

    ll idx1 = -1, idx2 = -1;
    REP(i, m) {
        if(a[i]%2==0) continue;
        if(idx1 == -1) {
            idx1 = i;
        } else if(idx2 == -1) {
            idx2 = i;
        } else {
            cout << "Impossible" << endl;
            return 0;
        }
    }

    vector<ll> x;
    if(idx1 != -1) x.push_back(a[idx1]);
    REP(i, m) {
        if(i == idx1 || i == idx2) continue;
        x.push_back(a[i]);
    }
    if(idx2 != -1) x.push_back(a[idx2]);

    vector<ll> y;
    if(m == 1) {
        if(x[0]%2) {
            REP(j, x[0]/2) y.push_back(2);
            y.push_back(1);
        }
        else {
            bool flag = true;
            for(ll j=0; j<x[0]; ) {
                if(j==x[0]/2-1) {
                    y.push_back(1);
                    ++j;
                    flag = false;
                } else if(flag && j==x[0]/2) {
                    y.push_back(1);
                    ++j;
                } else if(j==x[0]-1) {
                    y.push_back(1);
                    ++j;
                } else {
                    y.push_back(2);
                    j += 2;
                }
            } 
        }
        goto end;
    }

    REP(i, m) {
        if(i == 0) {
            if(x[i]%2) {
                REP(j, x[i]/2+1) y.push_back(2);
            } else {
                bool flag = true;
                for(ll j=0; j<x[0]; ) {
                    if(j==x[0]/2-1) {
                        y.push_back(1);
                        ++j;
                        flag = false;
                    } else if(flag && j==x[0]/2) {
                        y.push_back(1);
                        ++j;
                    } else {
                        y.push_back(2);
                        j += 2;
                    }
                }
            }
        } else if(i == m-1) {
            if(x[i]%2) REP(j, x[i]/2) y.push_back(2);
            else {
                bool flag = true;
                for(ll j=1; j<x[i]; ) {
                    if(j==x[i]/2-1) {
                        y.push_back(1);
                        ++j;
                        flag = false;
                    } else if(flag && j==x[i]/2) {
                        y.push_back(1);
                        ++j;
                    } else if(j==x[i]-1) {
                        y.push_back(1);
                        ++j;
                    } else {
                        y.push_back(2);
                        j += 2;
                    }
                }
            }
        } else {
            bool turn = true;
            vector<ll> l, r;
            ll t = x[i];
            while(t) {
                if(t >= 4) {
                    if(turn) r.push_back(4);
                    else l.push_back(4);
                    t -= 4;
                } else {
                    if(turn) r.push_back(2);
                    else l.push_back(2);
                    t -= 2;
                }
                turn = !turn;
            }
            REP(j, l.size()) y.push_back(l[j]);
            for(ll j=(ll)r.size()-1; j>=0; --j) y.push_back(r[j]);
        }
    }

end:
    REP(i, m) cout << x[i] << (i==m-1?'\n':' ');
    cout << y.size() << endl;
    REP(i, y.size()) cout << y[i] << (i+1==y.size()?'\n':' ');
    cout << flush;

    return 0;
}


Measured memory_bytes: 892