#include <bits/stdc++.h>
using namespace std;
template <class T>
T min(T a, T b, T c) {
  return min(a, min(b, c));
}
template <class T>
T max(T a, T b, T c) {
  return max(a, max(b, c));
}
int n, k, a, b, c, d, ans[5005];
int main() {
  scanf("%d%d", &n, &k);
  scanf("%d%d%d%d", &a, &b, &c, &d);
  if (n == 4 || k < n + 1)
    puts("-1");
  else {
    ans[1] = a;
    ans[2] = c;
    int i = 3;
    for (int u = (1); u <= (n); ++u) {
      if (u != a && u != b && u != c && u != d) {
        ans[i++] = u;
      }
    }
    ans[n - 1] = d;
    ans[n] = b;
    for (int i = (1); i <= (n); ++i) printf("%d ", ans[i]);
    puts("");
    swap(ans[1], ans[2]);
    swap(ans[n - 1], ans[n]);
    for (int i = (1); i <= (n); ++i) printf("%d ", ans[i]);
    puts("");
  }
  return 0;
}
