#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18 + 7;
const long long N = 2e5 + 7;
const long long MOD = 1e9 + 7;
const double Pi = 3.14159265358979323846;
signed main() {
  {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout << fixed << setprecision(20);
    cerr << fixed << setprecision(11);
  };
  long long n, k;
  cin >> n >> k;
  long long a, b, c, d;
  cin >> a >> b >> c >> d;
  if (n == 4 || k < n + 1)
    cout << -1 << '\n';
  else {
    cout << a << ' ' << c << ' ';
    for (long long i = 1; i <= n; i++)
      if (i != a && i != b && i != c && i != d) cout << i << ' ';
    cout << d << ' ' << b << '\n';
    cout << c << ' ' << a << ' ';
    for (long long i = 1; i <= n; i++)
      if (i != a && i != b && i != c && i != d) cout << i << ' ';
    cout << b << ' ' << d << '\n';
  }
  return 0;
}
