#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  if (k <= n || n == 4) {
    cout << -1 << endl;
    return 0;
  }
  vector<int> v;
  v.push_back(a);
  v.push_back(c);
  for (int i = 1; i <= n; ++i) {
    if (i == a || i == c || i == d || i == b) {
      continue;
    }
    v.push_back(i);
  }
  v.push_back(d);
  v.push_back(b);
  for (int x : v) {
    cout << x << " ";
  }
  cout << endl;
  cout << v[1] << " " << v[0] << " " << v[2] << " ";
  for (int i = 3; i < n - 2; ++i) {
    cout << v[i] << " ";
  }
  cout << v[n - 1] << " " << v[n - 2] << endl;
  return 0;
}
