#include <bits/stdc++.h>
using namespace std;
const int N = 1000010;
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\n";
    return 0;
  }
  map<int, int> m1;
  for (int x = 0; x < 2; x++) {
    cout << a << " " << c;
    m1[a]++, m1[c]++, m1[b]++, m1[d]++;
    for (int i = 1; i <= n; i++) {
      if (!m1[i]) cout << " " << i;
    }
    cout << " " << d << " " << b << "\n";
    swap(a, c);
    swap(b, d);
    m1.clear();
  }
  return 0;
}
