#include "testlib.h"
#include <bits/stdc++.h>

using namespace std;

int main(int argc, char* argv[]) {
    registerGen(argc, argv, 1);
    int t = opt<int>("t", 10'000);
    println(t);
    int min_n = opt<int>("min-n", 2);
    int max_n = opt<int>("max-n", 200'000);
    int min_m = opt<int>("min-m", 1);
    int max_m = opt<int>("max-m", 200'000);
    for (int tc = 1; tc <= t; ++tc) {
        int n = rnd.next(min_n, max_n);
        int m = rnd.next(min_m, max_m);
        println(n, m);
        for (int j = 0; j < m; ++j) {
            auto vu = rnd.distinct(2, 1, n);
            println(vu);
        }
    }
}