semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(){
	
	float s[15],t[15];
     int a=0;
	 
	for(int i=0;i<15;i++)
	{

		scanf("%f",&s[i]);
	if(s[i]==0)
		break;
	else
	{t[i]=s[i];
	a=a+1;
	}
	
	}

int b=0;
	for(int h=0;h<a;h++)
	{for(int k=0;k<a;k++)
		{if (t[h]/t[k]==2)
		
		b=b+1;
		}
	}
	printf("%d",b);

	return 0;
}
void main()
{
	int b;
	scanf("%d",&b);
	while(b!=-1)
	{	
		int a[16]={0};
		int i,j=0,k;
		int sum=0;
		a[j]=b;
		while(a[j]!=0)
		{ 
			j++;
			scanf("%d",&a[j]);
		}
		for(i=0;i<j-1;i++)
		{
			for(k=i+1;k<j;k++)
			{
				if(a[k]==a[i]*2||a[i]==a[k]*2)
				{
					sum++;
				}
			}
		}
		printf("%d\n",sum);
		scanf("%d",&b);
	}
}
int main()
{
	int a[16],i,j,num,h;
	while(cin>>a[0])
	{
		while(a[0]!=-1)
		{
			for (i=1;i<16;i++)
			{
				cin>>a[i];
				if(a[i]==0) break;
				h=i;//h??????0??????
			}
		
			num=0;
			for(i=0;i<=h;i++)
				for(j=0;j<=h;j++)
					if(a[i]==2*a[j])
						num++;
			cout << num << endl; break;
		}
		continue;
	}
	return 0;
}
int main()
{
	int x[20],r,ctr,t,i,j;
	while(cin.peek()!='-')
	{
		r=ctr=0;
		while(cin>>t,t)
			x[++r]=t;
		cin.get();
		for(i=1;i<=r;i++)
		{
			for(j=1;j<=r;j++)
			{
				if(x[i]==(x[j]<<1))
					ctr++;
			}
		}
		cout<<ctr<<endl;
	}
	return 0;
}
//* ??   *
//* author:??? *
//* time : 10.19  *
 


int main()
{
	int a[16] = {0};
	int i, j, k, n = 0;
	do
	{
    	for(i = 0; i <= 15; i++)
		{
		    cin >> a[i];
			if(a[0] == -1)
				break;
			if(a[i] == 0)
				break;
		}
                  if (a[0] == -1)
                       break; 
		for(j = 0; j <= i - 1; j++)
			for(k = 0; k <= i - 1; k++) 
			{
				if( a[j] == 2 * a[k])
					n++;
			}
            cout << n << endl;
			n = 0;
	}while(1);
	return 0;
}
// 1134 ?? 1000062708
int main()
{
	int i, j, k, a[16], m ;
	for(i = 0;a[0] != -1;i++)
	{
		int s = 0;
		cin >> a[0];
		if(a[0] == -1) break;
		for(j = 1;j<16;j++)
		{ cin >> a[j];
		if(a[j]==0) break;}
		for(k = 0;a[k] != 0;k++)
		{
			m = 2 * a[k];
			for(j = 0;a[j] != 0;j++)
			{
				if(a[j] == m)
						s++;
			}
		}
	cout << s << endl;
	}
	return 0;
}
int main()
{
	int a[10000]={0};
	int n,c,i=0,j=0;
	scanf("%d",&n);
	scanf("%d",&c);
	a[0]=c;	
	printf("%d",a[0]);
	for(i=1;i<=n-1;i++){
		scanf("%d ",&c);
		a[i]=c;
		for(j=0;j<=i-1;j++){
			if(c==a[j]) a[i]=0;}
			if(a[i]!=0) printf(" %d",a[i]);
	}
	return 0;
}
int main()
{
    int n,i,j,p=0;
    int a[100000];
    scanf("%d\n",&n);
    for(i=0;i<n;i++){
                     scanf("%d",&a[i]);
                     if(i==0){printf("%d",a[0]);}
                     else{
                     for(j=0;j<i;j++){
                                      if(a[i]==a[j]){p+=1;}
                                      }
                     if(p==0){printf(" %d",a[i]);}
                     p=0;
                     }
                     }
    return 0;
}
int main( )
{
	int n,i,j,k,a[20000],counter=0;
	cin>>n;
	for (i=0;i<n;i++)
	{
		cin>>a[i];
		for (j=0;j<i;j++)
			if (a[i]==a[j]) break;
		if(i==j) counter++;
	}
	for (i=0;i<n;i++)
	{
		for (j=0;j<i;j++)
			if (a[i]==a[j]) break;
		if(i==j)
		{cout<<a[i];
		counter--;
		if(counter!=0) cout<<' ';
		}
	}
	return 0;
}
/*
 * ????????.cpp
 *
 *  Created on: 2011-10-19
 *      Author: Administrator
 */
int main()
{
	int i,j,n;
	cin>>n;
	int a[n];
	cin>>a[0];
	cout<<a[0];
	for(i=1;i<n;i++)
	{
		cin>>a[i];
	    for(j=0;j<i;j++)
	    {
	    	if(a[i]==a[j])
	    		break;
	    	if(a[i]!=a[j]&&j==(i-1))
	    		cout<<" "<<a[i];
	    }
	}
	return 0;
}
int main()
{
    int a[100000];
    int n,i,j,s;
    s=0;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    scanf("%d",&a[i]);
   
    for(i=1;i<=n;i++)
    {s=0;if(i==1){printf("%d",a[1]);}else
                         {for(j=1;j<i;j++)
                     {
                                     if(a[j]==a[i])
                                     s=s+1;
                                     }
                                     if(s==0)
                                     printf(" %d",a[i]);}
                                     
                                     }
                                     getchar();
                                     getchar();
                                     getchar();
                                     }
int main()
{
	int n,i,j,b;
	int a[20000];
    scanf("%d",&n);
	i=0;
	j=0;
	b=0;
	while(i<n)
	{
		scanf("%d",&a[i]);
		i++;
	}
	i=1;
	printf("%d",a[0]);
	while(i<n)
	{
	    while((j<i)&&(b==0))
		{
			if(a[j]!=a[i]) j++;
			else b=1;
		}
		if(b==0) printf(" %d",a[i]);
		i++;
		j=0;
		b=0;
	}
	return 0;
}
void main()
{
int a[20001],b[101],c[101];
  int i,n,m;
  scanf("%d",&n);
  for (i=1;i<=n;i++) scanf("%d",&a[i]);
  for (i=0;i<=101;i++) b[i]=0; 
  m=0;
  for (i=1;i<=n;i++) if (b[a[i]]==0) {m=m+1; b[a[i]]=1; c[m]=a[i];}
  for (i=1;i<=m;i++) {if (i<m) printf("%d ",c[i]); else printf("%d",c[i]);}
}
int main()
{
    int n,i,j,l,f,m,k,t=0;
    scanf("%d", &n);
    int x[n],y,z[n];
    for(i=0;i<=n-1;i++){
                        scanf("%d", &x[i]);
                        z[i]=0;
                        }    
    for(j=0;j<=n-1;j++){
                        f=0;
                        for(l=0;l<=j-1;l++){
                                            y=x[j]-x[l];
                                            if(y==0){f=1;}
                                            }
                        if(f==0){z[t]=x[j];
                                  t+=1;
                                  }
                        }
    for(m=0;m<=n-1;m++){
                        if(z[m]==0){break;}
                        }
    for(k=0;k<=m-1;k++){if(z[k]!=0){printf("%d", z[k]);}
                        if(k<=m-2){printf(" ");}
                       }                        
                        return 0;
}
int main()
{
     int a[20000],i,n,k,t;
     cin>>n;
     for(i=0;i<=n-1;i++)cin>>a[i];
     cout<<a[0];
     for(i=1;i<=n-1;i++)
     {
          t=0;
          for(k=0;k<=i-1;k++)
          {
               if(a[i]==a[k])t=1;
          }
          if(t==0)cout<<" "<<a[i];
     }
     return 0;
}
void main()
{
 int n,i,a[20000],j,m=0,k;
 scanf("%d",&n);
 for(i=0;i<n;i++)
	 scanf("%d",&a[i]);
 for(i=n-1;i>=0;i--)
	 for(k=i-1;k>=0;k--)
		 if(a[i]==a[k])
		 {m++;
		  for(j=i;j<=n-m;j++)
		  a[j]=a[j+1];}
printf("%d",a[0]);
		 for(i=1;i<n-m;i++)
		 printf(" %d",a[i]);

}
int main()
{
	int n, i, a[200001], j, flag = 0;
	cin >> n;
	for (i = 1; i <= n; i++)
		cin >> a[i];
	cout << a[1];
	for (i = 2; i <= n; i++)
	{
		for (j = 1; j < i; j++)
		{
			if (a[j] == a[i])
			{
				flag = 1;
			}
		}
		if (!flag)
			cout << ' ' << a[i];
		flag = 0;
	}
	return 0;
}
int main()
{
	int n,a[20000],i,j;
	scanf("%d",&n);
	while(n<1||n>20000)
	{
		scanf("%d",n);
	}
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		while(a[i]<10||a[i]>100)
		{
			scanf("%d",&a[i]);
		}
	}
	for(i=0;i<n;i++)
	{
		for(j=i+1;j<n;j++)
		{
			if(a[i]==a[j])a[j]=0;
		}
	}
	printf("%d",a[0]);
	for(i=1;i<n;i++)
	{
		if(a[i]>0)printf(" %d",a[i]);
	}

	return 0;
}
int main()
{
int n,e;
e=0;
int a[20000];
scanf("%d",&n);
for(int i=0;i<n;i++){
     scanf("%d",&a[i]);
        }
for(int i=0;i<n;i++){
        for(int j=i+1;j<n;j++){
        if(a[i]==a[j]){
        a[j]=0;
                }
                }
                     }
for(int i=0;i<n;i++){
           if(e==0&&a[i]!=0){
           printf("%d",a[i]);
           e=1;
           }
           else if(e==1&&a[i]!=0){
                 printf(" %d",a[i]);
                             }
           
        }     
              
           
   
int hou;
scanf("%d",&hou);
return 0;
}
int main(){
	int a[20001],i,j,k,m=0,n=0;
	cin>>n;
	for(i=1;i<=n;i++)
		cin>>a[i];
	for(i=2;i<=n;i++)
			{for(j=1;j<i;j++)
			 {if(a[j]==a[i])
			   {
				 a[i]=10000;

			     }
		    }}
		cout<<a[1];
		for(i=2;i<=n-m;i++)
			if(a[i]!=10000)
			{cout<<" "<<a[i];}
		return 0;
}
/*
*????111019 02.cpp
*??????
*?????2011-10-19
*????????????
*/

int main( )
{
	int i,n;      //????
	cin>>n;     //??????
	int a[n];     //????
	for(i=0;i<n;i++)     //????
		cin>>a[i];
	for(i=0;i<n-1;i++)     //?????????????????
	{
		for(int j=i+1;j<n;j++)
		{	if(a[j]==a[i])     
			{
			for(int k=j;k<n;k++)
			    {a[k]=a[k+1];}     //?????????????????????
				n=n-1;
				j=j-1;
			}
			else continue;     //??????
		}
	}
	for(i=0;i<n-1;i++)
		cout<<a[i]<<" ";
	    cout<<a[n-1]<<endl;     //????
	return 0;
}
int main()
{
	int n,i,j,x[20000];                  //??????n?i?j???x[20000]???i,j????            
	cin>>n;
	for(i=0;i<n;i++)                     //?????n????????
	{
		cin>>x[i];
	}
    for(i=0;i<n;i++)
		for(j=i+1;j<n;j++)                 //?????????????
		{
			if(x[i]==x[j]&&i!=j)         //???????????0
			{
				x[j]=0;
			}
		}

    cout<<x[0];                          //????????????

	for(i=1;i<n;i++)
	{
		if(x[i]!=0)                      //?????if??????????????
		{
			cout<<" "<<x[i];
		}
	}
	cout<<endl;
	
	return 0;
}
int main() {
	int a[20001] = { 0 };
	int n;
	cin >> n;
	for ( int i = 1; i <= n; i ++ ) {
		cin >> a[i];
	}
	for ( int i = 1; i <= n; i ++ ) {
		for ( int j = 1; j <= i; j ++ ) {
			if ( i != 1 && a[j - 1] == a[i] ) a[i] = 0;
		}
	}
	for ( int i = 1; i <= n; i ++ ) {
		if ( i != 1 && a[i] != 0) cout << " " << a[i];
		else if ( i == 1) cout << a[i];
	}
	return 0;
}
main()
{
	int a[20000],n,i,j,k=0,b[20000];
	scanf("%d",&n);
	i=n;
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
		for(j=0;j<i;j++)
		{
			if(a[i]==a[j])
				break;
		}
		if(j==i)
		{
			b[k]=a[i];
			k++;
		}
	}
	for(i=0;i<k;i++)
	{
		printf("%d",b[i]);
		if(i-k+1)
			printf(" ");
	}
}
int main()
{
	int n,i,j,k,t;
	int a[20000];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
	printf("%d",a[0]);
	for(j=1;j<n;j++){
		for(k=0;k<j;k++){
			if(a[j]==a[k])
				a[j]=0;
		}
		if(a[j])
			printf(" %d",a[j]);
	}
	return 0;
}
int main()
{
    int n,i,k,a,time;
    k=1;
    time=0;
    scanf("%d",&n);
    int*sz=(int*)malloc(sizeof(int)*n);
    for(i=0;i<n;i++)
    {
                    scanf("%d",&sz[i]);
    }
    for(i=0;i<n-1;i++)
    {
                    for(k=i+1;k<n;k++)
                    {
                              if(sz[i]==sz[k])
                              {
                                              for(a=k;a<n-1;a++)
                                              {
                                              sz[a]=sz[a+1];
                                              }
                                              n--;
                                              k--;
                              }
                    }
    }
    for(i=0;i<n;i++)
    {
                         if(i==0)
                         printf("%d",sz[i]);
                         else if(i!=0)
                         printf(" %d",sz[i]);
    }
    free(sz);
return 0;
}
int main()
{
	int n, a[20000], b[20000]={0};
	int i, j, k = 0;
	cin >> n;
	for ( i = 0; i < n; i ++)
		cin >> a[i];
	for ( i = 0; i < n; i ++)
	{
		for ( j = i + 1; j < n; j ++)
		{
			if ( b[j] == 0 )
			{
				if ( a[i]== a[j] )
				{
				   b[j] = 1;
				   k ++;
				}
			}
		}
	}
	cout << a[0];
	for ( i = 1; i < n; i ++ )
	{
		if ( b[i] == 0)
			cout <<" "<< a[i];
	}
	return 0;
}
/*  ???????????
    ???????
	???2010?10?29?
	????????????????????????????????????????????????
*/
int main()
{
	int n , num[20001]={0} , number , i , j ;              //n???????????????????number?????
	cin >> n ;
	for (i = 1 ; i <= n ; i++)
	{                                                      //??????????num[1]?num[n]??num[0]?????
		cin >> number ;  
	    num[i] = number ;
	}
	for (j = 1 ; j <= n ; j ++)
		for (i = j + 1 ; i <= n ; i ++)
			if (num[j] == num[i])      num[i] = 0 ;       //?????????????????????????????????0?????????10-100??????0??????
	for (i = 1 ; i <= n ; i ++)
		if (num[i] != 0)  {cout << num[i] ; break ;}    
	for (j = i + 1 ; j <= n ; j++)
		if (num[j] != 0)  cout << " " << num [j] ;        //??????????????????????????????????????break????????" "num[j]
	return 0 ;
}
void main()
{
	int n,i,j,s[20000];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&s[i]);
	for(i=0;i<n;i++)
		for(j=0;j<i;j++)
		{
			if(s[j]==s[i])
				s[i]=0;
		}
		printf("%d",s[0]);
		for(i=1;i<n;i++)
		{
			if(s[i]!=0)
				printf(" %d",s[i]);
		}
		printf("\n");
}
main()
{
  int n,i,j,a[100000],b[100000],k,sum=0;
  scanf("%d",&n);
  for(i=0;i<n;i++)
    scanf("%d",&a[i]); 
  printf("%d",a[0]);
  for(i=1;i<n;i++)
  { 
    for(j=0;j<i;j++)
    {
      if(a[i]==a[j])
       break;
      else if(j==i-1)
        printf(" %d",a[i]);
    }
  }
}
int main()
{
    int n,i,j,t=0;
    int a[20000];
    scanf("%d",&n);
    scanf("%d",&a[1]);
    printf("%d",a[1]);
    for(i=2;i<=n;i++)
    {
    scanf("%d",&a[i]);
    for(j=1;j<i;j++)
    {
    t=0;
    if(a[i]==a[j]){
    t=1;
    break;
    }
    }
    if(t==0)
    printf(" %d",a[i]);
    }
      return 0;
}
void main()
{
	int n,i,j,k=0,m;
	int a[20000],b[20000];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&a[i]);
	for(i=0;i<n;i++)
	{
		if(a[i]!=0)
		{
		for(j=0;j<n;j++)
			if(a[i]==a[j])
			{
				if(i!=j&&a[j]!=0) a[j]=0;
			}
		}
	}
	for(i=0;i<n;i++)
		if(a[i]!=0)
		{
			b[k]=a[i];
			k++;
		}
	m=k;
	for(k=0;k<m-1;k++)
	printf("%d ",b[k]);
	printf("%d",b[k]);
}
int main()
{int k,i,j,l=0,excit=0;
 scanf("%d",&k);
 int num[k],shulie[k];
 
 for (i=1;i<=k;i++)
 { scanf("%d",&num[i-1]);
   for (j=0;j<=i-2;j++)
	   if (num[j]==num[i-1])
	   {  
		   excit=1;
	      break;
	   }
	if (excit==0)
	{shulie[l]=num[i-1];
	 l=l+1;
	}
	else excit=0;
 }
 printf("%d",shulie[0]);
 for (i=2;i<=l;i++)
		 printf(" %d",shulie[i-1]);
 }
int main()
{
    int n, s[200001] = {0}, k[100] = {0};
    cin >> n;
    for (int i = 0; i < n; i++)
    {
        cin >> s[i];
        k[s[i]]++;
    }
    int flag[100] = {0};
    for (int i = 0; i < n; i++)
    {
        if (k[s[i]] == 1 && flag[s[i]] == 0)
        {
            if (i == 0)
                cout << s[i];
            if (i != 0)
                cout << " " << s[i];
        }
        if (k[s[i]] != 1 && flag[s[i]] == 0)
        {
            if (i == 0)
                cout << s[i];
            if (i != 0)
                cout << " " << s[i];
            flag[s[i]] = 1;
        }
    }
    return 0;
}
int main() {
    int n, i, j, sign,counter;
    int a[20000];
    scanf("%d", &n);
    for (i=0;i<n;i++) {
        scanf("%d", &a[i]);
    }
    counter=0;
    for (i=0;i<n&&counter==0;i++) {
        sign=0;
        for (j=0;j<i;j++) {
            if (a[j]==a[i]) {
                sign=sign+1;
            }
        }
        if (sign==0) {
            printf("%d", a[i]);
            counter=counter+1;
        }
    }
    for (;i<n;i++) {
        sign=0;
        for (j=0;j<i;j++) {
            if (a[j]==a[i]) {
                sign=sign+1;
            }
        }
        if (sign==0) {
            printf(" %d", a[i]);
        }
    }

    return 0;
}
int main()
{
	int n,i,j,k,m;
	char a[50000];
	int b[20001];
	scanf("%d\n",&n);
	gets(a);
	k=strlen(a);
	i=0;
	j=1;
	while(i<=k-1)
	{
		b[j]=(a[i]-48)*10+(a[i+1]-48);
		i=i+3;
		j=j+1;
	}
	j=j-1;
	printf("%d",b[1]);
	i=2;
	while(i<=j)
	{
		m=1;
		while(m<i)
		{
			if(b[i]==b[m]) break;
			m=m+1;
		}
		if(m==i) printf(" %d",b[i]);
		i=i+1;
	}
	return 0;
}
int main()
{
	int n,i,j,a[20001],flag[20001]={0},k=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&a[i]);
	for(i=0;i<n;i++)
	{
		for(j=i+1;j<n;j++)
		{
			if(a[j]==a[i])
				flag[j]=1;
		}
		if(flag[i]==0 && k==0)
			{
				printf("%d",a[i]);
				k++;
			}
		else if(flag[i]==0)
			printf(" %d",a[i]);
	}
}
int a[30000];
int find(int k)  //???????a[k]?????
{
	 int i;
     for(i=0;i<k;i++)
     
     {
		 if(a[i]==a[k])
		 return 1;
      }                            //???????
      
	  return 0;              //??????
}

int main()
{
      int n;
      cin>>n;          //?????????
      for(int i=0;i<n;i++)
      cin>>a[i];       //?????

      cout<<a[0];
      for(int k=1;k<n;k++)
      {
      if(find(k)==0)
      cout<<" "<<a[k];
	  
       }               //?????????????
	  return 0;
}
void main ()
{
int a[20000],n,i,c,j,k=0,p;
scanf ("%d",&n);
for (i=0;i<n;i++)
{
scanf ("%d",&c);
p=1;
for (j=0;j<k;j++)
 if (a[j]==c) p=0;
if (p) {a[k]=c;k++;} 
}
for (i=0;i<k-1;i++)
printf ("%d ",a[i]);
printf ("%d",a[i]);
 }
int main()
{
	int a[20000]={0};
	int b[20000]={0};
    int n,i,j,t,m;
    cin >>n;
    for(m=0;m<=n-1;m++)
	{
		cin >> a[m];
	}
    for(i=0;i<=n-1;i++)
    {
		for(j=0;j<i;j++)
		{
			if(a[j]==a[i])
			b[i]=1;
		}
	}
	cout << a[0];
    for(t=1;t<=n-1;t++)
	{
		if(b[t]==0)
		cout << " " << a[t];

	}
	return 0;
}
int main()
{
	int n,a[20000],t;
	cin>>n;
	for(int i=0;i<n;i++)
	cin>>a[i];
	cout<<a[0];
	for(int i=1;i<n;i++)
	{
		t=0;
		for(int j=0;j<i;j++)
		{
			if(a[j]==a[i]&&j!=i)
				t+=1;
		}
		if(t>=1)
			continue;
		else if(t==0)
			cout<<" "<<a[i];
	}
	return 0;
}
void main()
{
	int n;
	scanf("%d",&n);
    int i;
	int a[20000];
	for (i=0;i<=n-1;i++)
	scanf("%d",&a[i]);
	int j,tag=0;
	printf("%d",a[0]);
	for(i=1;i<=n-1;i++)
	{tag=0;
		for(j=0;j<=i-1;j++)
		{if (a[j]==a[i]) tag++;}
	if (tag==0)  printf(" %d",a[i]);
	}

		

}
int main()
{
	int n,i,a[20001],x=0,t,m;
	memset(a,0,sizeof(a));
		  cin>>n;
		  cin>>m;
		  cout<<m;
		  a[m]=1;
	for(i=2;i<=n;i++)
	{
		cin>>t;
	if(a[t]!=1)
	{
		cout<<" "<<t;
		a[t]=1;
	}
	}
	return 0;
}
int main()
{
int n,i,j,k;
scanf("%d\n",&n);
int c[n];
scanf("%d",&c[1]);
printf("%d",c[1]);
for(i=2;i<=n;i++)
{
scanf("%d",&c[i]);
for(j=1;j<=i-1;j++)
{
if(c[j]==c[i]) break;
}
if(j==i) printf(" %d",c[i]);
}
return 0;
}
int main(){
	int n,i,j,timer,k,k0;
	timer=0;
	k0=0;
	k=-1;
	int l[100000],r[100];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&l[i]);
	}
	for(i=0;i<n;i++){
		for(j=i+1;j<n;j++){
			if(l[i]==l[j]){
				l[j]=10000;
			}
		}
	}
	for(i=0;i<n;i++){
		if(l[i]==10000){
			timer++;
		}
	}
//	printf("n-t=%d",n-timer);
	for(i=0;i<n;i++){
		if(l[i]!=10000){
//			printf("%d\n",l[i]);
			k0++;
			k++;
			r[k]=l[i];
		}else{
			continue;
		}
	}
	for(i=0;i<k0;i++){
		if(k==0){
			printf("%d",r[i]);
		}else if(k!=0&&i<k0-1){
			printf("%d ",r[i]);
		}else if(i==k0-1){
			printf("%d",r[i]);
		}
	}
	return 0;
}
int main()
{
	int n,i1,i2,i3,flag=1;        /*i1????????????i2,i3???????????????????n??????*/
    int a[20000];
	scanf("%d",&n);
	for(i1=0;i1<n;i1++)
		scanf("%d",&a[i1]);
	printf("%d",a[0]);
	for(i2=1;i2<n;i2++)
	{
		flag=1;
		for(i3=0;i3<i2;i3++)
		{
			if(a[i2]==a[i3])
				flag*=0;
		}
	    if(flag==1)
			printf(" %d",a[i2]);
	}
	return 0;
}
int main()
{
    int n,i,j,k=0;               //i j???? k???????????
    cin>>n;
    int a[n];
    cin>>a[0];cout<<a[0];
    for(i=1;i<n;i++)
            {cin>>a[i];
             for(j=0;j<i;j++)
                   if(a[i]==a[j])k++;     //??????????????k??
             if(k==0)cout<<" "<<a[i];      //k==0????? 
             k=0;}                            //k?? 
    return 0;
}
int main()
{
    int b,c,n,i;
    scanf ("%d",&n);
    int a[n];
    for (i=1;i<=n;i++)
     {
       scanf ("%d",&a[i]);
     }
    for (i=1,b=1;i<=n;i++,b++)
     { 
       if (b==1)
       printf("%d",a[i]);
       else
        {
        for (c=1;c<=i;c++)
         {
            if(a[c]==a[i])
             break;
         }
         if (c==i)
         printf (" %d",a[i]);
        }
     }
    getchar();     
    getchar();
}
int main()
{
	int n;
	scanf("%d\n",&n);
	int a[20000];
	int i,j;
	for(i=0;i<=n-1;i++)
		scanf("%d",&a[i]);
	printf("%d",a[0]);
    for(i=1;i<=n-1;i++)
	{
		int k;
		k=0;
		for(j=1;j<=i-1;j++)
		{
		  if(a[i]!=a[j])
			  k=k+0;
		  else
			  k=k+1;
		}
		if(k==0 && a[i]!=a[0])
			printf(" %d",a[i]);
	}
	return 0;
}
/*
 * 1000012858_26.cpp
 *
 *  Created on: 2010-11-3
 *      Author: Administrator
 */
int main()
{
	int f[20001];
	int i,n;
	cin>>n;
	for (i=1;i<=n;i++)
		f[i]=0;
	for (i=1;i<=n;i++)
	{
		int a;
		cin>>a;
		if (f[a]==0)
		{
			f[a]=1;
			if (i!=1) cout<<' ';
			cout<<a;
		}
	}
	return 0;
}
int main()
{
	int n,a[20000],b[20000],i,j,r,t,s;
	scanf("%d",&n);
	s=1;
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
	b[0]=a[0];
	for(i=1;i<n;i++){
		t=0;
		for(j=0;j<i;j++){
			if(a[i]==a[j]){
				t++;
			}
		}
		if(t==0){
			b[s]=a[i];
			s++;
		}
	}
	for(r=0;r<s-1;r++){
		printf("%d ",b[r]);
	}
	printf("%d",b[s-1]);
	printf("\n");
	return 0;
}
int main()
{
    int n,i,j,k,b,t;
    int a[20000];
    scanf("%d",&n);
    k=0;
    for (i=0;i<n;i++)
    {
        j=1;
        scanf("%d",&b);
        for (t=0;t<k;t++)
        {
            if (b==a[t])
               j=0;
        }
        if (j==1)
        {
            a[k]=b;
            k++;
            if (k==1)
               printf("%d",b);
            else
               printf(" %d",b);
        }
    }
    getchar();
    getchar();
}
int main()
{
	int n,i,j,cal=0,enter=1,num=0;
	int a[100001]={0},b[100001]={0};
	scanf("%d",&n);
	for (i=1;i<=n;i++)
	{
		scanf("%d",&a[i]);
	}
	for (i=1;i<=n;i++)
	{
		for (j=1;j<=num;j++)
		{
			if (a[i]==b[j])
			{
				goto next;
				break;
			}
		}
		if (enter==1)
		{
			printf ("%d",a[i]);
			enter=0;
		}
		else
			printf (" %d",a[i]);
		num++;
		b[num]=a[i];
next:
		b[0]=0;
	}
	return 0;
}
void main()
{
	int n,a[20000],i,j,k;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
		k=0;
		for(j=0;j<i;j++){
			if(a[j]==a[i])
				k=1;	
		}
		if(k==0&&i==0)
			printf("%d",a[i]);
		else if(k==0)
			printf(" %d",a[i]);
	} 
}
int main()
{
   int n,a[20000],b[101]={0},i,num=0;
   cin >> n;
   for(i=0;i<n;i++)
    cin >> a[i];
   for(i=0;i<n;i++)
  {
    b[a[i]]++;
    if (b[a[i]]==1)
{
    num++;
    if(num==1)
    cout<<a[i] ;
    if(num!=1)
    cout<<" "<<a[i];
}
   }
  return 0;
}
int a[101];
int main()
{
  int q=0,temp,n,i,flag=0,t[200];
  memset(a,0,sizeof(a));
  	scanf("%d",&n);
  	for(i=0;i<n;i++)
  	{ 
	  scanf("%d",&temp);
	  if(a[temp]==0)
	  t[q++]=temp;
	  a[temp]++;	  	
    }
    for(i=0;i<q;i++)
    {
    	if(flag==0) flag=1;
    	else printf(" ");
    	printf("%d",t[i]);
    }
}
/*
 * wangge25.cpp
 *
 *  Created on: 2010-11-6
 *      Author:???
 */
int main()                       //???
{
	int n,i,j,k,t=0;                 //??????n,i,j,k,t??t ????0
	cin>>n;                             //??n??
	int a[n];                      //??????a[i]
	for(i=0;i<n;i++){                  //???????i
	cin>>a[i];                       //????a[i]??????
	}
	for (i=0; i<n; i++ )                   //???????i
			if (a[i]>=0)                          //??a[i]????0
				for (j=i+1; j<n; j++ )              //???????j
					if (a[i]==a[j]) a[j]=-1;       //??a[i]??a[j]??a[j]???-1

		for (i=0; i<n; i++ )                     //???????i
			if (a[i]>=0)                        //??a[i]??0???????
			{
				if (i>0) cout<<' ';             //??a[i]????0????????
				cout<<a[i];                  //????a[i]??
			}

		return 0;                           //?????
	}
int main()
{
  int jud[200],num[30000],n,i,j,sum,res[200];
  scanf("%d",&n);
  sum=0;
  for(i=1;i<=100;i++)
   jud[i]=0;
  for(i=1;i<=n;i++)
   {
    scanf("%d",&num[i]);
    if(jud[num[i]]==0) 
     {
       sum++;
       res[sum]=num[i];
       jud[num[i]]=1;
      }
    }
  for(i=1;i<sum;i++)
   printf("%d ",res[i]);
  printf("%d",res[sum]);
  return 0;
}
int main(){
	int i,n;
	scanf("%d",&n);
	int *N
		=(int*)malloc(sizeof(int)*n);
	for(int k=0;k<n;k++)
	{
		scanf("%d",&(N[k]));
	}
	for(i=1;i<n;i++)
	{
		for(int r=0;r<i;r++)
		{
		if(N[i]==N[r])
		{
			for(int j=i;j<n;j++)
			{
				N[j]=N[j+1];
			}
			n--;
			i--;
		}
		}
	}
	for(i=0;i<n;i++)
	{
		if(i==n-1)
			printf("%d",N[i]);
		else
			printf("%d ",N[i]);
	}
	return 0;
}
int main()                                          //?????
{
	int k,n,b[20001],c[20001],i=0,j=1,l,m;          //???????i,j,l??????n????????k????????
	cin>>n;                                         //b???????????????????c????????
	for(l=0;l<20001;l++)                            //???b????0
	{b[l]=0;}
	for(m=0;m<20001;m++)
	{c[m]=0;}
	while(j<=n)                                     //?????????
	{cin>>k;
	if(b[k]==0)                                     //??k?????
	c[i]=k;                                         //??????c[i]
	b[k]++;                                         //??K????
	i++;
	j++;}
	cout<<c[0];
	for(i=1;i<n;i++)                               //????????????
	   {
		   if(c[i]!=0)                             
		   {cout<<" "<<c[i];} 
		                                           //???????c???????
	   }
	
	
    return 0;
}                                                  //?????