include<stdio.h> include<string.h> struct grate{ char str[1024]; int n; }; int main() { int m; while(scanf("%d",&m)!=EOF){ int sequence; scanf("%d",&sequence); struct grate rec[m]; char name; int number; for(int i=0;i<m;i++) { sc...