#include <bits/stdc++.h>
using namespace std;
const int cn = 1e4;
int pc, pd, n, x[cn], z[cn], r;
void pcbpd() {
  r = 0;
  for (int i = pc; i < n; i++, r++) x[r] = z[i];
  for (int i = pc - 1; i > pd; i--, r++) x[r] = z[i];
  for (int i = 0; i <= pd; i++, r++) x[r] = z[i];
}
void pcmpd() {
  r = 0;
  for (int i = pc; i >= 0; i--, r++) x[r] = z[i];
  for (int i = pc + 1; i < pd; i++, r++) x[r] = z[i];
  for (int i = n - 1; i >= pd; i--, r++) x[r] = z[i];
}
int main() {
  int k, a, b, c, d, t = 1;
  cin >> n >> k >> a >> b >> c >> d;
  if (k < n + 1 || n == 4) {
    cout << -1;
    return 0;
  }
  for (int i = 2; i < n - 2; i++) {
    while (t == a || t == b || t == c || t == d) ++t;
    z[i] = t;
    ++t;
  }
  z[1] = c;
  z[n - 2] = d;
  z[0] = a;
  z[n - 1] = b;
  for (int i = 0; i < n; i++) {
    if (z[i] == c)
      pc = i;
    else if (z[i] == d)
      pd = i;
  }
  int j = 0, f = 0;
  if (pc > pd) {
    pcbpd();
    for (int i = 0; i < n - 1; i++)
      if (x[i] == a && x[i + 1] == b) {
        swap(pc, pd);
        pcmpd();
        f = 1;
      }
  } else {
    pcmpd();
    for (int i = 0; i < n - 1; i++)
      if (x[i] == a && x[i + 1] == b) {
        swap(pc, pd);
        pcbpd();
        f = 1;
      }
  }
  if (f)
    for (int i = 0; i < n / 2; i++) swap(x[i], x[n - i - 1]);
  for (int i = 0; i < n; i++) cout << z[i] << ' ';
  cout << '\n';
  for (int i = 0; i < n; i++) cout << x[i] << ' ';
  return 0;
}
