#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;

#define each(i,a) for (auto&& i : a)
#define FOR(i,a,b) for (ll i=(a),__last_##i=(b);i<__last_##i;i++)
#define RFOR(i,a,b) for (ll i=(b)-1,__last_##i=(a);i>=__last_##i;i--)
#define REP(i,n) FOR(i,0,n)
#define RREP(i,n) RFOR(i,0,n)
#define __GET_MACRO3(_1, _2, _3, NAME, ...) NAME
#define rep(...) __GET_MACRO3(__VA_ARGS__, FOR, REP)(__VA_ARGS__)
#define rrep(...) __GET_MACRO3(__VA_ARGS__, RFOR, RREP)(__VA_ARGS__)
#define pb push_back
#define all(a) (a).begin(),(a).end()
#define chmin(x,v) x = min(x, v)
#define chmax(x,v) x = max(x, v)

const ll linf = 1e18;
const double eps = 1e-12;
const double pi = acos(-1);

template<typename T>
istream& operator>>(istream& is, vector<T>& vec) {
    each(x,vec) is >> x;
    return is;
}
template<typename T>
ostream& operator<<(ostream& os, const vector<T>& vec) {
    rep(i,vec.size()) {
        if (i) os << " ";
        os << vec[i];
    }
    return os;
}
template<typename T>
ostream& operator<<(ostream& os, const vector< vector<T> >& vec) {
    rep(i,vec.size()) {
        if (i) os << endl;
        os << vec[i];
    }
    return os;
}
class UnionFind {
    vector<int> par, h;
public:
    UnionFind(int size) {
        par.assign(size, 0);
        h.assign(size, 0);
        rep(i, size) par[i] = i;
    }
    void unite(int u, int v) {
        u = root(u), v = root(v);
        if (u == v) return;
        if (h[u] > h[v]) {
            par[v] = u;
        }
        else if (h[u] < h[v]) {
            par[u] = v;
        }
        else {
            ++h[u];
            par[v] = u;
        }
    }
    bool isUnited(int u, int v) {
        return root(u) == root(v);
    }
    int root(int v) {
        if (par[v] == v) return v;
        return par[v] = root(par[v]);
    }
};

bool check(const vector<ll>& a, const vector<ll>& b) {
    ll n = 0, m = 0;
    each(x, a) n += x;
    each(x, b) m += x;
    assert(n == m);
    UnionFind uf(n);
    auto add = [&](const vector<ll>& v) {
        ll base = 0;
        each(x, v) {
            rep(i, x/2) uf.unite(base+i, base+x-i-1);
            base += x;
        }
    };
    add(a);
    add(b);
    set<ll> s;
    rep(i, n) s.insert(uf.root(i));
    return s.size() == 1;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll n, m; cin >> n >> m;
    vector<ll> A(m); cin >> A;
    n = 0;
    each(x, A) n += x;
    try {
        vector<ll> even;
        vector<ll> odd;
        each(x, A) {
            if (x % 2) odd.pb(x);
            else even.pb(x);
        }
        if (odd.size() >= 3) throw -1;
        sort(all(even));
        vector<ll> a;
        vector<ll> b;
        if (odd.size() == 2) {
            a.pb(odd[0]);
            each(x, even) a.pb(x);
            a.pb(odd[1]);
        }
        else if (odd.size() == 1) {
            a = even;
            a.pb(odd[0]);
        }
        else {
            a = even;
        }
        if (m == 1) {
            b.pb(1);
            b.pb(a[0]-1);
        }
        else {
            rep(i, m) {
                if (i == 0) b.pb(a[i]-1);
                else if (i == m-1) b.pb(a[i]+1);
                else b.pb(a[i]);
            }
        }
        vector<ll> nb;
        each(x, b) if (x > 0) nb.pb(x);
        b = nb;
        cout << a << endl;
        cout << b.size() << endl;
        cout << b << endl;
        assert(check(a, b));
    }
    catch (int err) {
        cout << "Impossible" << endl;
    }
}


Measured memory_bytes: 1024