#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, k;
  cin >> n >> k;
  if (k < n + 1 || n == 4) {
    cout << -1 << endl;
    return 0;
  }
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  vector<int> p;
  for (int i = 1; i <= n; i++) {
    if (i == a || i == b || i == c || i == d) continue;
    p.push_back(i);
  }
  cout << a << " " << c << " ";
  for (int i = 0; i < n - 4; i++) cout << p[i] << " ";
  cout << d << " " << b << endl;
  cout << c << " " << a << " ";
  for (int i = 0; i < n - 4; i++) cout << p[i] << " ";
  cout << b << " " << d << endl;
  return 0;
}
