#ifdef DEBUG
#  define _GLIBCXX_DEBUG
#endif
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include "testlib.h"
#define ff first
#define ss second
#define szof(x) ((int)x.size())
#ifndef LOCAL
#  define cerr __get_ce
#endif

using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef unsigned long long ull;

using namespace __gnu_pbds;
template <typename T> using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
template <typename K, typename V> using ordered_map = tree<K, V, less<K>, rb_tree_tag, tree_order_statistics_node_update>;

int const INF = (int)1e9 + 1e3;
ll const INFL = (ll)1e18 + 1e6;

int main(int argc, char* argv[]) {
  registerGen(argc, argv, 1);

  int n = opt<int>("n");
  int type = opt<int>("type");
  int x = opt<int>("x");

  cout << 1 << '\n';
  cout << n << '\n';
  if (type == 1) {
    int y = opt<int>("y");
    for (int i = 0; i < n; i++) {
      cout << x << " \n"[i == n - 1];
    }
    for (int i = 0; i < n; i++) {
      cout << y << " \n"[i == n - 1];
    }
  }
  if (type == 2) {
    for (int i = 0; i < n; i++) {
      cout << x << " \n"[i == n - 1];
    }
    vector<int> p(n);
    iota(p.begin(), p.end(), 1);
    shuffle(p.begin(), p.end());
    for (int i = 0; i < n; i++) {
      cout << p[i] << " \n"[i == n - 1];
    }
  }
  if (type == 3) {
    int y = opt<int>("y");
    for (int i = 0; i < n; i++) {
      cout << x << " \n"[i == n - 1];
    }
    for (int i = 0; i < n; i++) {
      cout << rnd.next(x, y) << " \n"[i == n - 1];
    }
  }

  return 0;
}