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