#include using namespace std; char name[1000001][30]; char course[1000001][30]; int main() { int n, m; while (scanf("%d%d",&n,&m)==2) { for (int i = 0; i<=1000000; i++) { name[i][0] = 0; course[i][0] = 0; } scanf("%*s%*s"); for (int i = 0; i