HOMO

11
insert 1
insert 2
insert 2
insert 4
delete 1
delete 2
delete 2
delete 7
insert 2
delete 4
delete 2
11
delete 100000000
insert -121212121
insert 234234234
insert 434545456
delete 156756757
delete -121212121
delete 234234234
delete 7
insert 2
delete 4
delete 2
11
delete 10000000000
insert -12121212121
insert 234234234233
insert 434545456234
delete 156756757345
delete -121212121456
delete 23423423446
delete 74564
insert 2456
delete 446
delete 2456
13
delete 1000000000
insert  2342342344
insert  1000000000
insert  1000000000
delete 1000000000
delete 1000000000
delete  2342342344
delete  74564
insert 2456
delete 446
delete 2456
11
delete 1000000000
insert  2342342344
insert  1000000000
insert  1000000000
delete 1000000000
delete 1000000000
delete  2342342344
delete  74564
insert 2456
delete 446
delete 2456
2
delete 1
insert 1
11
insert 1
insert 3
insert 3
insert 4
insert 2
insert 5
insert 6
delete 3
insert 7
delete 3
insert 6
3
insert 1
insert 2
insert 1
11
insert 1
insert 2
insert 1
insert 4
delete 1
delete 3
delete 2
delete 1
insert 4
delete 4
delete 4
4
insert 1
insert 2
insert 2
insert 2
3
insert 2
insert 2
insert 2
3
insert 2
insert 2
insert 2
insert 2
3
insert 2
insert 2
insert 2
insert 3
4
insert 2
insert 2
insert 2
insert 3
4
insert 2
insert 1
insert 2
insert 3
11
insert 1
insert 2
insert 1
insert 4
delete 1
delete 3
delete 2
delete 1
insert 4
delete 4
delet 4
1
i 6
2
i 6
i 6
7
insert 1
insert 2
insert 1
insert 1
insert 2
delete 2
delete 2
3
delete 1
insert 1
insert 1
3
delete 1
insert 1
insert 1
insert 1
3
delete 1
insert 1
insert 1
insert 1
insert 1
4
insert 1
insert 2
insert 1
insert 3
1
insert 1
3
insert 2
insert 1
insert 2
1
delete 1000000000
insert  2342342344
insert  1000000000
insert  1000000000
delete 1000000000
delete 1000000000
delete  2342342344
delete  74564
insert 2456
delete 446
delete 2456
11
delete 1000000000
insert  21
insert  1000000000
insert  1000000000
delete 1000000000
delete 1000000000
delete  2342342344
delete  74564
insert 2456
delete 446
delete 2456
7
delete 1
delete 1
delete 1
insert 1
insert 1
insert 1
insert 2
insert 1
7
delete 1
delete 1
delete 1
insert 1
insert 1
insert 1
insert 1
insert 1
8
delete 1
delete 1
delete 1
insert 1
insert 1
insert 1
insert 1
insert 1
10
delete 1
delete 1
delete 1
delete 1
insert 1
insert 1
insert 1
insert 1
insert 1
insert 1
4
insert 1
insert 1
insert 2
insert 2
2
delete 1
insert 1
3
delete 1
insert 1
insert 2
5
delete 1
delete 1
insert 1
insert 1
insert 1
1
i 6
5
delete 1
delete 1
insert 1
insert 1
insert 1
4
insert 1
insert 1
insert 1
delete1
4
insert 1
insert 1
insert 1
insert 2
6
insert 1
insert 1
insert 1
insert 2
insert 2
insert 2
11
delete 100000000
insert -12121212
insert 23423423
insert 43454545
delete 15675675
delete -12121212
delete 23423423
delete 7
insert 2
delete 4
delete 2
	
11
delete 1000000000
insert  21
insert  1000000000
insert  1000000000
delete 1000000000
delete 1000000000
delete  2342342344
delete  74564
insert 2456
delete 446
delete 2456
12
delete 1000000000
insert  21
insert  1000000000
insert  1000000000
insert  1000000000
delete 1000000000
delete 1000000000
delete  2342342344
delete  74564
insert 2456
delete 446
delete 2456
3
delete 2
insert 2
insert 2
2
insert 2
insert 2
3 
delete 2 
insert 2 
insert 2 
#include 
#include
#include
#include
#include
#include
#define ll long int
 
using namespace std;
 
int main() {
    

	ll n;
	scanf("%d",&n);
	map mp;
	
	while(n--)
	{
	   // string s;
	    ll x;
	    char s[256];
       scanf( "%s" , s );
	    scanf("%d",&x);
	    
	   //map::iterator is=mp.find(x);
	   
	    if(s[0]=='i')
	    mp[x]++;
	    else if(s[0]=='d')
	    {mp[x]--;
	       if(mp[x]<=0)
	        mp.erase(x);}
	    
	   ll homo=0,het=0;
	       
	    for(map::iterator it=mp.begin();it!=mp.end();it++)
	    {
	     if((it->second)>=2)
	     {homo=1;
	     break;}
	     
	    }
	    if(mp.size()>1)
	    het=1;
	    
	    if(het==1&&homo==1)
	    printf("both\n");
	    else if(het==1&&homo==0)
	    printf("hetero\n");
	    else if(het==0&&homo==1)
	    printf("homo\n");
	    else printf("neither\n");
	    
	}
	return 0;
}  
    
poo
#include
using namespace std;
int main()
{   int t,x;cin>>t;
    string s;
    multiset ms;
    while(t--){
        cin>>s;        
        int ho=0,ht=0;
        if(s=="insert")
        {cin>>x;ms.insert(x);}
        else 
        {cin>>x;auto z=ms.find(x);
         if(z!=ms.end())
         ms.erase(z);}
        for(auto i=ms.begin();i!=ms.end();i++)
        {if(ms.count(*i)>1)
        {ho=1;break;}}
        
        if(ms.size()!=ms.count(*ms.begin()))
            ht=1;
        
         if(ht==1&&ho==1)
            cout<<"both";
        else if(ho==1)
            cout<<"homo";
        else if(ht==1)
            cout<<"hetero";
        else 
            cout<<"neither";
     cout<
#include 
using namespace std;


int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    int n;
    string s[6]={"insert","delete","homo","hetero","both","neither"};
    cin >> n;
    std::vector v;
    while(n--)
    {
      std::vector::iterator it;
      string str;
      long long int val;
      cin >> str >> val;
      if(str==s[0])
      v.push_back(val);
      if(str==s[1])
      {
        it =  find(v.begin(),v.end(),val);
        if(it!=v.end())
        v.erase(it);
      }
      if(v.size()==0||v.size()==1)
      cout << s[5]< v1(v);
        sort(v1.begin(),v1.end());
        it= unique(v1.begin(),v1.end());
        if(it - v1.begin()==v.size())
        cout << s[3]<
1
insert 112