#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5005;
int n, k;
vector<int> res;
int a, b, c, d;
bool used[MAXN];
int main() {
  cin >> n >> k;
  cin >> a >> b >> c >> d;
  a--;
  b--;
  c--;
  d--;
  if (k <= n || n == 4) {
    cout << -1;
    return 0;
  }
  res.resize(n);
  res[n - 1] = b;
  res[0] = a;
  res[n - 2] = d;
  res[1] = c;
  used[a] = used[b] = used[c] = used[d] = true;
  int ptr = 2;
  for (int i = 0; i < (int)(n); ++i) {
    if (!used[i]) res[ptr++] = i;
  }
  for (int i = 0; i < (int)(n); ++i) cout << res[i] + 1 << ' ';
  cout << '\n';
  swap(res[0], res[1]);
  swap(res[n - 1], res[n - 2]);
  for (int i = 0; i < (int)(n); ++i) cout << res[i] + 1 << ' ';
  cin >> n;
  return 0;
}
