semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int a[100000],i,j,k,l,m,n;
	scanf("%d",&n);
	l=0;
	for(i=1;i<=n;i++)
	{
		scanf("%d",&a[i]);
	}
	
	for(i=1;i<=n;i++)
	{   
	
		
			
			m=0;
			for(k=1;k<i;k++)
			{
				if(a[k]!=a[i])
					m=m+1;

			}
			if(m==i-1)
			{l=l+1;
			if(l==1)
				printf("%d",a[i]);else printf(" %d",a[i]);}
			
		
	
	}
	
	return 0;
}
int main(){
 int n,i,j,k=1,a[20001],b[20001],f;
 scanf("%d",&n);
 for(i=0;i<n;i++){
     scanf("%d",&a[i]);
     if(i==0) b[0]=a[0];
     f=0;
     for(j=0;j<i;j++){
            if(a[i]==a[j]) break;
            else f++;
            
         
            }
     if(f==i){ 
     b[k]=a[i];k++;  
    } 
        } 
    
    for(i=1;i<k-1;i++){
        printf("%d ",b[i]);
        }
    printf("%d",b[k-1]);
    scanf("%d",&n);
    return 0;
    }
int main()
{
	int n,i,j,k,js,cunzai;
	scanf("%d",&n);
	int*a=(int*)malloc(sizeof(int)*n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}
	printf("%d",a[0]);
/*	if(n!=1)
	{
		for(i=0;i<n-1;i++)
		{
			if(a[i]!=a[i+1])
				cunzai=1;
		}
		if(cunzai==1)
			printf(" ");
	}
*/	
	for(i=1;i<n;i++)
	{
		cunzai=0;
		js=0;
		for(j=0;j<i;j++)
		{
			if(a[i]==a[j])
				js++;
		}
		if(js==0)
		{
			printf(" %d",a[i]);
/*			js=0;
			cunzai=0;
			if(i!=(n-1))
			{
				for(j=i;j<n;j++)
				{
					for(k=0;k<j;k++)
					{
						if(a[k]==a[j])
							js++;
					}
					if(js==0)
					{
						cunzai=1;
					}
				}
				if(cunzai==1)
					printf(" ");
			}
*/
		}
	}
	return 0;
}
int main()
{
    int n,i,j,m,y;
    scanf("%d", &n);
    int a[20000];
    int b[20000];
    for(i=0;i<n;i++)
    {
                    scanf("%d", &a[i]);
    }
    printf("%d", a[0]);
    
    for(i=1;i<n;i++)
    { 
                    y=0;
                    for(j=0;j<=i-1;j++)
                    {
                          if(a[i]==a[j])
                          {
                                y++;
                          }
                    }
                    if(y==0)
                    printf(" %d", a[i]);
    }             

    return 0;
}
int main()
{ 
   int k,i,j,m;
    int x[20000]={0};
    scanf("%d",&k);
    for(i=0;i<=k-1;i++) scanf("%d",&x[i]);
     printf("%d",x[0]);
    for(i=0;i<=k-2;i++)
    {
                       for(j=i+1;j<=k-1;)
                       {
                                            if(x[i]==x[j])
                                            {
                                                          for(m=j+1;m<=k-1;m++) x[m-1]=x[m];
                                                          k--;
                                                          }  
                                                        else j++;            
                                            }
                       }
    for(i=1;i<=k-1;i++) printf(" %d",x[i]);
}
int main()
{
	int n,a,b;
	int z[30000];
	int c[30000];
	int x[101];
	scanf("%d",&n);
	for(a=10;a<=100;a++)
	{
		x[a]=1;
	}
	for(a=1;a<=n;a++)
	{
		scanf("%d",&z[a]);
	}
	b=1;
	for(a=1;a<=n;a++)
	{
		if(x[z[a]]==1)
		{
			c[b]=z[a];
			b+=1;
		    x[z[a]]=0;
		}
	}
    for(a=1;a<=b-1;a++)
	{
		if (a<b-1)
			printf("%d ",c[a]);
		else
			printf("%d",c[a]);
	}
	return 0;
}
int main()
{
    int a[20000],n,i,j;
    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])
            {j=i;}
            else
            {j=j;}

        }
        if(j==i)
        printf(" %d",a[i]);
    }
    return 0;
}
int main()
{
int sz[100000],a[100],n,i,d;
scanf("%d",&n);
for(i=0;i<100;i++)
{
	a[i]=1;

}
scanf("%d",&sz[0]);
printf("%d",sz[0]);
a[sz[0]]=0;
for(i=1;i<n;i++)
{
	scanf("%d",&sz[i]);
		d=sz[i];
		if(a[d]!=0)
		{
			printf(" %d",sz[i]);
		}

	a[d]=0;
}


return 0;

}
int main()
{
	int n,i,j,l,k;  //??????
	cin>>n;         //??n??
	int a[20001];   //????
	for ( i=0; i<n; i++)
		cin>>a[i];
	for ( i=0; i<n; i++)  //??????i
	{
		for (j=i+1; j<n; j++)  //??????j
		{
		    if (a[i]==a[j])   //??????
                {
                    for (k=j; k<n-1; k++)
                        a[k]=a[k+1];//????
                    n=n-1;
                    j=j-1;
                }

		}
	}
		for (l=0; l<n; l++)
cout<<a[l]<<setw(3);//???????
return 0;           //??????????????????
}                 //????
int main()
{
    int n,i,j,flag=0;
    int *p;
    scanf("%d",&n);
    p=(int *)malloc(sizeof(int)*n);
    scanf("%d",&p[0]);
    printf("%d",p[0]);
    for(i=1;i<=n-1;i++)
    {
         scanf("%d",&p[i]);
         for(j=0;j<i;j++)
         {
              if(p[i]==p[j])
              flag=1;
         }
         if(flag==0)
         printf(" %d",p[i]);
         flag=0;
    }
    return 0;
}
int main()
{
    int n,i,j;
    int a[20001];
    scanf("%d",&n);
    for (i=0;i<n;i++)
    {scanf("%d",&a[i]);}
    
    for(j=0;j<n;j++)
    {
       if(a[j]>=10&&a[j]<=100)
       {
       for(i=j+1;i<n;i++)
       {
          if(a[i]>=10&&a[i]<=100)
          {if(a[j]==a[i])
          {a[i]=0;}}                                    
       }
       }                                   
    }
    printf("%d",a[0]);
    for (i=1;i<n;i++)
    {
        if (a[i]!=0)
    {printf(" %d",a[i]);}
    }
    
    getchar();
    getchar();
    getchar(); 
    
    
    
    
    
}
int main()
{
	int n, i;
	cin >> n;
	int num, count[100] = {0};
	cin >> num;
	count[num]++;
	cout << num;
	for(i = 2; i <= n; i++)
	{
		cin >> num;
		count[num]++;
		if(count[num] == 1)
			cout << " " << num;
	}
	return 0;
}
/*
 * 1000010400_27.cpp
 *
 *  Created on: 2010-10-29
 *      Author: ??
 *      Function:????????
 */

int main()
{
	int n;
	cin>>n;//??????????
	int a[20000];
	int i;
	for(i=0;i<n;i++)
		cin>>a[i];//???????
	int j;
	int k;
	for(i=0;i<n;i++)
		{
		    j=i+1;
		    while(j<n)
			if(a[i]==a[j])//??a[i]??????????a[i]
			{
				n--;
				for(k=j;k<n;k++)
				a[k]=a[k+1];//?????
			}
			else j++;
		}
	for(i=0;i<n-1;i++)
		cout<<a[i]<<" ";//????
	cout<<a[n-1];
	return 0;
}
int main()
{
	int n,i,j,t,a[20000];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&a[i]);
	}
	for(i=0;i<n;i++)
	{
		t=0;
		if(i==0) printf("%d",a[0]);
		else
		{
			for(j=0;j<i;j++)
			{
				if(a[i]==a[j]) t=t+1;
			}
			if(t==0) printf(" %d",a[i]);
		}
	}
	return 0;
}
//*********************************************
//????4.cpp
//???????????
//?????
//???2010.10.25
//*********************************************
//*********************************************
//????4.cpp
//???????????
//?????
//???2010.10.25
//*********************************************
int main()
{
	int n,i,j,k=0,a[20000];                           //????
	cin>>n;                                           //????
	for(i=0;i<n;i++)                                  //for??????????
		cin>>a[i];
	for(i=0;i<n;i++)                                  //for??
	{
		for(j=0;j<i;j++)                              //for?????j???j+1??????
		if(a[j]==a[i])                                //????
		{
		   a[i]=-1;                                   //??????????-1?????
		   break;                                     //??????????
		}
	}
	cout<<a[0];                                       //????????
	for(i=1;i<n;i++)                                  //for??
		{
			if(a[i]>0)                                //????????
			cout<<" "<<a[i];
	    }
return 0;	
}
int main()
{
	int n,end;
	cin >> n;
	int a[n], b[n];
	memset(b, 0, sizeof(b));
	for (int i = 0; i < n; i++)
	{
		cin >> a[i];
	}
	for (int i = 0; i < n; i++)
		for (int j = i + 1; j< n; j++)
		{
			if(a[i] == a[j])
			{
				b[j] = 1;
			}
		}
	for (int i = n-1; i >= 0; i--)
	{
		if(b[i]==0)
		{
			end = i;
			b[i] = 1;
			break;
		}
	}
if(end!=0)
	{for (int i = 0; i < n; i++)
	{
		if(b[i] == 0)
		cout << a[i] << " " ;
	}}
	cout << a[end] << endl;
	return 0;
	
}
int main()
{
    int a[20000];
    int check[100]={0};
    int n,i;
    
    scanf("%d",&n);
    for (i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    
    for (i=0; i<n; i++)
    {
        if (check[a[i]]==0)
        {
            if (i==0) {
                printf("%d",a[i]);
            }
            else
            {
                printf(" %d",a[i]);
            }
            check[a[i]]=1;
        }
    }
    return 0;
}
int main()
{
	int n,a[100000],i,h=1,j,b[100000];
	scanf("%d",&n);
	for(i=0;i<=n-1;i++)
	{
		scanf("%d",&a[i]);
	}
	for(i=0;i<=n-1;i++)
	{
		for(j=0;j<i;j++) 
		{
			if(a[i]==a[j])
				break;
		}
		if(j==i)
		{ 
			b[h]=a[i];h++;		
		}
	}
	for(i=1;i<=h-1;i++)
	{
		if(i<h-1)printf("%d ",b[i]);
			else if(i==h-1) printf("%d",b[i]);
	}
}
int main()
{
	int a[20000],i,j,m,k,n;
	scanf("%d",&k);
	for(i=0;i<k;i++)
		scanf("%d",&a[i]);
	printf("%d",a[0]);
	for(i=1;i<k;i++)
	{
		for(j=0,m=1;j<=i-1;j++)
		{
			if(a[i]==a[j])
			n=0;
			else
				n=1;
			m=m*n;
		}
		if(m==1)
			printf(" %d",a[i]);
			

	}
	return 0;
}
/*
 * shuzibuchong.cpp
 *
 *  Created on: 2013-10-30
 *      Author: ???1300012996
 */
int main(){
	int n,i,m;
	cin>>n;
	int a[n];
	for (i=0;i<n;i++){
		cin>>m;a[i]=m;
	}
	for(int ii=0;ii<n;ii++)
		for(int j=ii+1;j<n;j++){
			if (a[j]==a[ii]){a[j]=101;}//???????????????????
		}
	int b=1;//?????
	for(int l=0;l<n;l++){

		if(a[l]<100&&b==1){cout<<a[l];b+=1;}
		else if(a[l]<100&&b!=1)cout<<' '<<a[l];
	}
	return 0;
}
int main()
{
    int n,i=0,j=0,s=0,num=0,k=0;
	int a[20006];
	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[i]==a[j])
			{
				for(k=j;k<n;k++)
				{
					a[k]=a[k+1];
				}
				n--;
				j--;
				s++;
			}
		}
	}

	for(i=0;i<n;i++)
	{
		printf("%d",a[i]);
		if(i!=n-1)
			{
				printf(" ");
			}
	}
    return 0;
}
int main()
{
    int n;
    int a[N];
    int i,j;

    scanf("%d",&n);

    for(i=0;i<n;i++)
    {
        scanf("%d",&a[i]);
    }

    for(i=0;i<n;i++)
    {
        if(i==0)
        {
            printf("%d",a[i]);
        }

        else
        {
            for(j=0;j<i;j++)
            {
                if(a[j]==a[i])
                {
                    break;
                }
            }
            if(j==i)
            {
                printf(" %d",a[i]);
            }
            else if(j<i)
            {
                continue;
            }
        }
    }

    return 0;
}
int main(){
	int n,on=0;
	cin>>n;
	int input_array[n],output_array[100],otn_array[n];
	memset(output_array,0,sizeof(output_array));
	for(int i=0;i<n;i++) cin>>input_array[i];
	for(int i=0;i<n;i++){
		int otn=input_array[i];
		if(!output_array[otn-1]){
			output_array[otn-1]=1;
			otn_array[on]=otn;
			on++;
		}
	}
	for(int i=0;i<on;i++){
		cout<<otn_array[i];
		if(i!=on-1) cout<<' ';
	}
	return 0;
}
int main()
{
	int n,i,j,s=0,a[20000],sign;
	int b[20000]={0};
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
		sign=0;
		for(j=0;j<i;j++){
			if(a[j]==a[i]){
				sign=sign+1;}
		}
		if(sign==0){
			b[s]=a[i];
			s++;
		}
	}
	for(i=0;i<s;i++){
		if(i!=s-1)(printf("%d ",b[i]));
                else printf("%d",b[i]);}
	return 0;
}
int main()
{
	int n, a[20000]={0}, i, j;
	cin >> n;
	for (i = 0; i <= n - 1; i++)
	{
		cin >> a[i];
		for (j = 0; j <= i - 1; j++)
		{
			if (a[i] == a[j])
			{
				i = i - 1;
				n--;
				break;
			}
		}
	}
	if ((n - 2) >= 0)
	{
	  for (i = 0; i <= n - 2; i++)
	  {
		cout << a[i] << " ";
	  }
	  cout << a[n - 1];
	}
	else
		cout << a[0];
	 
	return 0;
}
/**
  *file  ????????
  *author ???
  *date   10.27
  *function ??n????n???????????????10-100??? 
            ??????????????????????????????????????????? 
*/
int main()
{
	int n, a[20001], i, j;
	cin >> n;
	for(i = 1; i <= n; i++)				//???n??
	{
		cin >> a[i];
	}
	cout << a[1];
	for(i = 2; i <= n; i++)
	{
		for(j = i - 1; j >= 1; j--)
		{
			if(a[j] == a[i])
			{
				break;
			}
		}
		if(j == 0)						//??j??0????????????
		{
			cout << " " << a[i]; 
		}
	}
	return 0;
}
/*??
??n????n???????????????10-100??? 
???????????????????????????????????????????
????
??????? 
??????????n?1<=n<=20000?????????????????? 
???????????n????????????10???100?
????
???????????????????????????????????????*/
int main() {
	int n[101]={
		0
	};//n[i]????i??????
	int nin;//cin:nin
	cin >>nin;
	int N;int num[nin],count=0;//?? 
	for (int i=1;i<=nin;++i){
		cin >>N;
		if(!n[N]){
			num[count]=N;count++;
		}n[N]++;//????????????,??? 
	}
	for(int i=0;i<=count-2;++i)cout<<num[i]<<' ';
	cout<<num[count-1];
	return 0;
}
int  main ()
{  

	int  n,i,j,k;
	cin>>n;
	int a[20001];
	for (i=0;i<n;i++)
	{
		cin>>a[i];
	}
	for (i=0;i<n;i++)
	{
		k=0;
		if (i==0)
			cout<<a[i];
		for (j=0;j<i;j++)
		{
			if (a[i]==a[j])
				k++;
		}
			if(k==0&&i!=0)
				cout<<" "<<a[i];
		
	}
		return 0;
	}
int main()
{
    int n,k=0;
    scanf("%d",&n);
    int i,j;
    int a[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[j]!=a[i]) 
    k++;}
    if(k==i)
    printf(" %d",a[i]);
    k=0;
    }
    getchar();
    getchar();
}
int main()
{
    int n,a[200000],i,b[200000],j=1,d=0;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
                     scanf("%d",&a[i]);
                     b[j]=a[i];
                     j++;
    }
                     printf("%d",b[1]);
    for(j=2;j<=n;j++)
    {
                     d=0;
                     for(i=1;i<=j-1;i++)
                     {
                                      if(b[j]==a[i])
                                      {d++;}
                     }
                     if(d==0)
                     printf(" %d",b[j]);
    }
    getchar();
    getchar();
    getchar();
}
int main()
{int a,b,c,d,e,s[20000],ct=0;
scanf("%d",&a);
for(b=1;b<=a;b++)
{scanf("%d",&c);s[b]=c;d=0;
for(e=1;e<=b-1;e++){if(s[b]==s[e])d=1;
}if(d==0){
if(ct==1)printf(" ");printf("%d",s[b]);ct=1;}
}return 100;}
void main()
{
	int n,a[20000],i=2,j,k;
	scanf("%d",&n);
	scanf("%d",&a[1]);
	while(i<=n)
	{
		scanf("%d",&a[i]);
		i=i+1;
	}
	printf("%d",a[1]);
	for(i=2;i<=n;i=i+1)
	{
		if(a[i]==a[1]) a[i]=0;
	}
	for(k=2;k<=n;k=k+1)
	{
		if(a[k]!=0)
		{
		printf(" %d",a[k]);
		for(j=k+1;j<=n;j=j+1)
		{
			if(a[j]==a[k])
			{a[j]=0;}
		}
		}
	}
}
int main()
{
	int n,i,j;
	scanf("%d",&n);
	int *shuzu=(int*)malloc(sizeof(int)*n);
	for(i=0;i<n;i++)
	{
	  scanf("%d",&shuzu[i]);
	}
	printf("%d",shuzu[0]);
	for(i=1;i<n;i++)
	{
	  for(j=0;j<i;j++)
	  {
		  if(j<i-1)
		  {
		    if(shuzu[i]==shuzu[j])
		    {
		      break;
		    }
		  }
		  if(j==i-1)
		  {
		    if(shuzu[i]!=shuzu[j])
			{
			  printf(" %d",shuzu[i]);
			}
		  }
	  }
	}
	return 0;
}
//*************************************************
//***???????????***
//***??????***
//***???2012.12.19***
//*************************************************
int main ()
{
	int n,i,a[20000],b[100];
	memset(b,0,sizeof(b));
	cin >> n;
	for (i = 0; i < n; i++)        //????
	{
		cin >> a[i];
	}
	cout << a[0];                  //a[0]????
	b[a[0]] = 1;
	for (i = 1; i < n; i++)        
	{
		if(b[a[i]] == 0)           //???????????
		{
			cout << " " << a[i];
			b[a[i]] = 1;          //???????????
		}
	}
	return 0;
}
int main()
{
	int n,i,a[100],k,b[100],j;
	scanf("%d",&n);
	for (i=1;i<=100;i++)
		a[i]=0;
	j=1;
	for (i=1;i<=n;i++)
	{
		scanf("%d",&k);
	
		if (a[k]==0) {
			b[j]=k;
			j++;
		}
		a[k]=1;
	}
	for (i=1;i<(j-1);i++)
		printf("%d ",b[i]);
	printf("%d",b[j-1]);

	return 0;
}
//***********************
//**????????*****
//**???1300012728*****
//**2013.10.20***********
//***********************
int main()
{
	int n;
	cin >> n;
	int num[n];                        // ???????n???
	cin >> num[0];
	cout << num[0];                    // ???????????????????? 
	for (int i = 1; i < n; i++)
	{
		cin >> num[i];
		for (int j = 0; j < i; j++)
		{
			if (num[j] == num[i])      // ?????????? 
			num[i] = 0;
		}
		if (num[i])                    // ????????????????? 
		cout << ' ' << num[i];
	}
	return 0;
}
int main()
{
	int n,i,j;

     scanf("%d",&n);

    int a[30000]={0};

     for (i=0;i<=n-1;i++)
{ 
scanf("%d",&a[i]);

}
printf("%d",a[0]);
for (i=0;i<=n-1;i++)
   
{
  for (j=0;j<=n-1;j++)
   {
if (a[i]==a[j]) break;


if (j==i-1) 
{ 

	printf(" ");
	printf("%d",a[i]);


}
}

}

return 0;
}
int main()
{
    int n,i,j,k,m=0;
    cin>>n;
    int a[n];
    for(i=0;i<n;i++)
        cin>>a[i];                               //????
    for(i=0;i<=n-m;i++)
    {
        for(j=i+1;j<=n-m;j++)
        {
            if(a[j]==a[i])
            {
                m=m+1;                           //??????
                for(k=j;k<=n-m;k++)              //??????????????????
                    a[k]=a[k+1];
                     j=j-1;
             }
        }
    }
    for(i=0;i<n-m-1;i++)
        cout<<a[i]<<" ";
    cout<<a[n-m-1]<<endl;                       //????
    return 0;
}
int main()
{
	int n,*a,i,j,r,d=0;
	scanf("%d",&n);
	a=(int*)malloc(sizeof(int)*n);
	for(i=0;i<n;i++)
		scanf("%d",&*(a+i));
	for(i=0;i<n;i++)
	{
		r=0;
		for(j=0;j<i;j++)
		{
			if(*(a+i)==*(a+j))
				r=1;
		}
		if(r==0&&d==0)
		{printf("%d",*(a+i));d=1;}
		else if(r==0&&d==1)
			printf(" %d",*(a+i));
	}
	return 0;
}
int main()
{
	int n;
	cin >> n;
	int mark[101];
	for (int i = 0; i < 101; i++)
		mark[i] = 0;
	int num[20005];
	for (int i = 0; i < n; i++)
	{
		cin >> num[i];
	}
	cout << num[0];
	mark[num[0]] = 1;
	for (int i = 0; i < n; i++)
	{
		if (mark[num[i]] == 0)
		{
			mark[num[i]] = 1;
			cout << " " << num[i];
		}
	}
	cout << endl;
	return 0;
}
int main()
{
    int n, num[90]={0}, a[20001]={0}, i;
    cin >> n;
    cin >> a[1];
    num[a[1]-10]++;
    cout << a[1];
    for (i=2;i<=n;i++)
    {
        cin >> a[i];
        num[a[i]-10]++;
        if (num[a[i]-10]==1) cout << " " << a[i];
    }
    return 0;
}
/*
 * 1000012739_26.cpp
 *
 *  Created on: 2010-10-29
 *      Author: ???
 *    	Name: ????????
 */



int main()
{
	int n,i,j,k,cn;			//????
	cin>>n;					//??????
	int a[n];				//????????
	cn=0;
	for (i=0;i<n;i++)		//??????
	{
		cin>>k;				//????
		for (j=0;j<=cn;j++)	//??a[]??k????
			if (a[j]==k)
				break;		//?????????
		if (j==cn+1)		//???????????????
		{
			a[cn]=k;
			cn++;			//???????????
		}
	}
	for (i=0;i<cn-1;i++)	//????????
		cout<<a[i]<<" ";
	cout<<a[cn-1];
	return 0;
}
int main()
{
	int n,a[20000],l=0;
	cin>>n;
	for (int i=0;i<n;i++)
	{
		cin>>a[i];
	}
	cout<<a[0];
	for (int j=1;j<n;j++)
	{
		l=0;
		for (int k=j-1;k>=0;k--)
		{
			if (a[j]!=a[k])
				l=l;
			else l=l+1;
		}
		if (l==0)
			cout<<" "<<a[j];
	}
	cout<<endl;
	return 0;
}
/*????????*/
int main()
{
	int n, a[101] = {0}, temp, num = 0;
	cin >> n;
	for (int i = 0; i < n; i++)
	{
		cin >> temp;
		if (a[temp] == 0)//?????????????????????????
		{
			num++;
			a[temp] = num;
		}
	}
	for (int j = 1; j <= num; j++)//???j??????
	{
		for (int k = 10; k <= 100; k++)//?10~100???
			if(a[k] == j)
				cout << k;
		if (j < num)
			cout << " ";
	}
	return 0;
}
void main()
{int a[20001]={0},b[100]={0},n,i,j,m=1,flag=0;
scanf("%d",&n);
for(i=1;i<=n;i++) scanf("%d",&a[i]);
printf("%d",a[1]);b[1]=a[1];
for(i=2;i<=n;i++)
{flag=0;
	for(j=1;j<=m;j++) {if(a[i]==b[j]) flag=1;}
if(flag==1) continue;
else {m++;b[m]=a[i];printf(" %d",a[i]);}
}
printf("\n");
}
int main()
{
	int a[20001]={0};
	int n,i,j,k;
	cin>>n;
	for(i=0;i<n;i++)
		cin>>a[i];
	for(i=0;i<n-1;i++)
		for(j=i+1;j<n;j++)
			if(a[j]==a[i])
			{	for(k=j;k<n-1;k++)
					 a[k]=a[k+1];
			j=j-1;
			n=n-1;
			}


    for(i=0;i<n-1;i++)
	      cout<<a[i]<<" ";
	cout<<a[n-1]<<endl;

return 0;
}
int main()
{
    int a[20000];
    int n, k;
    cin >> n;
    for(int i = 0; i < n; i++)
    {
        cin >> a[i];
    }

    for(int i = 0; i < n; i++)
    {
        for(int j = i + 1; j < n; j++)
        {
            if(a[j] != 0&&a[j] == a[i])
                a[j] = 0;
        }
    }

    for(k = 0; k < n; k++)
    {
        if(a[k] != 0)
        {
            cout << a[k];
            break;
        }
    }

    for(int i = k + 1; i < n; i++)
    {
        if(a[i] != 0)
            cout << ' ' << a[i];
    }

    return 0;
}
int main()
{
	int n,a[20000],i,j;
	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(j==i)
		continue;
	else if(a[j]==a[i])
		a[j]=-1;

	}
	for(i=0;i<n;i++)
	{if(a[i]==-1)
	continue;
	else
		{printf("%d",a[i]);
break;}
	}
         for(j=i+1;j<n;j++)
	{if(a[j]==-1)
	continue;
	else
		printf(" %d",a[j]);
	}

	return 0;
}
void main()
{
  int n,a[20000],i,j,m;
  scanf("%d",&n);
  for (i=0;i<=n-1;i++)
 scanf("%d",&a[i]);
for (i=0;i<=n-1;i++)
   for (j=i+1;j<=n-1;j++)
      if (a[i]==a[j]) { for (m=j;m<n;m++)   a[m]=a[m+1]; j=j-1;n=n-1;}
for (i=0;i<n-1;i++)
printf("%d ",a[i]);
printf("%d",a[n-1]);
}
/*??????
 * ??????????? 
 */
int main(){
	int n;
	cin>>n;
	int a[20000],i,t,k=0,h;
	for(i=0;i<n;i++)
		cin>>a[i];        //????????                
	for(i=0;i<n;i++)
		for(t=i+1;t<n-k;t++)
		if(a[i]==a[t]){
		    for(h=t;h<n-k-1;h++)
		    a[h]=a[h+1]; 
			k++;
			t--;}           //??????
	    for(i=0;i<n-k-1;i++)
		cout<<a[i]<<' '; 
		cout<<a[n-k-1];    //????????
	return 0;}
int main()
{
	int n;
	scanf("%d",&n);
	int *p,*q,*head;
	p=(int *)calloc(n,sizeof(int));
	head=p;
	for(p=head;p<head+n;p++)
	{
		scanf("%d",p);
	}
	p=head;
	printf("%d",*p);
	p++;
	for(;p<head+n;p++)
	{
		for(q=head;q<p;q++)
		{
			if(*q==*p)
			{
				goto chongfu;
			}
		}
		printf(" %d",*p);
		chongfu:;
	}
	return 0;
}
int main()
{
	int k,i,j,n,m;
	scanf("%d",&k);
	char c[20000];
	for (i=1;i<=k;i++)
	{
		scanf("%d",&c[i]);
	}
	printf("%d",c[1]);
	for (n=2;n<=k;n++)
	{
	    for (j=1;j<=n-1;j++)
		{
		     if (c[n]==c[j])
			     break;
		}
        if (j==n&&c[n]!=c[n-1])
		{	printf(" ");
	    	printf("%d",c[n]);
		}
	}
    return 0;
}
int main()
{
	int n,i,t;
	int flag[100];
	memset(flag, 0, sizeof(flag));
	cin>>n;
	for(i=0;i<n;i++)
	{
		cin>>t;
		if (0==flag[t])
		{
			flag[t] = 1;
			if (0==i)    cout<<t;
			     else    cout<<" "<<t;
		}
	}
	cout<<endl;
	return 0;
}
/*
 * unrepeatedout.cpp
 *
 *  Created on: 2012-10-29
 *      Author: Administrator
 */

int main() {
	int n, i = 0, a[20001], used[200];//i?????,used[k]?0??k?????,?1??k?????
	for (i = 0; i < 200; i++)
		used[i] = 0;
	cin >> n;
	for (i = 0; i < n; i++)
		cin >> a[i];//?????
	cout << a[0];
	used[a[0]] = 1;
	for (i = 1; i < n; i++) {
		if (used[a[i]])
			continue;//??????????"??"
		cout << " " << a[i];//????????,??
		used[a[i]] = 1;//?????????
	}
	return 0;//????
}
//**********************************************
//**???????????**********************
//**?????? 1000012741*********************
//**???2010?10?29?************************
//**********************************************
int main()  //?????
{
        int a[20000],n;  //????a???????????n
        cin >> n;  //????????????n
        for (int i = 0; i < n; i++)  //??????
                cin >> a[i];  //??????
        cout << a[0];  //?????????
        for (int t = 1; t < n; t++)  //??????
        {
                int k = 0;  //?k???
                for (; k < t; k++)  //??????
                        if (a[t] == a[k]) break;  //????????????
                        if (k == t)  //???????????
                                cout << setw(3) << a[t];  //????????
        }
        return 0;  //?????
}
//**********************************************
int main()
{
	int a[20000],i,j,k,m=0,n,b=0,c=1;
	scanf("%d",&n);
	k=n;
	for(i=0;i<n-1;i++)
	{
		scanf("%d ",&a[i]);
	}
	scanf("%d",&a[i]);
	for(i=0;i<n;i++)
	{
		for(j=0;j<i;j++)
		{
			if(a[j]==a[i])
			{
			   a[i]=0;
			   k-=1;
			   break;
			}
		}
	}
	for(i=0;i<n;i++)
	{
		if(a[i]!=0&&c<k)
		{
			printf("%d ",a[i]);
			c+=1;
		}
	   else
	   {
		if(a[i]!=0&&c==k)
		{
			printf("%d",a[i]);
		}
	   }
	} 
	return 0;
}
void main()
{
   int n,m,i,j,k;
   scanf("%d\n",&n);
   int a[n],b[n];
   k=0;
   for(i=0;i<n;i++){scanf("%d ",&a[i]);}
   for(i=n-1;i>0;i--)
     {
       m=0;
       for(j=i-1;j>=0;j--){if(a[i]!=a[j]) m=m+1;}
	   if(m==i){b[k]=a[i];k=k+1;}
	   else if(m==0 && k!=0){b[k]=a[0];}
      	  
   }
   b[k]=a[0];
   for(i=k;i>0;i--)printf("%d ",b[i]);
   printf("%d",b[0]);
}
int main()
{
	int a[20000],b[20000];
	int j=0,i=0,n=0,e=0;
	cin>>n;
	for(i=0;i<=n-1;i++)
	{
		cin>>a[i];
        b[j]=a[i];
        j=i+1;
	}
	for(i=0;i<=n-1;i++)
	{
		for(j=i+1;j<=n-1;j++)
		{
			if(a[i]==b[j])
			{
			   b[j]=0;
			}
		}
	}
	cout<<b[0];
	for(j=1;j<=n-1;j++)
	{
		if(b[j]!=0)
		cout<<" "<<b[j];
	}
	return 0;
}