#include <bits/stdc++.h>
using namespace std;
bool used[1005];
vector<int> v;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, k, a, b, c, d;
  cin >> n >> k >> a >> b >> c >> d;
  if (n == 4 or k <= n) {
    cout << -1;
    return 0;
  }
  used[a] = used[b] = used[c] = used[d] = true;
  for (int i = 1; i <= n; i++) {
    if (!used[i]) {
      v.push_back(i);
    }
  }
  cout << a << " " << c << " " << v[0] << " " << d << " ";
  for (int i = 1; i <= n - 5; i++) {
    cout << v[i] << " ";
  }
  cout << b << "\n";
  cout << c << " " << a << " " << v[0] << " " << b << " ";
  for (int i = n - 5; i >= 1; i--) {
    cout << v[i] << " ";
  }
  cout << d;
  return 0;
}
