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

	}
	for(i=0;i<n;i++)
	{
		if(a[i]!=k&&a[i+1]!=k)
		{
			printf("%d ",a[i]);
		}
		else if(a[i]!=k&&a[i+1]==k)
		{
			printf("%d",a[i]);
		}
		else if(a[i]==k)
		
		{
			break;
		}
	}
	return 0;
}
//********************************
//*??????????? **
//*?????? **
//*???2012.10.29**
//********************************

int main() 
{  

    int n, k, a[100001];         //??????n?????k???a??n???
    cin >> n;                    //??????n
    for (int i = 1; i <= n; i++)
    {
        cin >> a[i];             //??n???????
    }
    cin >> k;                    //????????k
    int temp;                    //??????????????
    a[0] = k - 1;                //?????k????a[0]
    for (int j = 1; j <= n; j++)
    {
        if (a[j] == k) 
        { 
            continue; //??????k???????????
        } 
        else while (a[j - 1] == k)
             { 
                 temp = a[j - 1]; a[j - 1] = a[j]; a[j] = temp;
                 j--;
             } //?????k???????k??????????????k???
    }
    int whether = 0; //??whether?????????
    int r = 1; //????r???? 
    do
    {
        if (whether) cout << " "; //????????????????? 
        cout << a[r]; //??????? 
        whether = 1; //???????? 
        r++; //?????? 
    } while (a[r] != k && r <= n); //??????k?? 
        
    return 0;                     
}
/*
??? 
1000012905
?????????????????????????????????" "? 
*/ 

int main()
{
	int	n, i, k, j, sum = 0, p = 0, t;
	
	//??	
	cin >> n;
	int	a[n];
	for (i = 0; i < n; i ++)
	{
		cin >> a[i];
	}
	cin >> k;
	
	//???????k?????sum? 
	for (j = 0; j < n; j ++)
	{
		if (k != a[j])
		{
			if(p != 0)
			cout << " ";
			cout << a[j];
			p ++; 
		}
	}
	return 0;
}
/************************************
2.cpp
???Oct 19, 2011
??(11-4) ????????
?? 1100012886
************************************/

int main()
{
	int n, a[100001], i, pointer, j, k; //i?????
	cin >> n;
	for (i = 1; i <= n; i++) cin >> a[i];
	cin >> k;
	pointer = 1;
	while (pointer <= n)
	{
		while (a[pointer] == k)
		{
			for (j = pointer; j <= n; j++) a[j] = a[j+1];
			n--; //n????????????
		}
		pointer++;
	}
	for (i = 1; i < n; i++) cout << a[i] << " ";
	cout << a[n] << endl;
	return 0;
}
//********************************
//*???????????       **
//*?????? 1300012965      **
//*???2013.10.30             **
//********************************
int main ()
{
	int n, k , i, j, m, x, count;
	count = 0;
	int a[100000] = {0};//????
	cin >> n;
	for(i = 0; i <= n-1; i++)
		cin >> a[i];
	cin >> k;
	for(j = 0;j <= n-1; j++)
	{
		if(a[j] == k)//?????????????
			count++;
		else
			a[j-count] = a[j];//????????????
	}
	x = 0;
	cout << a[x];
	for(x = 1; x <= n - count - 1;x++)//????n-1?????????
		cout << " " << a[x];
	cout << endl ;
	return 0;
}
void main()
{
int a[100000];
int n,i,d,j;
scanf("%d",&n);
for (i=1;i<=n;i++)
scanf("%d",&a[i-1]);
scanf("%d",&d);
for (i=0;i<=n-1;i++)
if (a[i]==d) {for (j=i;j<=n-1;j++)
               a[j]=a[j+1];
                   i=i-1;
                   n=n-1;}
for (i=0;i<=n-1;i++)
{printf("%d",a[i]);
if (i<n-1) printf(" ");}
}
int main(){
	int n;
	cin>>n;
	int a[n];
	int i,j;
	for(i=0;i<=n-1;i++)
		cin>>a[i];
    int k;
    cin>>k;

    for(i=0;i<=n-1;i++)
    	if(a[i]==k){
    		for(j=i;j<=n-2;j++)
    			a[j]=a[j+1];
    		n--;
    		i--;
    	}
    cout<<a[0];
    for(i=1;i<=n-1;i++)
    	cout<<" "<<a[i];
    return 0;

}
int main()
{
	int n,a[100000],k,i,j,p;
	cin>>n;
	for(i=0;i<n;i++)
		cin>>a[i];
	cin>>k;
	for(i=0;i<n;)
	{
		if(a[i]==k)
		{
			for(j=i;j<n-1;j++)
				a[j]=a[j+1];
			n-=1;
		}
		else i++;
	}
	for(i=0;i<n-1;i++)
		cout<<a[i]<<" ";
	cout<<a[n-1]<<endl;
	return 0;
}
int main()
{
    int shuzu[100000],n,num,i,j,count;
    cin>>n;//??????? 
    for(i=0;i<n;i++)cin>>shuzu[i];//??????? 
    cin>>num;//??????? 
    for(i=0;i<n;i++)
    {
                    count=0;
                    if(shuzu[i]==num)
                    {
                                     for(j=i+1;j<n;j++)shuzu[j-1]=shuzu[j];
                                     count++;
                                     if(shuzu[i]==num)i--;
                    }//???????????????????? 
                    n=n-count;//?????????? 
    }
for(i=0;i<n;i++)
{
                cout<<shuzu[i];
                if(i<n-1)cout<<" ";
}
cin.get();cin.get();cin.get();cin.get();cin.get();cin.get();
return 0;
}
int main()
{
	int n,i,sum=0;
	cin>>n;
	int num[n],a;
	for( i=0; i<n; i++)
		cin>>num[i];
	cin>>a;
	for( i=0; i<n; i++ )
		if( num[i]==a )
			num[i]=1000;
	for( i=0; i<n; i++ )
		if( num[i]!=1000 )
		{
			if(sum==0) cout<<num[i];
			else cout<<' '<<num[i];
			sum++;
		}
	return 0;
}
/*
??? 
1000012905
????????????????????????????????" "? 
*/ 

int main()
{
	int	n, i, k, j, p = 0, t, q = 0;
	
	//??	
	cin >> n;
	int	a[100000];
	for (i = 0; i < n; i ++)
	{
		cin >> a[i];
	}
	cin >> k;
	 
	//???k?????? 
	for (j = 0; j < n; j ++)
	{
		if (k != a[j])
		{
			a[q] = a[j];
			if(p != 0)
			{
			cout << " ";
			}
			cout << a[q];
			p ++;
			q ++;
		}
	}
	return 0;
}
int main()
{
    int i=0,n,j,k,s=0;
    scanf("%d",&n);
    int a[100000];
    for(i;i<n;i++)
    {
        scanf("%d",&a[i]);
    }
    scanf("%d",&k);
    for(i=0;i<n;i++)
    {
        if(a[i]==k)
        {
            for(j=i;j<n;j++)
            {
                a[j]=a[j+1];
            }
            n--;
            i--;
            s++;
        }
    }
    for(i=0;i<n;i++)
    {
        printf("%d",a[i]);
        if(i!=n-1)
        printf(" ");
    }
    
    return 0;
}
int main()
{
	long int a[100001], k;
	int i, j, n;
	cin >> n;
	for (i = 1; i <= n; i++)
	  cin >> a[i];
	cin >> k;
	for (i = 1; i < n; i++)
	{
		if (a[i] != k)
		  continue;
		for (j = i + 1; (j <= n) && (a[j] == k); j++);
		if (j > n)
		  break;
		a[i] = a[j];
		a[j] = k;
	}
	if (a[1] != k)
	  cout << a[1];
	for (i = 2; (i <= n) && (a[i] != k); i++)
	  cout << ' ' << a[i];
	return(0);
 }
int main()
{
int n1=0,n=0,a[100005],del=0;//n??????  n1??????????? del?????? a??? 
cin>>n1;n=n1;
for (int i=1;i<=n;i++)
cin>>a[i];
cin>>del;
int h=1;//h ????????? 
do 
{
    if (a[h]==del)
    {
     for (int i=h+1;i<=n;i++){a[i-1]=a[i];}//????????? ???????????????????
     n--;h--;
    }
    h++;
}
while(h<=n);
for (int j=1;j<=n-1;j++) cout<<a[j]<<' ';cout<<a[n];
return 0;}
void main()
{
	int n,k,a[100000],i,j;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&a[i]);
	printf("\n");
	scanf("%d",&k);
    for(i=0,j=0;i<n;i++)
	{
		if(a[i]!=k)
		{
			a[j]=a[i];
			j++;
		}
	}
	for(i=0;i<(j-1);i++)
		printf("%d ",a[i]);
	printf("%d",a[j-1]);
	printf("\n");
}
void main()
{
	int a[100000];
	int n,i,j=0,k;
	int *p;
	scanf("%d",&n);
	for(i=0,p=&a[0];i<n;i++)scanf("%d",&*(p+i));
	scanf("%d",&k);
	for(i=0;i<n;i++)
	{
		if(*(p+i)!=k)
		{
			*(p+j)=*(p+i);
			j++;
		}
	}
	for(i=0;i<j-1;i++)printf("%d ",*(p+i));
	printf("%d\n",*(p+i));
}
int main()
{
    int n, m, k = 0, i, j = 0;
    
    double ch[100000];
    
    cin >> n;
    
    for(i = 0; i < n; i++)
    {
        cin >> ch[i];
    }
    
    cin >> m;
    
    for(i = 0; i < n; i++)
    {
        if(ch[i] == m)
        {
            ch[i] = 1.5;
            
            j++;
        }
    }
    
    for(i = 0; i < n; i++)
    {
        if(ch[i] != 1.5)
        {
            if(k != (n - j) - 1)
            {
                cout << ch[i] << " ";
                
                k++;
            }
            else
            {
                cout << ch[i] << endl;
            }
        }
        
        else continue;
    }
    
    return 0;
}
int main()
{
	int a[100001];
	memset(a, 0, sizeof(a));			//??????
	int n = 0, k = 0, t = 0;
	scanf("%d", &n);
	for (int i = 0; i < n; i ++)
		scanf("%d", &a[i]);				//?????
	scanf("%d", &k);
	for (int i = 0; i < n; i ++)		//??????????????????
		if (a[i] == k)
			t ++;
	for (int l = 0;l <= t;l ++)			//???????????????t??
	{
		for (int i = 0;i < n;i ++)		//???????????????????????
		{
			if (a[i] == k)
			{
				for (int j = i; j < n; j++)//????????????????????????????
					a[j] = a[j+1];
			}
		}
	}
	printf("%d",a[0]);						//??????????????
	for (int i = 1; i < n - t; i ++)
		printf(" %d", a[i]);				//????????????????????
	return 0;
}
int main()
{
 	int N, cutnum; //N?????????cutnum?????? 
 	int sum = 0, j = 0; //sum?????????? 
	
	cin >> N;
	const int n = N; //?n????? 
	
	int a[n];
	
	for ( int i = 0; i < n; i++)
	{
	 	cin >> a[i]; //???? 
	}
	
	cin >> cutnum; //???????
	
	while ( j < n - sum ) //?j???????????? 
	{
	 	if ( a[j] == cutnum ) //??a[j]?????????sum?1 
 		{	
			 sum++;	
		   	 for ( int k = j; k < n - 1; k++ )
		   	 {
   	   		  	 a[k] = a[k+1]; //???????? 
		  	 }
			 j--;
	  	}
		else
			j++;	
	}
	
	for ( int l = 0; l < n - sum - 1; l++ ) //?????? 
	{
	 	cout << a[l] << " ";	//?????????? 
	}
	cout << a[n-sum-1] << endl;	//????????? 
	
	return 0; 
}
int main()
{
 int i,j,k,t,n;
 cin>>n;
 int a[n];
 for(i=0;i<n;i++)
	 cin>>a[i];
 cin>>k;
 for(i=0;i<n;i++)
	 if(a[i]==k)
	 {for(j=i;j<n-1;j++)
		 a[j]=a[j+1];
	 n--;
	 i--;
	 }
 cout<<a[0];
 for(t=1;t<n;t++)
	 cout<<" "<<a[t];
return 0;
}
void main()
{
	int i,n,j,k,a[100000],*p;
	scanf("%d",&n);
	p=a;
	for(i=0;i<n;i++)
		scanf("%d",p++);
	scanf("%d",&k);
	p=a;
    for(i=0;i<n;i++)
	{
			if(*(p+i)==k)
			{
				n--;
				for(j=i;j<n;j++)
	             *(p+j)=*(p+j+1);
				i--;
			}
	}
    for(i=0;i<n-1;i++)
            printf("%d ",*p++);
    p=a;
	printf("%d",*(p+n-1));
}
void main()
{
   int a[100000],*p=a,n,k,*q;
   scanf("%d",&n);
   for(p=a;p<a+n;p++)
	   scanf("%d",p);
   scanf("%d",&k);
   for(p=a;p<a+n;p++)
	   if(*p==k)
	   {{for(q=p;q<a+n-1;q++)
	   *q=*(q+1);}
	   n--;
	   p--;}
   printf("%d",*a);
   for(p=a+1;p<a+n;p++)
	   printf(" %d",*p);




}
/*????????
 * 1000012901_25.cpp
 *
 *  Created on: 2010-10-30
 *      Author: lenovo
 */
int main()
{
	int n,i,k,e=0,j;//???????e?????????
	cin>>n;
	int a[n];
	for(i=0;i<n;i++)
	cin>>a[i];//????n??
	cin>>k;//????????
	for(j=0;j<n-e;j++)
	while(a[j]==k)//???????????????????
	{
		for(i=j;i<n-1-e;i++)
		a[i]=a[i+1];
		a[i]=0;//????????????
		e++;//????????e?1
	}
	for(i=0;i<n-e-1;i++)
		cout<<a[i]<<" ";
	cout<<a[n-e-1];//?????????????
	return 0;
}
struct data
{
	int num;
	struct data *next;
};
int main()
{
	struct data *p1,*p2,*head,*temp;
	int i,m,n;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		p1=(struct data *)malloc(sizeof(struct data));
		scanf("%d",&p1->num);
		if(i==0)
		{
			head=p1;
			p2=p1;
		}
		else
		{
			p2->next=p1;
			p2=p1;
		}
	}
	p1->next=NULL;
	scanf("%d",&m);
	p1=head;
	p2=head;
	while(p1!=NULL)
	{
		if(p1->num==m)
		{
			if(p1==head)
				head=p1->next;
			else
				p2->next=p1->next;
			p1=p1->next;
		}
		else
		{
			p2=p1;
			p1=p1->next;
		} 
	} 
	p1=head;
	printf("%d",p1->num);
	p1=p1->next;
	while(p1)
	{
		printf(" %d",p1->num);
		p1=p1->next;
	}
	p1=head;
	while(p1)
	{
		temp=p1;
		p1=p1->next;
		free(temp);
	}
	head=NULL;
	return 0;
}
main()
{
    int n,k,x=0,y=0;
    scanf("%d",&n);
    int *a=(int*)malloc(n*sizeof(int));
    for(int i=0;i<n;i++)
    scanf("%d",&a[i]);
    scanf("%d",&k);
    for(int j=0;x+y!=n;j++)
    {
            if(a[j]==k)
            { 
                       for(int i=j;i<(n-x);i++)
                       {
                               a[i]=a[i+1];
                       }
                       x++;
                       j--;       
            }
            else
            y++;
    }
    printf("%d",a[0]);
    for(int i=1;i<(n-x);i++)
    printf(" %d",a[i]);
    getchar();
    getchar();
}
//****************************************************************************** 
//???????? 
//?????? 
//???10-30 
//****************************************************************************** 
int main()
{
	int n;                            //??????? 
	int a[100000];                    //?????? 
	int key;                          //?????? 
	int count = 0;                    //????????? 
	
	cin >> n;
	
	for(int i = 0; i < n; i ++)       //???? 
	cin >> a[i];
	
	cin >> key;
	
	for(int i = 0; i < n - count; i ++)                   //???n-count??? 
	{
		if(a[i] == key)                                   //??????????key?????? 
		{
			for(int j = i; j < n - 1 - count; j ++)       //?????n - count - 1??? 
			a[j] = a[j + 1];                              //???? 
				
			count ++; 
			i = i - 1;                                    //?????key??????????i--,?????       
		}
		
	}
	
	for(int i = 0; i < n - count - 1; i ++)              //????????? 
	cout << a[i] << " ";
	
	cout << a[n - count - 1];
	
	return 0;
}
//*******************************************************
//*10.19??  ????????                          *
//*?????  ?? 1100012844                          *
//*???2011?10?23?                                 *
//*******************************************************
int main()
{
	int a[100001] = {0}, i, j, k, n, p, q;
	cin >> n;
	q = n;
	for (i = 1; i <= n; i++)
		cin >> a[i];
	cin >> k;
	for (j = 1, i = 1; i <= n; i++, j++)
	{
		if (a[j] == k)
		{
			for (p = j; p <= n; p++)
				a[p] = a[p + 1];
			j--;
			q--;
		}
	}
	for (i = 1; i <= q; i++)
	{
		if (i != q)
			cout << a[i] << " ";
		else
			cout << a[i];
	}
	return 0;
}
/*
 * ????0601.cpp
 * ??????
 * ?????2012-11-4
 * ??????????????????????
 */
int main(){
	int n, i, j, k, num = 0;
	cin >> n;
	const int N = n;
	int a[N]; //???????
	for(i = 0; i < n; ++ i) cin >> a[i]; //????
	cin >> k; //???????
	i = j = 0; //???i?j
	while(j < n){
		while(a[j] == k){
			++ j;
			++ num; //????????????k?
		} //????????????k?????
		a[i] = a[j]; //?????i+1???k????????????
		++ i;
		++ j;
	} //?????????k
	cout << a[0]; //???????
	for(j = 1; j < n - num; ++ j) cout << " " << a[j]; //?????????????????????
	return 0; //????
}
void main()
{
 int a[200000],t=0,i,j,n,m,*p;
 scanf ("%d\n",&n);
 p=a;
 for (i=0;i<n;i++)
 { 
  scanf ("%d",p++);
 }
 scanf ("%d",&m);
 p=a;
 for (i=0,t=0;i<n;i++)
 {
  if (*(p+i)==m) continue;
  else {*(p+n+t)=*(p+i);t++;}
 }
 p=a;
 for (i=n;i<n+t-1;i++,p++)
 {
  printf ("%d ",*(p+n));
 }
 if (t!=0)
 printf ("%d",a[n+t-1]);
 }
int shuzu[1000000];
int main(){
    int n,k,x,num=0;
    scanf("%d",&n);
    for (int t=0;t<n;t++){
        scanf("%d",&shuzu[t]);
    }
    scanf("%d",&k);
    for (int j=0;j<n;j++){
           if (shuzu[j]==k){
                for (int i=j;i<=n-1;i++){
                      x=shuzu[i];
                      shuzu[i]=shuzu[i+1];
                      shuzu[i+1]=x;
                }
                n--;
               if (shuzu[j]==k){
                    j=j-1;
              }
           }
    }          
    for (int m=0;m<n;m++){
            if (m==0){
            printf("%d",shuzu[m]);
            }
            else {
                   printf(" %d",shuzu[m]);    
                   }
    } 
return 0;    
}
void main()
{
	int i,a[100000],n,k,t=0;
	scanf("%d",&n);
	for (i=0;i<n;i++)
		scanf("%d",&a[i]);
		scanf("%d",&k);
    	for (i=0;i<n;i++)
		{
			if(a[i]!=k)
				a[i-t]=a[i];
			else
				t=t+1;
		}
		for(i=0;i<n-t-1;i++)
			printf("%d ",a[i]);
		printf("%d",a[n-t-1]);
}
void main()
{
int a[100000];
int n,k,i,j,m;
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d",&a[i]);
scanf("%d",&k);
m=n;
for(i=0;i<m;i++)
{
if(a[i]==k)
{
for(j=i;j<m;j++)
a[j]=a[j+1];
    i--;
m--;
}
}
for(i=m;i<=n-1;i++)
a[i]='*';
for(i=0;i<m-1;i++)
printf("%d ",a[i]);
printf("%d",a[m-1]);
}
int main(){
	int n,a,u[100000];

	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%d",&u[i]);
		}
		scanf("%d",&a);
	         
		for(int i=0;i<n;i++){
			if(u[i]==a){
			  for(int j=i;j<n-1;j++){
					u[j]=u[j+1];}
				i--;
				n--;}}
		for(int i=0;i<n;i++){
			if(i==n-1){
				printf("%d",u[i]);}
			else{ 
      		printf("%d ",u[i]);}
			  }
			scanf("%d",&n);
	return 0;
	}
//********************************
//*@file:2.cpp                   *
//*@author:??? 1200012894     *
//*@date:2012.11.1               *
//*@function:????????    *   
//********************************

int main()
{
	long int n, number, drop;    // n?????????,number?????,drop???????
	cin >> n;
	long int a[100001];  // ????
	for (int i = 0; i < n; i++)  // ????????
	{
		cin >> number;
		a[i] = number;
	}
	cin >> drop;
	for (int j = 0; j < n; j++)  // ???????????????
	{
		if (a[j] == drop)   // ??????????????????????
		{
			for (int k = j; k < n; k++)
			{
				a[k] = a[k + 1];
			}
			n = n - 1;   // ????????????j?1
			j = j - 1;   // ?j????j + 1??????????j + 1???????
		}
	}
	for (int s = 0; s < n; s++)
	{
		if (s != n - 1)
		{
			cout << a[s] << " ";
		} // end if 
		else  
		{
			cout << a[s];
		} // end else
	} // end for
	return 0;
}
int main()
{
    int n, a[100000], k, i = 0, j = 0, s = 0;
    cin >> n;
    for (i = 0; i < n; i++)
        cin >> a[i];
    cin >> k;
    for (i = 0, j = 0; j < n; j++)
    {
        if (a[j] != k)
        {
            a[i++] = a[j];
        }
        else
            s++;
    }
    for (j = 0; j < n - s - 1; j++)
    cout << a[j] << " ";
    cout << a[n - s - 1] << endl;
    return 0;
}
/*
 * ????1000012855_25.cpp
 * ??????
 * ????: 2010-10-29
 * ???????????
 */
int main(){
	int n=0,i=0,k=0,a=0,m=0;  //????????
	cin>>n;  //??????????
	int num[n]; //????
	for(;i<n;i++)cin>>num[i]; //???????????
	cin>>a;  //????????
	k=n;  //???????
	for(i=0;i<k;i++)  //??????????
	{if(num[i]==a)
	{for(m=i;m<k;m++)num[m]=num[m+1];  //???????????????????
	 k--;
	 i--;}  //????????????????????????
	}
	for(i=0;i<k-1;i++)cout<<num[i]<<" ";//????
	cout<<num[k-1];
	cout<<endl;  //????
	return 0;
}
//?????????????
//????????
//?????2011?10?27?

int main()                                     //?????
{
   int j,n,k,i;                                 
   cin>>n;
   int a[100000];
   for(i=0;i<n;i++)
	   cin>>a[i];            //????
   cin>>k;
   int t=0;
   for(i=0;i<n-t;)     //?i??n-??????
   {
if(a[i]==k) 
{                   //????????
for(j=i;j<n-t;j++)
a[j]=a[j+1];         //??
t++;                //????????????i
}
else
 i++;              //?????????
  }
for(int i=0;i<n-t-1;i++)
 cout<<a[i]<<" ";               //????
   cout<<a[n-t-1];
   return 0;
}
//******************************************************************
//*?????????????? ************************************
//*??????? 1200012979 ***************************************
//*???2012.10.29 ************************************************
//******************************************************************
int main()
{
	int n , i , k , j , a[100001] , s , p , m ;
	cin >> n ;                       //n?????
	for ( i = 1 ; i <= n ; i++ )
	{
		cin >> a[i] ;                //????
	}
    cin >> s ;                       //??s?????
	if ( n > 1 )                     //????????????????
	{                                //????
      for ( k = 1 ; k <= n - 1 ; k++ ) //???????????????
	  {
		if ( a[k] == s )              //??????????????
		{
			for ( j = k ; j <= n - 1 ; j++ )
			{
				a[j] = a[j+1];
			}

            n = n - 1 ;          //????????
			k = k - 1 ;          //k?????????k???????
		}
	  }
	  for ( p = 1 ; p <= n ; p++ )
	  {
		  if ( p == n )        //????????????
		  {
			  if( a[p] == s )  //?????????????
			  p = p - 1 ;
			  break ;
		  }
	  }
	  if ( p > 0 )             //???????
	  cout << a[1] ;           //????a[1]
	  if ( p > 1 )             //?????????????
	  {
		  for ( m = 2 ; m <= p ; m++ )
		  cout << " " << a[m] ;
	  }
	}
	else if ( a[1] != s )      //??????????
		cout << a[1] ;         //???????????
	return 0 ;
}
/*
 * DeleteNumber.cpp
 *
 *  Created on: 2012-11-2
 *  Author: ??
 *  ??????????????????????????????????????
 ?????????????????????????????
 */

//?????

int main() {
	int n, k, num = 0;        //????n?k??????
	int a[100010];               //??????
	cin >> n;                      //??n??
	for (int i = 0; i < n; i++) {
		cin >> a[i];                  //???????
	}
	cin >> k;                        //??k??
	for (int j = 0; j < n - num; j++)            //?????????
	{
		if (a[j] == k)                   //????????k
		{
			num = num + 1;                    //???????
			for (int t = j; t < n - num; t++) {
				a[t] = a[t + 1];                 //????????
			}
			if( a[j] == k )  j = j-1 ;           //???????k????
		}
	}
	for (int i1 = 0; i1 < n - num - 1; i1++) {
		cout << a[i1] << " ";              //????
	}
	cout << a[n - num - 1];                      //????????
	return 0; //??
}
int main()
{
 int n,k,a[100000],i,j,l,m;
 int s=0;
 cin>>n;
 for(i=0;i<n;i++)
 {
  cin>>a[i];
 }
 cin>>k;
 for(l=0;l<n;l++)
 {
   if(a[l]==k)
   {
    s++;
    for(j=l;j<n;j++)
    {
     a[j]=a[j+1];
    }
   l--;
   n--;
   }
 }
 for(m=0;m<n-1;m++)
 {
  cout<<a[m]<<" ";
 }
 cout<<a[n-1]<<endl;
    return 0;
}
int main()
{
	int n;
	cin>>n;
	int a[100000];
	int i,j,k,l=0;
	for(i=0;i<n;i++)
	{
		cin>>a[i];
	}
	cin>>k;
	for(i=0;i<n;i++)
	{
		if(a[i]!=k)
		{
			if(l==0) {cout<<a[i];l=1;}
			else cout<<" "<<a[i];
		}
	}
	cout<<endl;
	return 0;
}
//**************************
//*???????????  **
//*?????? 1200012888 **
//*???2013.10.30**
//**************************
int main()
{
	int a[100000] = {0} ;				//??????a
	int n , k ;							//????????n??????k
	cin >> n ;							
	for (int i = 0 ; i < n ; i++)		//?n???????
	{
		cin >> a[i] ;
	}
	cin >> k ;							//????????
	for (int i = 0 ; i < n ; i++)
	{
		if (k == a[i])					//??a[i] == k
		{
			int count = 0 ;				//??count ?????????k????????
			int I = i ;					//I = i ??????
			for (int j = i ; j < n ; j ++)
			{
				if (k == a[j])			//???????
				{
					count ++ ;
				}
				else					//??????????? k ? ????
				{
					break ;
				}
			}
			while ( (I + count) < n)	//????
			{
				a[I] = a[I+count] ;
				I ++ ;
			}
			n = n - count ;				//???????count???
		}
	}
	for (int i = 0 ; i < n ; i ++)		//??????????
	{
		if(i != n-1)					//??????????????
		cout << a[i] << " " ;
		else
		cout << a[i] ;				
	}
	return 0;
}
int main(){
    int n,k,a[100000],i,j=0;
    scanf("%d",&n);    
    for(i=0;i<n;i++) scanf("%d",&a[i]);
    scanf("%d",&k);
    
    for(i=0;i<n;i++){
        if(a[i]!=k){
            a[j]=a[i];
            j++;            
            }
        }
    for(i=0;i<j-1;i++) printf("%d ",a[i]);
    printf("%d",a[j-1]);
    
	scanf("%d",&n);
	return 0;
}
/*
 * ????25.cpp
 *???????????????
 *  Created on: 2010-10-29
 *      Author: ???
 */
int main()//???
{//????
	int k,j,i,n,m;//????
	k=0;//??
	cin>>n;//??????????
	int a[100000];//????
	for(i=0;i<n;i++)//??????????
		cin>>a[i];
	cin>>m;//???????
	for(j=0;j<n;j++)//???????????
		if(a[j]!=m){
			a[k]=a[j];
			       k++;
		}
	cout<<a[0];//??????
	        for(j=1;j<k;j++)//???????????
	        cout<<" "<<a[j];
	        return 0;
}//????
int main()
{int n,v[100000],k,p=0,t=0;
 scanf("%d",&n);
 for(int i=0;i<=n-1;i++)
  {
    scanf("%d",&v[i]);
  }
 scanf("%d",&k);
 for(int j=0;j<=n-1;j++)
  {
    if(v[j]!=k)
    {p++;}  
         
  } 
 for(int l=0;l<=n-1;l++)
 {if(v[l]!=k)
  {t++;
   if(t==p){printf("%d",v[l]);}
   else {printf("%d ",v[l]);}
   }
 
 }
  
 return 0;  

}
//name?????????
//author:??
//created on:2011.10.26
int main()
{
    int n, i = 0, j, k, m = 0, flag = 1;
    cin >> n;
    int a[n];
    for (i = 0; i < n; i++)
    cin >> a[i];
    cin >> k;
    for (i = 0; i < n; i++)
    {
        while (a[i] == k)
        {
              for(j = i; j < n; j++)
                a[j] = a[j + 1];
                m++;
        }
    }
    cout << a[0];
    for(i = 1; i < (n - m); i++)
    cout << " " << a[i];
    return 0;
}
/*
 * ????601.cpp
 * ??????
 * ?????2012-10-28
 * ????????????
 */
int main(){
	int n, k, i;
	cin >> n;
	const int N = n;
	int a[N]; //?????????
	for(i = 0; i < N; i ++){
		cin >> a[i];
	} //????
	cin >> k; //??????
	n = 0; //????n???????????????
	for(i = 0; i < N; i ++){
		if(a[i] != k){
			if(n != 0)
				cout << " " << a[i];
			else
				cout << a[i];
			n ++;
		}
	} //???????
	return 0; //????
}