#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  int a, b, c, d;
  cin >> n >> k >> a >> b >> c >> d;
  if (n == 4 || k < n + 1) {
    cout << -1;
    return 0;
  }
  cout << a << " ";
  cout << d << " ";
  for (int i = 1; i <= n; i++)
    if (i != a && i != b && i != c && i != d) cout << i << " ";
  cout << c << " ";
  cout << b << "\n";
  cout << c << " ";
  cout << b << " ";
  for (int i = n; i >= 1; i--)
    if (i != a && i != b && i != c && i != d) cout << i << " ";
  cout << a << " ";
  cout << d;
  return 0;
}
