#include <bits/stdc++.h>
using namespace std;
int n, a, b, c, d;
void print() {
  set<int> s;
  s.clear();
  for (int i = 1; i <= n; i++) s.insert(i);
  s.erase(a);
  s.erase(b);
  s.erase(c);
  s.erase(d);
  for (int i : s) {
    cout << i << " ";
  }
}
int main() {
  int k;
  cin >> n >> k;
  cin >> a >> b >> c >> d;
  if (n == 4) {
    cout << -1;
    return 0;
  }
  if (k <= n) {
    cout << -1;
    return 0;
  }
  cout << a << " " << c << " ";
  print();
  cout << d << " " << b << endl;
  cout << c << " " << a << " ";
  print();
  cout << b << " " << d << endl;
}
