#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:102400000,102400000")
using namespace std;
const int INF = 0x3f3f3f3f;
const long long INFF = 0x3f3f;
const double pi = acos(-1.0);
const double inf = 1e18;
const double eps = 1e-9;
const long long mod = 1e9 + 7;
const unsigned long long mxx = 1333331;
inline void RI(int &x) {
  char c;
  while ((c = getchar()) < '0' || c > '9')
    ;
  x = c - '0';
  while ((c = getchar()) >= '0' && c <= '9') x = (x << 3) + (x << 1) + c - '0';
}
int ans[1005];
int vis[1005];
int main() {
  int n, k;
  while (cin >> n >> k) {
    int a, b, c, d;
    cin >> a >> b >> c >> d;
    memset(vis, 0, sizeof(vis));
    memset(ans, 0, sizeof(ans));
    if (k < n + 1 || n == 4)
      printf("-1\n");
    else {
      ans[1] = a;
      ans[n] = d;
      ans[2] = c;
      ans[n - 1] = b;
      vis[a] = 1, vis[b] = 1, vis[c] = 1, vis[d] = 1;
      int pos = 1;
      for (int i = 3; i <= n - 1; i++) {
        if (ans[i]) continue;
        while (vis[pos]) pos++;
        ans[i] = pos;
        vis[pos] = 1;
        pos++;
      }
      printf("%d %d ", a, c);
      for (int i = 3; i <= n - 2; i++) printf("%d ", ans[i]);
      printf("%d %d\n", d, b);
      printf("%d %d ", c, a);
      for (int i = 3; i <= n - 2; i++) printf("%d ", ans[i]);
      printf("%d %d\n", b, d);
    }
  }
  return 0;
}
