#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
#include <algorithm>
#include <assert.h>
#include <bitset>
#include <cfloat>
#include <complex>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <limits.h>
#include <list>
#include <map>
#include <math.h>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <string.h>
#include <time.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,n) for(int i=1;i<=(n);i++)
#define int long long
#define ll long long
#define P pair<int,int>
#define prique(T) priority_queue<T,vector<T>,greater<T>>
#define all(V) V.begin(),V.end()
#ifdef int
constexpr int INF = LLONG_MAX / 10;
#else
constexpr int INF = INT_MAX / 10;
#endif
constexpr double eps = 1e-9;
template <class T, class U>
inline bool chmax(T& lhs, const U& rhs) {
	if (lhs < rhs) {
		lhs = rhs;
		return 1;
	}
	return 0;
}
template <class T, class U>
inline bool chmin(T& lhs, const U& rhs) {
	if (lhs > rhs) {
		lhs = rhs;
		return 1;
	}
	return 0;
}
using namespace std;
inline ll gcd(ll a, ll b) {
	while (b) {
		ll c = a;
		a = b; b = c % b;
	}
	return a;
}
inline ll lcm(ll a, ll b) {
	return a / gcd(a, b) * b;
}
bool isprime(ll n) {
	if (n == 1)return false;
	for (int i = 2; i * i <= n; i++) {
		if (n % i == 0)return false;
	}
	return true;
}
ll mypow(ll a, ll b) {
	if (!b)return 1;
	if (b & 1)return mypow(a, b - 1) * a;
	int memo = mypow(a, b >> 1);
	return memo * memo;
}
int n, m, a[110];
signed main() {
	cin >> n >> m;
	int oddcount = 0;
	rep(i, m) {
		cin >> a[i];
		if (a[i] & 1)oddcount++;
	}
	if (m == 1) {
		if (a[0] == 1) {
			cout << 1 << endl << 1 << endl << 1 << endl;
			return 0;
		}
		cout << a[0] << endl;
		cout << 2 << endl;
		cout << a[0] - 1 << " " << 1 << endl;
		return 0;
	}
	if (oddcount >= 3) {
		puts("Impossible");
		return 0;
	}
	if (oddcount == 2 && (n & 1)) {
		puts("Impossible");
		return 0;
	}
	REP(i, m - 1) {
		if (a[i] & 1) {
			if (a[0] & 1) {
				swap(a[i], a[m - 1]);
				break;
			}
			swap(a[0], a[i]);
		}
	}
	rep(i, m - 1)cout << a[i] << " ";
	cout << a[m - 1] << endl;
	if (a[0] != 1) {
		cout << m << endl;
		cout << a[0] - 1 << " ";
	}
	else cout << m - 1 << endl;
	REP(i, m - 2)cout << a[i] << " ";
	cout << a[m - 1] + 1 << endl;
	return 0;
}
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<algorithm>
#include<cmath>
#include<queue>
#include<vector>
#include<ctime>
#include<map>
#include<bitset>
#include<set>
#define LL long long
#define mp(x,y) make_pair(x,y)
#define pll pair<long long,long long>
#define pii pair<int,int>
using namespace std;
inline LL read()
{
	LL f=1,x=0;char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){x=x*10+ch-'0';ch=getchar();}
	return x*f;
}
int stack[20];
template<typename T>inline void write(T x)
{
	if(x<0){putchar('-');x=-x;}
    if(!x){putchar('0');return;}
    int top=0;
    while(x)stack[++top]=x%10,x/=10;
    while(top)putchar(stack[top--]+'0');
}
template<typename T>inline void pr1(T x){write(x);putchar(' ');}
template<typename T>inline void pr2(T x){write(x);putchar('\n');}
const int mod=998244353;
const int MAXN=3000005;
int pre[MAXN],inv[MAXN];
int C(int n,int m)
{
	if(n<m)return 0;
	return 1LL*pre[n]*inv[m]%mod*inv[n-m]%mod;
}
int n,m;
void ad(int &x,int y){x+=y;if(x>=mod)x-=mod;}
void dl(int &x,int y){x-=y;if(x<0)x+=mod;}
int pow_mod(int a,int b)
{
	int ret=1;
	while(b)
	{
		if(b&1)ret=1LL*ret*a%mod;
		a=1LL*a*a%mod;b>>=1;
	}
	return ret;
}
int main()
{
	pre[0]=1;for(int i=1;i<MAXN;i++)pre[i]=1LL*pre[i-1]*i%mod;
	inv[MAXN-1]=pow_mod(pre[MAXN-1],mod-2);
	for(int i=MAXN-2;i>=0;i--)inv[i]=1LL*inv[i+1]*(i+1)%mod;
	n=read();m=read();
	int ans=0;
	for(int i=0;i<=m;i++)
		if(!((3*m-i)&1))
			ad(ans,1LL*C(n,i)*C(((3*m-i)>>1)+n-1,n-1)%mod);
//	dl(ans,1LL*n*C(m-2+n-1,n-1)%mod);
	dl(ans,1LL*n*C(m-1+n-1,n-1)%mod);
	pr2(ans);
	return 0;
}


