#include using namespace std; typedef long long ll; int main() { int n; cin>>n; map seats[20]; for (int i=0;i>t; if (t==0) { int a,b; cin>>a>>b; for (int j=0;j>s; seats[a-1][s]++; } } else if (t==1) { string s; cin>>s; bool taken=false; for (int j=0;j<20;j++) { auto it=seats[j].find(s); if (it!=seats[j].end()) { cout<>bye; seats[bye-1].clear(); } } return 0; }