#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int n, k, a, b, c, d;
  cin >> n >> k >> a >> b >> c >> d;
  if (n == 4 || k < n + 1) {
    cout << "-1";
    return 0;
  }
  bool ar[1005] = {0};
  ar[a] = 1;
  ar[b] = 1;
  ar[c] = 1;
  ar[d] = 1;
  cout << a << " " << c << " ";
  for (long long int i = 1; i < n + 1; i++)
    if (!ar[i]) cout << i << " ";
  cout << d << " " << b << endl;
  cout << c << " " << a << " ";
  for (long long int i = 1; i < n + 1; i++)
    if (!ar[i]) cout << i << " ";
  cout << b << " " << d << endl;
  return 0;
}
