#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int N = 3e5 + 10;
const int INF = 1000000000;
const int inf = 1e9 + 1;
const double eps = 1e-9;
int cnt[5005];
int a[5005];
int ans[5005];
bool used[1005];
int main() {
  int n, k, a, b, c, d;
  cin >> n >> k >> a >> b >> c >> d;
  a--;
  b--;
  c--;
  d--;
  used[a] = used[b] = used[c] = used[d] = true;
  vector<int> f;
  for (int(i) = (0); (i) < (n); ++(i)) {
    if (!used[i]) {
      f.push_back(i);
    }
  }
  if (n == 4) {
    cout << -1 << endl;
    return 0;
  }
  int need = n - 5 + 6;
  if (k < need) {
    cout << -1 << endl;
    return 0;
  }
  cout << a + 1 << " " << c + 1 << " ";
  for (auto e : f) cout << e + 1 << " ";
  cout << d + 1 << " " << b + 1 << endl;
  cout << c + 1 << " " << a + 1 << " ";
  for (auto e : f) cout << e + 1 << " ";
  cout << b + 1 << " " << d + 1 << endl;
  return 0;
}
