#include <bits/stdc++.h>
int main() {
  std::ios_base::sync_with_stdio(false);
  std::cin.tie(nullptr);
  int n, k, a, b, c, d;
  std::cin >> n >> k >> a >> b >> c >> d;
  --a;
  --b;
  --c;
  --d;
  if (n == 4) {
    std::cout << -1 << std::endl;
    return 0;
  }
  if (k <= n) {
    std::cout << -1 << std::endl;
    return 0;
  }
  std::vector<int> free;
  for (int i = 0; i < n; ++i) {
    if (i == a || i == b | i == c || i == d) {
      continue;
    }
    free.push_back(i);
  }
  std::cout << a + 1 << " " << c + 1 << " ";
  for (int i = 0; i < free.size(); ++i) {
    std::cout << free[i] + 1 << " ";
  }
  std::cout << d + 1 << " " << b + 1 << std::endl;
  std::cout << c + 1 << " " << a + 1 << " ";
  for (int i = 0; i < free.size(); ++i) {
    std::cout << free[i] + 1 << " ";
  }
  std::cout << b + 1 << " " << d + 1 << std::endl;
  return 0;
}
