#include <bits/stdc++.h>
const long long MOD = 1E9 + 7;
const long long N = 1e3 + 15;
const int maxn = 5e5 + 15;
const int letter = 130;
const int INF = 1e17;
const double pi = acos(-1.0);
const double eps = 1e-10;
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
int n, k, p[N];
int a, b, c, d;
int main() {
  scanf("%d%d", &n, &k);
  scanf("%d%d%d%d", &a, &b, &c, &d);
  p[a] = p[b] = p[c] = p[d] = 1;
  if (n < 5 || k < n + 1) {
    puts("-1");
    return 0;
  }
  if (n == 5) {
    for (int i = 1; i <= n; i++) {
      if (!p[i]) {
        printf("%d %d %d %d %d\n", a, c, i, d, b);
        printf("%d %d %d %d %d\n", c, a, i, b, d);
        return 0;
      }
    }
  }
  printf("%d %d ", a, c);
  for (int i = 1; i <= n; i++) {
    if (!p[i]) printf("%d ", i);
  }
  printf("%d %d\n", d, b);
  printf("%d %d ", c, a);
  for (int i = 1; i <= n; i++) {
    if (!p[i]) printf("%d ", i);
  }
  printf("%d %d\n", b, d);
  return 0;
}
