#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  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;
  }
  int z = 1;
  for (; z <= n; z++) {
    if (z != a && z != b && z != c && z != d) break;
  }
  cout << a << " ";
  for (int i = 1; i <= n; i++) {
    if (i != a && i != d && i != c && i != b && i != z) cout << i << " ";
  }
  cout << c << " ";
  cout << z << " ";
  cout << d << " ";
  cout << b << endl;
  cout << c << " ";
  for (int i = n; i > 0; i--) {
    if (i != a && i != d && i != c && i != b && i != z) cout << i << " ";
  }
  cout << a << " ";
  cout << z << " ";
  cout << b << " ";
  cout << d;
  return 0;
}
