#include <iostream> #include <map> #include <string> #include <vector> #include <set> using namespace std; int main() { int n; cin >> n; string str1, str2, str3; multimap<string, string> sub; multimap<string, string> ins; for (i...