#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
int nnnnext[N], pos[N];
int main() {
  int n, k;
  int a, b, c, d;
  cin >> n >> k >> a >> b >> c >> d;
  a--, b--, c--, d--;
  if (k <= n || n == 4) {
    puts("-1");
    return 0;
  }
  for (int i = 0; (i) < (n); ++i) {
    nnnnext[i] = i;
    pos[i] = i;
  }
  swap(pos[a], pos[0]);
  swap(nnnnext[a], nnnnext[0]);
  swap(pos[b], pos[nnnnext[n - 1]]);
  swap(nnnnext[pos[nnnnext[n - 1]]], nnnnext[n - 1]);
  swap(pos[c], pos[nnnnext[1]]);
  swap(nnnnext[pos[nnnnext[1]]], nnnnext[1]);
  swap(pos[d], pos[nnnnext[n - 2]]);
  swap(nnnnext[pos[nnnnext[n - 2]]], nnnnext[n - 2]);
  for (int i = 0; (i) < (n); ++i) {
    cout << nnnnext[i] + 1 << " ";
  }
  cout << '\n';
  cout << c + 1 << " " << a + 1 << " ";
  for (int i = (2); (i) < (n - 2); ++i) cout << nnnnext[i] + 1 << " ";
  cout << b + 1 << " " << d + 1 << '\n';
  return 0;
}
