#include <bits/stdc++.h>
long long p = 1000000007;
using namespace std;
long long sq(long long i) { return i * i; }
long long fact(long n) {
  long ans = 1;
  for (long i = 1; i <= n; i++) ans = (ans * i) % p;
  return ans;
}
void dfs(vector<long> v[], vector<long> &df, long cov[], long i) {
  df.push_back(i);
  for (long j = 0; j < v[i].size(); j++) {
    if (cov[v[i][j]] == 0) {
      cov[v[i][j]] = cov[i];
      dfs(v, df, cov, v[i][j]);
    }
  }
}
void djikstra(vector<pair<long, long>> v[], long d[], long par[], long s,
              long n) {
  for (long i = 0; i < n; i++) {
    d[i] = 1000000001;
    par[i] = -1;
  }
  par[s] = s;
  d[s] = 0;
  bool cov[n];
  for (long i = 0; i < n; i++) cov[i] = 0;
  long u = -1;
  for (int j = 0; j < n; j++) {
    u = -1;
    for (long i = 0; i < n; i++) {
      if (!cov[i] && (d[i] < d[u] || u == -1)) u = i;
    }
    cov[u] = 1;
    for (long i = 0; i < v[u].size(); i++) {
      if (d[v[u][i].first] > d[u] + v[u][i].second) {
        d[v[u][i].first] = d[u] + v[u][i].second;
        par[v[u][i].first] = u;
      }
    }
  }
}
long findConnComp(vector<long> v[], long cov[], long n) {
  long j = 0;
  vector<long> df;
  for (long i = 0; i < n; i++) cov[i] = 0;
  for (long i = 0; i < n; i++) {
    if (!cov[i]) {
      cov[i] = ++j;
      dfs(v, df, cov, i);
    }
  }
  return j;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long n, k;
  cin >> n >> k;
  if (k < n + 1 || n == 4)
    cout << -1;
  else {
    long a, b, c, d;
    cin >> a >> b >> c >> d;
    long x[n];
    for (long i = 0; i < n; i++) x[i] = 1;
    long j = 1;
    x[0] = a;
    x[1] = c;
    x[n - 2] = d;
    x[n - 1] = b;
    for (long i = 2; i < n - 2; i++) {
      while (1) {
        if (j != a && j != b && j != c && j != d)
          break;
        else
          j++;
      }
      x[i] = j++;
    }
    for (long i = 0; i < n; i++) cout << x[i] << " ";
    cout << "\n";
    cout << x[1] << " " << x[0] << " ";
    for (long i = 2; i < n - 2; i++) cout << x[i] << " ";
    cout << x[n - 1] << " " << x[n - 2];
  }
}
