#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long double EPS = 1e-8;
const long double PI = acos(-1.0L);
const int MAXN = 1100;
int p[MAXN];
int main() {
  int n, k;
  int a, b, c, d;
  scanf("%d%d", &n, &k);
  scanf("%d%d%d%d", &a, &b, &c, &d);
  if (n == 4 || k < n + 1) {
    cout << -1 << '\n';
    return 0;
  }
  set<int> s;
  for (int i = 1; i <= n; ++i) s.insert(i);
  p[1] = a;
  p[2] = c;
  p[n - 1] = d;
  p[n] = b;
  s.erase(a);
  s.erase(b);
  s.erase(c);
  s.erase(d);
  int j = 3;
  for (auto x : s) {
    p[j++] = x;
  }
  for (int i = 1; i <= n; ++i) printf("%d ", p[i]);
  printf("\n");
  swap(p[1], p[2]);
  swap(p[n - 1], p[n]);
  for (int i = 1; i <= n; ++i) printf("%d ", p[i]);
  printf("\n");
  return 0;
}
