#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M;
  cin >> N >> M;
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  a--;
  b--;
  c--;
  d--;
  int min = N + 1;
  if (N == 4) min = M + 1;
  if (M < min) {
    cout << -1 << endl;
  } else {
    vector<int> arr(N, 1);
    arr[a] = 0;
    arr[b] = 0;
    arr[c] = 0;
    arr[d] = 0;
    cout << a + 1 << ' ' << c + 1 << ' ';
    for (int n = (0); n < (N); ++n)
      if (arr[n]) cout << n + 1 << ' ';
    cout << d + 1 << ' ' << b + 1 << ' ';
    cout << endl;
    cout << c + 1 << ' ' << a + 1 << ' ';
    for (int n = (0); n < (N); ++n)
      if (arr[n]) cout << n + 1 << ' ';
    cout << b + 1 << ' ' << d + 1 << ' ';
    cout << endl;
  }
  return 0;
}
