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