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

using std::string;
using std::vector;
using std::pair;
using std::make_pair;
using std::random_shuffle;

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

string randomSite() {
    string rv = "rwhrharhtjsrtiwtk.isrtj/srtis/tjk.srtisrtk/syk.sgk/tyk.stks/tks.rykdy/ksr.tyksrt/ksrt.jkrf";
    for (int i = 90; 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 = (atoi(argv[1]) / 2);
    srand(atoi(argv[2]));
    int i;
    vector<pair<string, string> > v;
    for (i = 0; i < n; i++) {
        pair<string, string> p(randomKeyword(), randomSite());        
        v.push_back(p);        
        v.push_back(p);        
    }

    random_shuffle(v.begin(), v.end());

    printf("%d\n", 2 * n);

    for (i = 0; i < 2 * n; i++) {
        pair<string, string> &p = v[i];
        printf("Add keyword \"%s\" to %s\n", p.first.c_str(), p.second.c_str());
    }

    return 0;    
}
