#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  ios::sync_with_stdio(false);
  int n, k, a, b, c, d;
  cin >> n >> k;
  cin >> a >> b >> c >> d;
  if (k <= n || n == 4) {
    cout << -1 << endl;
    return 0;
  }
  vector<int> vctmp, vctmp1;
  for (int i = 0; i < (int)n; i++) {
    if (i + 1 != a && i + 1 != b && i + 1 != c && i + 1 != d) {
      vctmp.push_back(i + 1);
    }
  }
  vctmp1 = vctmp;
  vector<int> p1, p2;
  p1.push_back(a);
  p1.push_back(c);
  while (vctmp.size()) {
    p1.push_back(vctmp.back());
    vctmp.pop_back();
  }
  p1.push_back(d);
  p1.push_back(b);
  vctmp = vctmp1;
  p2.push_back(c);
  p2.push_back(a);
  while (vctmp.size()) {
    p2.push_back(vctmp.back());
    vctmp.pop_back();
  }
  p2.push_back(b);
  p2.push_back(d);
  for (int i = 0; i < (int)p1.size(); i++) {
    cout << p1[i] << ' ';
  }
  cout << endl;
  for (int i = 0; i < (int)p2.size(); i++) cout << p2[i] << ' ';
  cout << endl;
  return 0;
}
