#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  if (n <= 4 || k <= n) {
    cout << -1 << endl;
    return 0;
  }
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  cout << a << " " << c;
  for (int i = 1; i <= n; i++) {
    if (i != a && i != b && i != c && i != d) {
      cout << " " << i;
    }
  }
  cout << " " << d << " " << b;
  cout << endl;
  cout << c << " " << a;
  for (int i = 1; i <= n; i++) {
    if (i != a && i != b && i != c && i != d) {
      cout << " " << i;
    }
  }
  cout << " " << b << " " << d;
  cout << endl;
  return 0;
}
