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