#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, a, b, c, d;
  cin >> n >> k >> a >> b >> c >> d;
  if (n == 4) {
    cout << -1;
    return 0;
  }
  vector<int> v(n + 1, 1);
  for (int i = 1; i <= n; i++) {
    v[i] = i;
  }
  v[0] = -1;
  v[a] = 0;
  v[b] = 0;
  v[c] = 0;
  v[d] = 0;
  sort(v.begin(), v.end());
  int m = n - 5;
  int k2 = k - m;
  if (k2 < 6) {
    cout << -1;
    return 0;
  }
  cout << a << ' ' << c << ' ' << v[5] << ' ';
  for (int i = 6; i <= n; i++) {
    cout << v[i] << ' ';
  }
  cout << d << ' ' << b << '\n';
  cout << c << ' ' << a << ' ' << v[n] << ' ';
  for (int i = n - 1; i != 4; i--) {
    cout << v[i] << ' ';
  }
  cout << b << ' ' << d;
  cout << '\n';
  return 0;
}
