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