#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 50;
int probDiv[N];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, k, a, b, c, d;
  cin >> n >> k >> a >> b >> c >> d;
  if (k < n + 1 || n == 4) {
    cout << -1 << endl;
  } else {
    vector<int> path;
    cout << a << " " << c;
    int cur = 1;
    for (int i = 0; i < n - 4; i++) {
      while (cur == a || cur == b || cur == c || cur == d) cur++;
      path.push_back(cur);
      cout << " " << cur;
      ++cur;
    }
    cout << " " << d << " " << b << endl;
    cout << c << " " << a;
    for (int i = 0; i < path.size(); i++) {
      cout << " " << path[i];
    }
    cout << " " << b << " " << d << endl;
  }
  return 0;
}
