#include <bits/stdc++.h>
using namespace std;
int fof[1005];
int fos[1005];
int mat[1005][1005];
bool isit[1005];
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  int i;
  int a, b, c, d;
  scanf("%d %d %d %d", &a, &b, &c, &d);
  memset(isit, false, sizeof(isit));
  fof[1] = a;
  fof[n] = b;
  isit[a] = true;
  isit[b] = true;
  fof[2] = c;
  fof[n - 1] = d;
  isit[c] = true;
  isit[d] = true;
  int j = 3;
  while (1) {
    if (j >= (n - 1)) break;
    for (i = 1; i <= n; i++) {
      if (isit[i] == false) {
        isit[i] = true;
        fof[j] = i;
        break;
      }
    }
    j++;
  }
  memset(isit, false, sizeof(isit));
  fos[1] = c;
  fos[n] = d;
  isit[c] = true;
  isit[d] = true;
  fos[2] = a;
  fos[n - 1] = b;
  isit[a] = true;
  isit[b] = true;
  j = 3;
  while (1) {
    if (j >= (n - 1)) break;
    for (i = 1; i <= n; i++) {
      if (isit[i] == false) {
        isit[i] = true;
        fos[j] = i;
        break;
      }
    }
    j++;
  }
  bool flag = true;
  for (i = 1; i < n; i++) {
    if (fof[i] == c) {
      if (fof[i + 1] == d) {
        flag = false;
        break;
      }
    } else if (fof[i] == d) {
      if (fof[i + 1] == c) {
        flag = false;
        break;
      }
    }
  }
  for (i = 1; i < n; i++) {
    if (fos[i] == a) {
      if (fos[i + 1] == b) {
        flag = false;
        break;
      }
    } else if (fos[i] == b) {
      if (fos[i + 1] == a) {
        flag = false;
        break;
      }
    }
  }
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= n; j++) {
      mat[i][j] = 0;
    }
  }
  for (i = 1; i < n; i++) {
    int minn = min(fof[i], fof[i + 1]);
    int maxx = max(fof[i], fof[i + 1]);
    mat[minn][maxx] = 1;
  }
  for (i = 1; i < n; i++) {
    int minn = min(fos[i], fos[i + 1]);
    int maxx = max(fos[i], fos[i + 1]);
    mat[minn][maxx] = 1;
  }
  int cnt = 0;
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= n; j++) {
      if (mat[i][j] == 1) {
        cnt++;
      }
    }
  }
  if (cnt <= k) {
  } else {
    flag = false;
  }
  if (flag == false) {
    printf("-1\n");
  } else {
    for (i = 1; i <= n; i++) {
      printf("%d ", fof[i]);
    }
    printf("\n");
    for (i = 1; i <= n; i++) {
      printf("%d ", fos[i]);
    }
    printf("\n");
  }
  return 0;
}
