#include <bits/stdc++.h>
using namespace std;
template <typename T>
void show(vector<T> a, int p = 0) {
  for (int i = 0; i < a.size(); i++) {
    if (p == 0) cout << a[i] << endl;
    if (p == 1 || p == 2) cout << a[i] << ' ';
  }
  if (p == 2) cout << endl;
}
int main() {
  int n, m, a, b, c, d;
  cin >> n >> m;
  vector<int> vec(n);
  vector<int> used(n + 1);
  cin >> a >> b >> c >> d;
  if (n == 4 || n + 1 > m) {
    cout << -1;
    return 0;
  }
  used[a] = 1;
  used[b] = 1;
  used[c] = 1;
  used[d] = 1;
  vec[0] = a;
  vec[1] = c;
  vec[n - 2] = d;
  vec[n - 1] = b;
  vector<int> tmp;
  for (int i = 1; i < n + 1; i++) {
    if (!used[i]) tmp.push_back(i);
  }
  int k = 0;
  for (int i = 2; i < n - 2; i++) {
    vec[i] = tmp[k++];
  }
  show(vec, 2);
  cout << vec[1] << ' ' << vec[0] << ' ';
  for (int i = 2; i < n - 2; i++) cout << vec[i] << ' ';
  cout << vec[n - 1] << ' ' << vec[n - 2];
  return 0;
}
