#include <bits/stdc++.h>
using namespace std;
vector<int> num;
int main() {
  int n, k, a, b, c, d;
  cin >> n >> k >> 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) {
      num.push_back(i);
    }
  }
  cout << a << " " << c << " ";
  for (int i = 0; i < num.size(); i++) {
    cout << num[i] << " ";
  }
  cout << d << " " << b << "\n";
  cout << c << " " << a << " ";
  for (int i = 0; i < num.size(); i++) {
    cout << num[i] << " ";
  }
  cout << b << " " << d;
  return 0;
}
