#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
bool sortinrev(const pair<int, int>& a, const pair<int, int>& b) {
  return (a.first > b.first);
}
long long int power(long long int x, long long int y, long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
long long int root(long long int* Arr, long long int i) {
  while (Arr[i] != i) {
    Arr[i] = Arr[Arr[i]];
    i = Arr[i];
  }
  return i;
}
void unin(long long int* Arr, long long int* size, long long int A,
          long long int B) {
  long long int root_A = root(Arr, A);
  long long int root_B = root(Arr, B);
  if (root_A == root_B)
    return;
  else if (size[root_A] < size[root_B]) {
    Arr[root_A] = Arr[root_B];
    size[root_B] += size[root_A];
  } else {
    Arr[root_B] = Arr[root_A];
    size[root_A] += size[root_B];
  }
}
long long int gcd(long long int a, long long int b) {
  if (b == 0)
    return a;
  else
    return gcd(b, a % b);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, k;
  cin >> n >> k;
  long long int a, b, c, d;
  cin >> a >> b >> c >> d;
  if (n == 4 || k <= n) {
    cout << "-1";
    return 0;
  }
  cout << a << " " << c << " ";
  for (long long int i = 1; i < n + 1; i += 1) {
    if (i != a && i != b && i != c && i != d) cout << i << " ";
  }
  cout << d << " " << b << endl;
  cout << c << " " << a << " ";
  for (long long int i = 1; i < n + 1; i += 1) {
    if (i != a && i != b && i != c && i != d) cout << i << " ";
  }
  cout << b << " " << d << endl;
  return 0;
}
