#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:256000000")
using namespace std;
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  if (n == 4 || k <= n) {
    cout << -1;
    return 0;
  }
  int a, b, c, d;
  scanf("%d %d %d %d", &a, &b, &c, &d);
  printf("%d %d ", a, c);
  for (int i = 1; i <= n; i++)
    if (i != a && i != b && i != c && i != d) printf("%d ", i);
  printf("%d %d\n", d, b);
  printf("%d %d ", c, a);
  for (int i = 1; i <= n; i++)
    if (i != a && i != b && i != c && i != d) printf("%d ", i);
  printf("%d %d\n", b, d);
}
