#include <bits/stdc++.h>
using namespace std;
int n, k, a, b, c, d, q[1010], cnt;
int main() {
  scanf("%d%d", &n, &k);
  scanf("%d%d%d%d", &a, &b, &c, &d);
  if (n == 4) {
    cout << -1;
    return 0;
  }
  if (k <= n) {
    cout << -1;
    return 0;
  }
  q[1] = a;
  cnt = 1;
  for (int i = 1; i <= n; i++)
    if (i != a && i != b && i != c && i != d) q[++cnt] = i;
  q[cnt + 1] = q[cnt];
  cnt++;
  q[cnt - 1] = d;
  q[++cnt] = c;
  q[++cnt] = b;
  for (int i = 1; i <= cnt; i++) cout << q[i] << ' ';
  cout << endl;
  cout << q[cnt - 1] << ' ' << q[cnt] << ' ' << q[cnt - 2] << ' ';
  for (int i = 1; i <= cnt - 3; i++) cout << q[i] << ' ';
}
