#include <bits/stdc++.h>
int main(void) {
  int i;
  int n, k;
  int a, b, c, d;
  char city[1001];
  scanf("%d %d %d %d %d %d", &n, &k, &a, &b, &c, &d);
  if (n > 4 && k > n) {
    memset(city, 0, sizeof city);
    city[a] = city[b] = city[c] = city[d] = 1;
    printf("%d %d", a, c);
    for (i = 1; i <= n; i++)
      if (!city[i]) printf(" %d", i);
    printf(" %d %d\n", d, b);
    printf("%d %d", c, a);
    for (i = 1; i <= n; i++)
      if (!city[i]) printf(" %d", i);
    printf(" %d %d\n", b, d);
  } else
    printf("-1\n");
  return 0;
}
