#include <bits/stdc++.h>
using namespace std;
template <class c>
struct rge {
  c b, e;
};
template <class c>
rge<c> range(c i, c j) {
  return rge<c>{i, j};
}
template <class c>
auto dud(c* x) -> decltype(cerr << *x, 0);
template <class c>
char dud(...);
struct debug {
  template <class c>
  debug& operator<<(const c&) {
    return *this;
  }
};
template <typename T>
void db(T x) {
  debug() << ">>> " << x;
}
template <typename T>
void db(T x, T y) {
  debug() << ">>> " << x << " , " << y;
}
template <typename T>
void db(T x, T y, T z) {
  debug() << ">>> " << x << " , " << y << " , " << z;
}
template <typename T>
void db(T x, T y, T z, T a) {
  debug() << ">>> " << x << " , " << y << " , " << z << " , " << a;
}
const long long xx = 2e5;
const long long Mod = 1e9 + 7;
const long long inf = 1e18;
const long long Maxn = 20010;
void _p(vector<long long>& a) {
  for (long long i = 0; i < (long long)a.size(); i++) {
    cout << a[i] << " ";
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long n, k;
  cin >> n >> k;
  long long a, b, c, d;
  cin >> a >> b >> c >> d;
  if (n == 4 || k <= n) {
    cout << -1 << '\n';
    return 0;
  }
  vector<long long> Mid;
  for (long long i = 1; i <= n; i++) {
    if (i != a && i != b && i != c && i != d) {
      Mid.push_back(i);
    }
  }
  cout << a << " " << c << " ";
  _p(Mid);
  cout << d << " " << b << '\n';
  cout << c << " " << a << " ";
  _p(Mid);
  cout << b << " " << d << '\n';
}
