#include <bits/stdc++.h>
using namespace std;
set<int> Set;
int n, k, a, b, c, d, i;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  cin >> a >> b >> c >> d;
  if ((n == 4) || (n >= k)) {
    cout << "-1" << '\n';
    return 0;
  }
  for (i = 1; i <= n; i++) Set.insert(i);
  Set.erase(a);
  Set.erase(b);
  Set.erase(c);
  Set.erase(d);
  cout << a << " " << c << " ";
  for (i = 1; i <= n - 4; i++) {
    cout << *Set.begin() << " ";
    Set.erase(Set.begin());
  }
  cout << d << " " << b << '\n';
  for (i = 1; i <= n; i++) Set.insert(i);
  Set.erase(a);
  Set.erase(b);
  Set.erase(c);
  Set.erase(d);
  cout << c << " " << a << " ";
  for (i = 1; i <= n - 4; i++) {
    cout << *Set.begin() << " ";
    Set.erase(Set.begin());
  }
  cout << b << " " << d << '\n';
  return 0;
}
