#include <bits/stdc++.h>
long long int mod = 1e9 + 7;
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int i, n, k, a, b, c, d;
  cin >> n >> k >> a >> b >> c >> d;
  if (n == 4 || k < n + 1) {
    cout << "-1";
    exit(0);
  }
  vector<int> pt;
  set<int> s;
  set<int>::iterator it;
  for (i = 1; i <= n; i++) s.insert(i);
  s.erase(a);
  s.erase(b);
  s.erase(c);
  s.erase(d);
  cout << a << " " << c << " ";
  pt.push_back(a);
  pt.push_back(c);
  it = s.begin();
  cout << (*it) << " ";
  pt.push_back(*it);
  s.erase(*it);
  cout << d << " ";
  pt.push_back(d);
  for (it = s.begin(); it != s.end(); ++it) {
    cout << (*it) << " ";
    pt.push_back(*it);
  }
  cout << b << "\n";
  pt.push_back(b);
  cout << c << " " << a << " ";
  cout << pt[2] << " ";
  for (i = pt.size() - 1; i >= 3; i--) cout << pt[i] << " ";
}
