#include <bits/stdc++.h>
using namespace std;
int p1[2000];
int p2[2000];
set<int> ss;
int main() {
  int n, k;
  cin >> n >> k;
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  if (n == 4 || k <= n) {
    cout << -1;
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    if (i == a || i == b || i == c || i == d) continue;
    ss.insert(i);
  }
  p1[a] = c;
  p1[c] = *ss.begin();
  set<int>::iterator it;
  set<int>::iterator it0;
  set<int>::iterator it1;
  it = ss.begin();
  it0 = ss.begin();
  it++;
  for (; it != ss.end(); it++) {
    p1[*it0] = *it;
    it0++;
  }
  it1 = ss.end();
  it1--;
  p1[*it1] = d;
  p1[d] = b;
  p2[c] = a;
  p2[a] = *ss.begin();
  it = ss.begin();
  it0 = ss.begin();
  it++;
  for (; it != ss.end(); it++) {
    p2[*it0] = *it;
    it0++;
  }
  it1 = ss.end();
  it1--;
  p2[*it1] = b;
  p2[b] = d;
  int x = a;
  printf("%d ", x);
  while (x != b) {
    x = p1[x];
    printf("%d ", x);
  }
  cout << endl;
  x = c;
  printf("%d ", x);
  while (x != d) {
    x = p2[x];
    printf("%d ", x);
  }
  return 0;
}
