#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 || k < n + 1)
    cout << -1 << endl;
  else {
    int cur = 1;
    vector<int> ret;
    ret.push_back(a);
    ret.push_back(c);
    while (cur == a || cur == b || cur == c || cur == d) cur++;
    ret.push_back(cur);
    cur++;
    ret.push_back(d);
    for (int x = 4; x < n - 1; x++) {
      while (cur == a || cur == b || cur == c || cur == d) cur++;
      ret.push_back(cur);
      cur++;
    }
    ret.push_back(b);
    for (int i = 0; i < n; i++) cout << ret[i] << " ";
    cout << endl;
    cout << ret[1] << " " << ret[0] << " " << ret[2] << " " << ret[n - 1]
         << " ";
    for (int i = n - 2; i > 2; i--) cout << ret[i] << " ";
    cout << endl;
  }
}
