#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
int add(int a, int b) {
  long long x = a + b;
  if (x >= 1000000007) x -= 1000000007;
  if (x < 0) x += 1000000007;
  return x;
}
long long mul(long long a, long long b) { return (a * b) % 1000000007; }
long long pw(long long a, long long b) {
  long long ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % 1000000007;
    a = (a * a) % 1000000007;
    b >>= 1;
  }
  return ans;
}
int v1[2002], v2[2002];
bool oki[1002][1002], ps[1002];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, k, a, b, c, d;
  cin >> n >> k;
  cin >> a >> b >> c >> d;
  v1[1] = a;
  v1[n] = b;
  v1[2] = c;
  v1[n - 1] = d;
  ps[a] = ps[b] = ps[c] = ps[d] = 1;
  int len = 3;
  for (int i = 1; i <= n; ++i)
    if (!ps[i]) v1[len++] = i, ps[i] = 1;
  for (int i = 1; i <= n; ++i) v2[i] = v1[i];
  swap(v2[1], v2[2]);
  swap(v2[n], v2[n - 1]);
  for (int i = 1; i < n; ++i) {
    oki[v2[i]][v2[i + 1]] = oki[v2[i + 1]][v2[i]] = 1;
    oki[v1[i]][v1[i + 1]] = oki[v1[i + 1]][v1[i]] = 1;
  }
  int nr = 0;
  for (int i = 1; i <= n; ++i)
    for (int j = i + 1; j <= n; ++j) nr += oki[i][j];
  if (oki[a][b] || oki[c][d] || nr > k) {
    cout << -1;
    return 0;
  }
  for (int i = 1; i <= n; ++i) cout << v1[i] << " ";
  cout << '\n';
  for (int i = 1; i <= n; ++i) cout << v2[i] << " ";
  return 0;
}
