#include #include #include #include #include #include using std::cin; using std::cout; using std::endl; using std::string; using std::map; using std::set; using std::ifstream; using std::ofstream; using std::istringstream; using std::ostringstream; map build_rule_map(ifstream& infile) { string lin