#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const long long INF = 4e18;
const int MAX_LOG = 21;
const int MAX_N = (1 << 17);
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k, a, b, c, d;
  cin >> n >> k >> a >> b >> c >> d;
  if (n < 5 || k < n + 1) {
    cout << -1 << endl;
  } else {
    int arr[n];
    arr[0] = a, arr[n - 1] = b, arr[1] = c, arr[n - 2] = d;
    vector<bool> taken(n + 1);
    taken[a] = taken[b] = taken[c] = taken[d] = true;
    int id = 1;
    for (int i = 2; i < n - 2; i++) {
      while (taken[id]) {
        id++;
      }
      arr[i] = id;
      taken[id] = true;
    }
    for (int i = 0; i < n; i++) {
      cout << arr[i] << " ";
    }
    cout << endl;
    vector<int> v;
    v.push_back(c);
    v.push_back(a);
    v.push_back(arr[2]);
    for (int i = 3; i <= n - 3; i++) {
      v.push_back(arr[i]);
    }
    v.push_back(b);
    v.push_back(d);
    for (int x : v) {
      cout << x << " ";
    }
    cout << endl;
  }
}
