#include <bits/stdc++.h>
const bool debugging = 1;
const long long mod = 1e9 + 7;
using namespace std;
template <class T>
ostream &operator<<(ostream &os, vector<T> V) {
  for (auto v : V) {
    os << v << " ";
  }
  return os << "";
}
template <class T>
ostream &operator<<(ostream &os, vector<vector<T>> V) {
  for (long long i = 0; i < V.size(); i++) {
    for (long long j = 0; j < V[i].size(); j++) {
      os << V[i][j] << " ";
    }
    os << "\n";
  }
  return os << "";
}
template <class T>
ostream &operator<<(ostream &os, set<T> S) {
  for (auto s : S) {
    os << s << " ";
  }
  return os << "";
}
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> P) {
  return os << P.first << " " << P.second;
}
template <class L, class R>
ostream &operator<<(ostream &os, map<L, R> M) {
  os << "\n";
  for (auto m : M) {
    os << m << "\n";
  }
  return os << "";
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long N, K;
  cin >> N >> K;
  long long a, b, c, d;
  cin >> a >> b >> c >> d;
  set<long long> vals;
  for (long long i = 1; i <= N; i++) {
    vals.insert(i);
  }
  vals.erase(a);
  vals.erase(b);
  vals.erase(c);
  vals.erase(d);
  if (N == 4) {
    cout << -1 << "\n";
  } else {
    if (K >= N + 1) {
      cout << a << " " << c << " " << vals << d << " " << b << "\n";
      cout << c << " " << a << " " << vals << b << " " << d << "\n";
    } else {
      cout << -1 << "\n";
    }
  }
  return 0;
}
