#include "cseslib.hpp"
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>

int main() {
    int seed, n, t;
    string mode;
    cin >> seed >> n >> t >> mode;

    if (n < 4 || n > 500) fail();
    if (t < 1 || t > 200) fail();

    if (mode == "rnd") {
        vector<int> g;
        if (n == 4) g.push_back(1);
        if (n == 50) g.push_back(2);
        if (n == 50) g.push_back(3);
        if (n == 500) g.push_back(4);
        end_groups(g);
    } else end_groups({});
}
