#include <bits/stdc++.h>
using namespace std;
int n, k, i, j, a, b, c, d;
void path() {
  printf("%d %d", a, c);
  for (i = 1; i <= n; i++) {
    if (i == a || i == b || i == c || i == d) continue;
    printf(" %d", i);
  }
  printf(" %d %d\n", d, b);
  swap(a, c);
  swap(b, d);
  printf("%d %d", a, c);
  for (i = 1; i <= n; i++) {
    if (i == a || i == b || i == c || i == d) continue;
    printf(" %d", i);
  }
  printf(" %d %d\n", d, b);
}
int main() {
  cin >> n >> k;
  cin >> a >> b >> c >> d;
  if (n <= 4 || k <= n)
    printf("-1\n");
  else
    path();
  return 0;
}
