var n =readline(); var item = [] for(let i = 0;i<n;i++) { let ls = readline().split(" "); if(ls.length ==2 && item.includes(ls[1])) item.splice(item.indexOf(ls[1]),1); else if(ls.length ==2 && !item.includes(ls[1])) continue; ...