#include "testlib.h"
#include <bits/stdc++.h>
 
using namespace std;

int main(int argc, char* argv[])
{
    const int max_n = int(2e5);
	registerGen(argc, argv, 1);
    int max_monster_hp = opt<int>("mmhp");
    int max_hero_hp = opt<int>("mhhp");
    int max_hero_damage = opt<int>("mhdmg");
    int tests = opt<int>("tests");
    int sum_n = opt<int>("sum_n");
    assert(sum_n >= tests);
    println(tests);
    vector<int> part = rnd.partition(tests, sum_n);
    for (int n: part)
    {
        int monster_hp = rnd.next(1, max_monster_hp);
        println(monster_hp);
        println(n);
        vector<int> hp(n), dmg(n);
        for(int i = 0; i < n; ++i)
        {
            int hero_hp = rnd.next(1, max_hero_hp);
            int hero_damage = rnd.next(1, max_hero_damage);
            hp[i] = hero_hp;
            dmg[i] = hero_damage;
        }
        println(hp);
        println(dmg);
    }
	return 0;
}
