#include<stdio.h>

struct data{
  char name[10];
  int time;
};


int main(){

  int n,q,i;
  struct data Q[100000];

  scanf("%d%d",&n,&q);

  for(i=0;i<n;i++){
    scanf("%s%d",Q[i].name,&Q[i].time);
  }

  while(1){
    

  return 0;
}