#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, a, b, c, d;
  cin >> n >> k;
  if (n == 4 || k < n + 1) {
    cout << -1;
    return 0;
  }
  cin >> a >> b >> c >> d;
  int ans[1010];
  ans[1] = a;
  ans[2] = c;
  ans[n - 1] = d;
  ans[n] = b;
  int id = 3;
  for (int i = 1; i <= n; i++) {
    if (i == a || i == b || i == c || i == d) continue;
    ans[id] = i;
    id++;
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  cout << '\n';
  ans[n] = d;
  ans[n - 1] = b;
  ans[1] = c;
  ans[2] = a;
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
