#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  if (n <= 4 || k < n + 1)
    cout << "-1\n";
  else {
    int a, b, c, d, ind = 1;
    cin >> a >> b >> c >> d;
    vector<int> V(n + 1), order(n);
    V[a] = V[b] = V[c] = V[d] = 1;
    order[0] = a, order[1] = c, order[n - 2] = d, order[n - 1] = b;
    for (int i = 0; i < n; ++i) {
      if (order[i]) continue;
      while (V[ind]) ind++;
      V[ind] = 1;
      order[i] = ind;
    }
    for (int i = 0; i < n; ++i) cout << order[i] << " ";
    cout << "\n";
    cout << c << " " << a << " ";
    for (int i = 2; i < n - 2; ++i) cout << order[i] << " ";
    cout << b << " " << d << "\n";
  }
  return 0;
}
