#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int s1, s2;
  int t1, t2;
  cin >> s1 >> t1 >> s2 >> t2;
  if (n == 4 || m < n + 1) {
    cout << -1 << endl;
    return 0;
  }
  vector<int> v;
  for (int i = 1; i <= n; i++) {
    if (i != s1 && i != s2 && i != t1 && i != t2) {
      v.push_back(i);
    }
  }
  cout << s1 << " " << s2;
  for (auto i : v) cout << " " << i;
  cout << " " << t2 << " " << t1 << endl;
  cout << s2 << " " << s1;
  for (auto i : v) cout << " " << i;
  cout << " " << t1 << " " << t2 << endl;
}
