#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

const int MAXN = 1e5;
const int MAXM = 100;

int N, M;
vector<int> V1, V2, A, B;

int main()
{
    int i, j;

    scanf("%d%d", &N, &M);
    int cnt=0;
    for(i=1; i<=M; i++)
    {
        int X; scanf("%d", &X);
        if(X%2) V2.push_back(X), cnt++;
        else V1.push_back(X);
    }
    if(cnt>2) return !printf("Impossible");

    if(cnt>0) A.push_back(V2[0]);
    for(i=0; i<V1.size(); i++) A.push_back(V1[i]);
    if(cnt>1) A.push_back(V2[1]);

    if(A.size()==1)
    {
        if(A[0]>1) B.push_back(A[0]-1);
        B.push_back(1);
    }
    else
    {
        B.push_back(A[0]+1);
        for(i=1; i+1<A.size(); i++) B.push_back(A[i]);
        if(A.back()>1) B.push_back(A.back()-1);
    }

    for(i=0; i<A.size(); i++) printf("%d ", A[i]);
    printf("\n%d\n", B.size());
    for(i=0; i<B.size(); i++) printf("%d ", B[i]);
}

#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <algorithm>
using namespace std;

template <typename T> inline void getint(T &num){
	register int ch, neg = 0;
	while(!isdigit(ch = getchar())) if(ch == '-') neg = 1;
	num = ch & 15;
	while(isdigit(ch = getchar())) num = num * 10 + (ch & 15);
	if(neg) num = -num;
}

int N, M, A[100005], cnt = 0;

int main(){
	getint(N), getint(M);
	for(register int i = 1; i <= M; i++) getint(A[i]);
	for(register int i = 1; i <= M; i++) if(A[i] & 1){
		if(++cnt == 1) swap(A[i], A[1]);
		else if(cnt == 2) swap(A[i], A[2]);
		else return puts("Impossible"), 0;
	}
	if(cnt) swap(A[cnt], A[M]);
	for(register int i = 1; i <= M; i++) printf("%d ", A[i]); puts("");
	if(cnt <= 1){
		printf("%d\n1 ", A[M] == 1 ? M : M + 1);
		for(register int i = 1; i < M; i++) printf("%d ", A[i]);
		if(A[M] > 1) printf("%d\n", A[M] - 1);
	}
	else{
		printf("%d\n%d ", A[M] == 1 ? M - 1 : M, A[1] + 1);
		for(register int i = 2; i < M; i++) printf("%d ", A[i]);
		if(A[M] > 1) printf("%d\n", A[M] - 1);
	}
	return 0;
}