#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:167177216")
using namespace std;
const int MAXN = 2 * 1000 * 1000 + 500;
const double EPS = 1e-9;
int main(int argc, char* argv[]) {
  int n, k;
  cin >> n >> k;
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  vector<int> ans(n, -1);
  ans[0] = a;
  ans[n - 1] = b;
  set<int> used;
  used.insert(a);
  used.insert(b);
  if (k <= n || n == 4) {
    cout << -1;
    return 0;
  }
  ans[0] = a;
  ans[n - 1] = b;
  ans[1] = c;
  ans[n - 2] = d;
  used.insert(a);
  used.insert(b);
  used.insert(c);
  used.insert(d);
  int curst = 1;
  for (int i = 0; i < n; i++) {
    if (ans[i] == -1) {
      while (used.count(curst)) curst++;
      ans[i] = curst;
      used.insert(curst);
    }
  }
  for (int i = 0; i < n; i++) cout << ans[i] << ' ';
  cout << endl;
  cout << ans[1] << ' ' << ans[0] << ' ';
  for (int i = 2; i < n - 2; i++) cout << ans[i] << ' ';
  cout << ans[n - 1] << ' ' << ans[n - 2];
  return 0;
}
