#include <stdio.h>
#include <stdlib.h>
#include <vector>
#include <string>
#include <algorithm>

using std::vector;
using std::string;

string randomKeyword() {
    string rv;
    for (int i = 0; i < 30; i++) {
        rv += (char) ('a' + rand() % 26);
    }
    return rv;
}

string randomSite() {
    string rv;
    for (int i = 0; i < 100; i++) {
        rv += (char) ('a' + rand() % 26);
        switch (rand() % 10) {
            case 0:
                rv[i] = '/';
                break;
            case 1:
                rv[i] = '.';
                break;
        }
    }
    return rv;
}

int main(int argc, char **argv) {
    int n = 2 * (atoi(argv[1]) / 2);
    srand(atoi(argv[2]));

    string keywd = randomKeyword();

    printf("%d\n", n);
    int i;
    for (i = 0; i < n / 4; i++) {
        printf("Add keyword \"%s\" to %s\n", keywd.c_str(), randomSite().c_str());
    }
    for (i = 0; i < 3 * n / 4; i++) {
        printf("Search \"%s\"\n", keywd.c_str());
    }
    return 0;
}
