#include "testlib.h"

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

    int maxN = atoi(argv[1]);
    int answer = atoi(argv[2]);

    int a = rnd.next(0, maxN / 2 - 1);
    int b = rnd.next(0, maxN / 2 - 1);
    int c;
    if (answer == 1) {
        c = rnd.next(std::max(a, b), std::min(a + b, maxN));
    } else {
        c = rnd.next(a + b + 1, maxN);
    }

    std::vector<int> inputs{a, b, c};
    shuffle(inputs.begin(), inputs.end());

    std::cout << inputs[0] << ' ' << inputs[1] << ' ' << inputs[2] << std::endl;

    return 0;
}
