#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return a * (b / (gcd(a, b))); }
inline int toInt(string s) {
  int v;
  istringstream sin(s);
  sin >> v;
  return v;
}
inline long long toLL(string s) {
  long long v;
  istringstream sin(s);
  sin >> v;
  return v;
}
template <class T>
inline string toString(T x) {
  ostringstream sout;
  sout << x;
  return sout.str();
}
using namespace std;
vector<int> felNos;
int main() {
  int N, E;
  int a, b, c, d;
  cin >> N >> E;
  if (N >= E || N == 4) {
    cout << "-1";
    return 0;
  }
  cin >> a >> b >> c >> d;
  for (int i = 1; i <= N; i++) {
    if (i != a && i != b && i != c && i != d) felNos.push_back(i);
  }
  int sz = ((int)((felNos).size()));
  printf("%d %d", a, c);
  for (int i = 0; i < sz; i++) printf(" %d", felNos[i]);
  printf(" %d %d", d, b);
  printf("\n");
  printf("%d %d", c, a);
  for (int i = 0; i < sz; i++) printf(" %d", felNos[i]);
  printf(" %d %d", b, d);
}
