#include <algorithm>
#include <string>
#include <vector>
#include <iostream>
#include <fstream>
#include <map>

std::map<std::string, std::string> words;

extern "C"
int initialise()
{
    std::ifstream dict("/usr/share/dict/words-insane");

    for (std::string line; std::getline(dict, line);)
    {
        std::string sorted_line = line;
        std::sort(sorted_line.front(), sorted_line.back());
        words[line] = sorted_line;
    }

    return 0;
}
