#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a < b) return (gcd(b, a));
  if (b == 0) return a;
  return gcd(b, a % b);
}
map<int, vector<int>> M;
vector<int> ds(1003, 0);
vector<int> dt(1003, 0);
void BFSs(int root) {
  queue<int> q;
  q.push(root);
  map<int, int> m1;
  m1[root] = 1;
  ds[root] = 0;
  int c = 0;
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    c++;
    for (int c : M[x]) {
      if (m1.count(c) == 0) {
        q.push(c);
        m1[c] = 1;
        ds[c] = ds[x] + 1;
      }
    }
  }
}
void BFSt(int root) {
  queue<int> q;
  q.push(root);
  map<int, int> m1;
  m1[root] = 1;
  dt[root] = 0;
  int c = 0;
  while (!q.empty()) {
    int x = q.front();
    q.pop();
    c++;
    for (int c : M[x]) {
      if (m1.count(c) == 0) {
        q.push(c);
        m1[c] = 1;
        dt[c] = dt[x] + 1;
      }
    }
  }
}
int main() {
  int n, k, a, b, c, d, C = 0, i;
  cin >> n >> k >> a >> b >> c >> d;
  vector<int> v;
  if (n == 4) {
    cout << -1;
    return (0);
  }
  for (i = 1; i <= n; i++) {
    if (i != a && i != b && i != c && i != d) {
      v.push_back(i);
      C++;
    }
  }
  if (k >= (n + 1)) {
    cout << a << " " << c << " ";
    for (i = 0; i < C; i++) cout << v[i] << " ";
    cout << d << " " << b << endl;
    cout << c << " " << a << " ";
    for (i = 0; i < C; i++) cout << v[i] << " ";
    cout << b << " " << d << endl;
  } else
    cout << -1;
}
