#include <bits/stdc++.h>
using namespace std;
const int INF = 2 * int(1e9);
const long long INFll = 1ll * int(1e9) * int(1e9);
const int MOD = 1000000007;
template <typename T>
ostream& operator<<(ostream& out, pair<T, T>& a) {
  out << a.first << " " << a.second;
  return out;
}
template <typename T>
istream& operator>>(istream& in, pair<T, T>& a) {
  in >> a.first >> a.second;
  return in;
}
template <typename T>
istream& operator>>(istream& in, vector<T>& a) {
  for (int i = 0; i < a.size(); ++i) in >> a[i];
  return in;
}
template <typename T>
ostream& operator<<(ostream& out, vector<T> a) {
  for (int i = 0; i < a.size(); ++i)
    if (i == a.size() - 1)
      out << a[i];
    else
      out << a[i] << " ";
  return out;
}
int findv(vector<int>& a, int b) {
  for (int i = 0; i < a.size(); ++i)
    if (a[i] == b) return i;
}
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  int n, k;
  cin >> n >> k;
  if (k == n - 1) {
    cout << "-1";
    return 0;
  }
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  a--, b--, c--, d--;
  srand(35);
  vector<int> x;
  for (int i = 0; i < n; ++i) x.push_back(i);
  int iter = 0;
  while (1) {
    iter++;
    if (iter == 501) break;
    random_shuffle(x.begin(), x.end());
    set<pair<int, int> > edges;
    bool good = 1;
    vector<int> p1, p2;
    p1.push_back(a);
    p2.push_back(c);
    if (rand() % 3 == 0) {
      int posa = findv(x, a);
      int posb = findv(x, b);
      swap(x[posa], x[0]);
      swap(x[posb], x.back());
      int posc = findv(x, c);
      int posd = findv(x, d);
      swap(x[posc], x[1]);
      swap(x[posd], x[n - 2]);
    }
    for (int i : x)
      if (i != a && i != b) {
        edges.insert(make_pair(p1.back(), i));
        edges.insert(make_pair(i, p1.back()));
        p1.push_back(i);
      }
    edges.insert(make_pair(p1.back(), b));
    edges.insert(make_pair(b, p1.back()));
    p1.push_back(b);
    for (int i : x)
      if (i != c && i != d) {
        edges.insert(make_pair(p2.back(), i));
        edges.insert(make_pair(i, p2.back()));
        p2.push_back(i);
      }
    edges.insert(make_pair(p2.back(), d));
    edges.insert(make_pair(d, p2.back()));
    p2.push_back(d);
    if (edges.size() > 2 * k || edges.count(make_pair(a, b)) ||
        edges.count(make_pair(c, d)))
      good = 0;
    if (0) cerr << edges.size() / 2 << endl;
    if (good) {
      for (int& i : p1) i++;
      for (int& i : p2) i++;
      cout << p1 << endl << p2 << endl;
      return 0;
    }
  }
  cout << -1;
  if (0)
    cerr << fixed << setprecision(0)
         << "TIME = " << clock() / (long double)CLOCKS_PER_SEC * 1000 << "\n";
  return 0;
}
