#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1111;
int n, k, a, b, c, d, pos;
int vis[MAXN];
vector<int> e;
int main() {
  scanf("%d%d", &n, &k);
  scanf("%d%d%d%d", &a, &b, &c, &d);
  if (n == 4 || k < n + 1) {
    printf("-1\n");
    return 0;
  }
  vis[a] = 1;
  vis[b] = 1;
  vis[c] = 1;
  vis[d] = 1;
  int pos;
  for (int i = 1; i <= n; i++)
    if (!vis[i]) {
      vis[i] = 1;
      pos = i;
      break;
    }
  for (int i = 1; i <= n; i++)
    if (!vis[i]) e.push_back(i);
  printf("%d %d %d %d", a, c, pos, d);
  for (int i = 0; i < (int)e.size(); i++) printf(" %d", e[i]);
  printf(" %d\n", b);
  printf("%d %d %d %d", c, a, pos, b);
  for (int i = (int)e.size() - 1; i >= 0; i--) printf(" %d", e[i]);
  printf(" %d\n", d);
  return 0;
}
