#include <bits/stdc++.h>
using namespace std;
template <class t, class u>
void chmax(t& first, u second) {
  if (first < second) first = second;
}
template <class t, class u>
void chmin(t& first, u second) {
  if (second < first) first = second;
}
int first, second, c, d;
bool check(int x) { return !(first == x || second == x || c == x || d == x); }
int main() {
  int n, m;
  scanf("%d", &n);
  scanf("%d", &m);
  scanf("%d", &first);
  scanf("%d", &second);
  scanf("%d", &c);
  scanf("%d", &d);
  if (m < n + 1 || n == 4) return !printf("-1\n");
  vector<int> path(n);
  assert(n > 4);
  path[0] = first;
  path[n - 1] = second;
  path[1] = c;
  path[n - 2] = d;
  int pointr = 1;
  for (int i = 2; i < n - 2; i++) {
    while (!check(pointr)) pointr++;
    path[i] = pointr++;
  }
  for (int i = 0; i < n; i++) printf("%d ", path[i]);
  printf("\n");
  printf("%d %d ", path[1], path[0]);
  for (int i = n - 3; i > 1; i--) printf("%d ", path[i]);
  printf("%d %d\n", path[n - 1], path[n - 2]);
  return 0;
}
