#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll MOD = 1e9 + 7, N = 1e5 + 10;
ll done[1001];
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  ll n, k;
  cin >> n >> k;
  ll a, b, c, d;
  cin >> a >> b >> c >> d;
  if (n == 4) return cout << -1, 0;
  if (k < n + 1) return cout << -1, 0;
  vector<ll> order = {a, c};
  done[a] = done[b] = done[c] = done[d] = 1;
  for (ll i = 1; i < n + 1; i++) {
    if (done[i]) continue;
    order.push_back(i);
  }
  order.push_back(d);
  order.push_back(b);
  for (ll i = 0; i < n; i++) {
    cout << order[i] << " \n"[i == n - 1];
  }
  swap(order[0], order[1]);
  swap(order[n - 1], order[n - 2]);
  for (ll i = 0; i < n; i++) {
    cout << order[i] << " \n"[i == n - 1];
  }
  return 0;
}
