#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 34;
const int maxlog = 20;
const int mod = 1e9 + 7;
const int sq = 720;
const int inf = 1e9;
int arr[maxn];
int perm1[maxn], perm2[maxn];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cout.precision(20);
  int n, k;
  cin >> n >> k;
  if (k < n + 1) {
    cout << -1;
    return 0;
  }
  if (n == 4) {
    cout << -1;
    return 0;
  }
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  if (n <= 7) {
    for (int i = 0; i < n; i++) {
      perm1[i] = i + 1;
      perm2[i] = i + 1;
    }
    while (next_permutation(perm1, perm1 + n)) {
      while (next_permutation(perm2, perm2 + n)) {
        if (perm1[0] != a || perm2[0] != c || perm1[n - 1] != b ||
            perm2[n - 1] != d)
          continue;
        map<pair<long long, long long>, bool> m;
        for (int i = 1; i < n; i++) {
          int t1 = min(perm1[i], perm1[i - 1]);
          int t2 = max(perm1[i], perm1[i - 1]);
          m[make_pair(t1, t2)] = true;
        }
        for (int i = 1; i < n; i++) {
          int t1 = min(perm2[i], perm2[i - 1]);
          int t2 = max(perm2[i], perm2[i - 1]);
          m[make_pair(t1, t2)] = true;
        }
        if (m.size() > k) continue;
        if (m[make_pair(a, b)] || m[make_pair(b, a)] || m[make_pair(c, d)] ||
            m[make_pair(d, c)])
          continue;
        for (int i = 0; i < n; i++) cout << perm1[i] << " ";
        cout << endl;
        for (int i = 0; i < n; i++) cout << perm2[i] << " ";
        return 0;
      }
    }
    cout << -1;
    return 0;
  }
  arr[1] = a;
  arr[2] = c;
  arr[n] = b;
  arr[n - 1] = d;
  int cur = 1;
  for (int i = 3; i <= n - 2; i++) {
    while (cur == a || cur == b || cur == c || cur == d) cur++;
    arr[i] = cur;
    cur++;
  }
  for (int i = 1; i <= n; i++) cout << arr[i] << " ";
  cout << endl;
  swap(arr[1], arr[2]);
  swap(arr[n], arr[n - 1]);
  for (int i = 1; i <= n; i++) cout << arr[i] << " ";
  return 0;
}
