#include <bits/stdc++.h>
using namespace std;
long long a[500005], b[500005], g, m = 1e7, siz, n, r;
int main() {
  ios_base::sync_with_stdio(0);
  long long k = 0, t = 0, x, sum = 0, q = 0, z = 0, y = 0, i, j, l, x1, y1, x2,
            y2;
  cin >> n >> m;
  cin >> x >> y >> j >> k;
  if (m < n + 1 || n == 4) {
    cout << "-1";
    return 0;
  }
  for (i = 1; i <= n; i++) {
    if (i != x && i != y && i != j && i != k) {
      z = i;
      break;
    }
  }
  a[0] = x;
  a[1] = j;
  a[2] = z;
  a[3] = y;
  a[4] = k;
  for (i = 0; i < 5; i++) {
    t = a[i];
    b[t] = 1;
  }
  for (i = 0; i < n; i++) {
    if (a[i] == 0) {
      for (j = 1; j <= n; j++)
        if (b[j] == 0) {
          b[j] = 1;
          a[i] = j;
          break;
        }
    }
  }
  cout << a[0];
  cout << " ";
  cout << a[1];
  cout << " ";
  cout << a[2];
  cout << " ";
  for (i = n - 1; i >= 3; i--) cout << a[i] << " ";
  cout << endl;
  cout << a[1];
  cout << " ";
  cout << a[0];
  cout << " ";
  for (i = 5; i < n; i++) cout << a[i] << " ";
  cout << a[2] << " ";
  cout << a[3] << " ";
  cout << a[4];
  return 0;
}
