#include <bits/stdc++.h>
using namespace std;
int p1[5005];
int p2[5005];
vector<int> second;
int main() {
  int n, i, j, k, a, b, c, d;
  scanf("%d %d", &n, &k);
  scanf("%d %d %d %d", &a, &b, &c, &d);
  if (n < 5 || k < n + 1) {
    cout << -1;
    return 0;
  }
  p1[1] = a;
  p1[n] = b;
  p1[2] = d;
  p1[n - 1] = c;
  for (i = 1; i <= n; i++) {
    if (i != d && i != c && i != b && i != a) second.push_back(i);
  }
  for (i = 3; i <= n - 2; i++) {
    p1[i] = second[i - 3];
  }
  p2[1] = c;
  p2[n] = d;
  p2[2] = b;
  p2[n - 1] = a;
  for (i = 3; i <= n - 2; i++) {
    p2[i] = p1[n - i + 1];
  }
  for (i = 1; i <= n; i++) {
    printf("%d ", p1[i]);
  }
  cout << endl;
  for (i = 1; i <= n; i++) {
    printf("%d ", p2[i]);
  }
  return 0;
}
