#include <bits/stdc++.h>
using namespace std;
int main() {
  ifstream fin("input.txt");
  int i = 0, j = 0, k = 0, smmx = 0, bgmx = 1000000;
  int n, a, b, c, d, p = 0, m = 0;
  cin >> n >> m;
  cin >> a >> b >> c >> d;
  vector<int> vc(n + 1);
  p = 1;
  for (i = 0; i < 4; i++) {
    if (p == a || p == b || p == c || p == d) {
      p++;
    }
  }
  vc[1] = a;
  vc[2] = c;
  vc[n] = b;
  vc[n - 1] = d;
  for (i = 1; i <= n; i++) {
    if (!vc[i]) {
      vc[i] = p;
      p++;
      while (p == a || p == b || p == c || p == d) p++;
    }
  }
  if (n == 4) {
    cout << -1 << endl;
    return 0;
  }
  if (m < n + 1) {
    cout << -1 << endl;
    return 0;
  }
  for (i = 0; i < n; i++) {
    cout << vc[i + 1] << " ";
  }
  cout << endl;
  for (i = 1; i <= n; i++) {
    if (i == 1) {
      cout << vc[2] << " ";
    } else if (i == 2) {
      cout << vc[1] << " ";
    } else if (i == n) {
      cout << vc[n - 1] << " ";
    } else if (i == n - 1) {
      cout << vc[n] << " ";
    } else {
      cout << vc[i] << " ";
    }
  }
  cout << endl;
  return 0;
}
