semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
    int n,x,t,e,b,sz[N],k;
    scanf("%d",&n);
    t=0;
    for(int i=0;i<n;i++){
        scanf("%d",&sz[i]);
        if(sz[i]%2==0){
        i=i+0;
        }else{
            sz[t]=sz[i];
            t++;      
        }
    }
    for(int a=1;a<t;a++){
        for(b=0;b<t-a;b++){
            if(sz[b]>sz[b+1]){
                e=sz[b+1];
                sz[b+1]=sz[b];
                sz[b]=e;
            }
        }
    }
    for(b=0;b<t-1;b++){
    printf("%d,",sz[b]);
    }
    printf("%d",sz[t-1]);
    return 0;
}
int main(){
	int n;
	int sz[500];
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%d",&sz[i]);
	}
	int e;
	for(int z=1;z<=n;z++){
		for(int s=0;s<n-z;s++){
			
			 if(sz[s] > sz[s+1]){
				e = sz[s+1];
				sz[s+1] = sz[s];
				sz[s] = e;
		}
			
	}
   
}
	int a;
	for(int f=0;f<=n-1;f++){
	if(sz[f]%2!=0){
		a=sz[f];
	}
	}
  for(int d=0;d<=n-1;d++){

		if(sz[d]<a&&sz[d]%2!=0){
    printf("%d,",sz[d]);
	}

}

	printf("%d",a);
	

	return 0;
}
int main(){
int n;
scanf("%d",&n);
int b=0;
int sz[n],js[b];

for(int i=0;i<n;i++){
scanf("%d",&sz[i]);
if(sz[i]%2==1){
js[b]=sz[i];
b++;
}
}
int e;
for(int k=1;k<=b;k++){
for(int i=0;i<b-k;i++){
if(js[i]>js[i+1]){
e=js[i+1];
js[i+1]=js[i];
js[i]=e;
}
}
}
for(int i=0;i<b-1;i++){
printf("%d,",js[i]);
}
printf("%d",js[b-1]);
return 0;
}
int main()
{
	int n,c[M],odd[M];
	int i,j,*p,*q,m=0,temp;
	scanf("%d",&n);
	p=c;
	q=odd;
	for(i=0;i<n;i++,p++)
	{
		scanf("%d",p);
		if(*p%2!=0)
		{
			*q=*p;
			q++;
			m++;
		}
	}
	for(j=1;j<m;j++)
	{
		for(i=0;i<m-j;i++)
		{
			if(odd[i]>odd[i+1])
			{
				temp=odd[i];
				odd[i]=odd[i+1];
				odd[i+1]=temp;
			}
		}
	}
	printf("%d",odd[0]);
	for(i=1;i<m;i++)
	printf(",%d",odd[i]);
	
	return 0;
}
int main(){
	int N,sz[501],i=0,j=0,e,k=1,m;
	scanf("%d",&N);
	for(i=0;i<N;i++){
	scanf("%d",&sz[i]);
	}
	for(k=0;k<=N;k++){
		for(j=0;j<N;j++){
			if(sz[j]>sz[j+1]){
			e=sz[j+1];
			sz[j+1]=sz[j];
			sz[j]=e;
			}
		}
	}
	m=0;
	for(j=0;j<=N;j++){
		if(sz[j]%2==1){
			if(m==0){
				printf("%d",sz[j]);
			}else{
			printf(",%d",sz[j]);}
		m++;
		}
	}
return 0;
}
int compare(const void * elem1, const void * elem2)
{
	int *a=NULL,*b=NULL;
	a=(int *)elem1;
	b=(int *)elem2;
	return(*a-*b);
}
main()
{
    int n,i,j=0,x=0,flag=0;
    scanf("%d",&n);
    int a[n];
    for(i=0;i<n;i++)
    scanf("%d",&a[i]);
    
    int b[n];
    for(i=0;i<n;i++)
    b[i]=0;
    
    for(i=0;i<n;i++)
    if(a[i]%2==1)
    {
        b[j]=a[i];
        j++;
    }
    qsort(b,n,sizeof(int),compare);
    for(i=0;i<n;i++) 
    {
    if(b[i]>0&&flag==0)
       {
           printf("%d",b[i]);
           flag=1;
       }
    else if(b[i]!=0)
    printf(",%d",b[i]);
    }

    
}
/*
 *7001.cpp
 *??????????N????500???????????????????????????
 *Created on: 2012-11-3
 *Author: ??
 */
int N=0,i=0,j=0,shuru[500],jishu[500],mid=0,p=0;//????
int main ()
{
	cin>>N;
	for(i=0;i<N;i++)//????
	{
		cin>>shuru[i];
	}
	j=0;
	p=0;
	for(i=0;i<N;i++)//?????????
	{
		if((shuru[i]%2)==1)
		{
			jishu[j]=shuru[i];
			j++;
			p++;
		}
		else
			continue;
	}
	for(i=0;i<p-1;i++)//????
	{
		for(j=0;j<p-i-1;j++)
		{
			if(jishu[j]>=jishu[j+1])
			{
				mid=jishu[j];
				jishu[j]=jishu[j+1];
				jishu[j+1]=mid;
			}
		}
	}
	cout<<jishu[0];
	for(i=1;i<p;i++)//?????
		cout<<','<<jishu[i];
	return 0;
}
int main(){
    int n,i,m,j,a,e;
    scanf ("%d",&n);
    int sz[n],b[n];
    j=0;
    for (i=0;i<n;i++){
        scanf ("%d",&sz[i]);
        a=sz[i]%2;
        if(a==1){
        b[j]=sz[i] ;
        j++;
        }
    }
    for (m=1;m<=j;m++){
        for (i=0;i<j-m;i++){
            if (b[i]>b[i+1]){
                e=b[i+1];
                b[i+1]=b[i];
                b[i]=e;
            }
        }
    }
for (i=0;i<j-1;i++){
    printf("%d,",b[i]);
}
printf("%d",b[j-1]);
return 0;
}
int main()
{
	int N,i,b=0,j,c;
	int a[501]={0};

	scanf("%d",&N);
	for(i=1;i<=N;i++)
		scanf("%d",&a[i]);
	for(j=1;j<N;j++){
		for(i=0;i<N;i++){
			if(a[i]>a[i+1]){
				c=a[i+1];
				a[i+1]=a[i];
				a[i]=c;
			}
		}
	}

	for(i=1;i<=N;i++){
		if(a[i]%2==1&&b==0){
			printf("%d",a[i]);
			b=b+1;
		}
		else if(a[i]%2==1&&b!=0)
			printf(",%d",a[i]);
//		else
//			continue;
	}
	
	return 0;
}
int main()
{
	int n,i,k,a,jishu[500],e;
	scanf("%d",&n);
	k=0;
	for(i=0;i<n;i++)
	{
		scanf("%d",&a);
		if(a%2!=0)
		{
		    jishu[k]=a;
			k++;
		}
	}
	for(i=1;i<=k;i++)
	{
		for(a=0;a<k-i;a++)
		{
			if (jishu[a]>jishu[a+1])
			{
				e=jishu[a+1];
				jishu[a+1]=jishu[a];
				jishu[a]=e;
			}
		}
	}
    for(i=0;i<k;i++)
	{
		if(i==k-1)
		{
		    printf("%d",jishu[i]);
		}
		else
		{
        	printf("%d,",jishu[i]);
		}
	}
	return 0;
}
int main(){
	int n,e;
	scanf("%d",&n);
	int *sz=(int*)malloc(sizeof(int)*n);
    int *js=(int*)malloc(sizeof(int)*n);
	int p=0;
	for(int i=0;i<n;i++){
		scanf("%d",&sz[i]);
		
		if((sz[i]%2)==1){
			js[p]=sz[i];
			
			p++;

		}
	}

	for(int w=1;w<p;w++){
		for(int h=0;h<(p-w);h++){
			if(js[h]>js[h+1]){
				e=js[h+1];
				js[h+1]=js[h];
				js[h]=e;
			}
		}
	}
	for(int y=0;y<(p);y++){
		if(y<p-1){
			printf("%d,",js[y]);
		}else{
			printf("%d",js[y]);
		}
	}
	
	return 0;
}
/*
 * 1000012826_??????.cpp
 *
 *  Created on: 2010-12-24
 *      Author: Administrator
 */

int main(){
	int a[501],b[501]={0},c[501]={0};
	int i,j=0,n,m;
	cin>>n;
	for(i=0;i<n;i++)
		cin>>a[i];
	for(i=0;i<n;i++){
		if(a[i]%2==1){
			b[a[i]]=a[i];
			c[a[i]]++;
		}
	}
	for(int k=0;k<501;k++)
		if(b[k]!=0){
			if(c[k]=1){
			cout<<b[k];m=k+1;break;}
			else{cout<<b[k];m=k+1;
				for(i=1;i<c[k];i++)
					cout<<","<<b[k];

			break;}
		}
	for(int k=m;k<501;k++)
		if(b[k]!=0){
			for(int l=0;l<c[k];l++)
				cout<<","<<b[k];
		}
}
int main(){
	int n;
	scanf("%d",&n);
	int i,j;
	int shuzu[500];
	int jishu[500];
	for(i=0;i<n;i++){
		scanf("%d",&shuzu[i]);
	}
	int e;
	for(i=1;i<=n;i++){
		for(j=0;j<n-i;j++){
			if(shuzu[j]>shuzu[j+1]){
				e=shuzu[j+1];
				shuzu[j+1]=shuzu[j];
				shuzu[j]=e;
			}
		}
	}
	for(j=0;j<n;j++){
		for(i=0;i<n;i++){
			if(j==0&&shuzu[i]%2!=0){
				jishu[j]=shuzu[i];
				break;
			}else if(shuzu[i]>jishu[j-1]&&shuzu[i]%2!=0){
				jishu[j]=shuzu[i];
				break;
			}	
		}
		if(i==n){
			break;
		}
	}
	
	for(i=0;i<j;i++){
		if(i==0){
			printf("%d",jishu[i]);
		}else{
			printf(",%d",jishu[i]);
		}
	}
return 0;
}
int main(){
int n;
int i,max,e,k;
int sz[10000];
scanf("%d",&n);
for(i=0;i<n;i++)
{scanf("%d",&sz[i]);}
for(k=1;k<=n;k++)
{max=0;
for(i=0;i<=n-k;i++)
{if(sz[i]>sz[max]) max=i;}
if(max!=n-k){
	e=sz[max];
	sz[max]=sz[n-k];
	sz[n-k]=e;}}
for(i=0;i<n;i++)
{if(sz[i]%2==1) {printf("%d",sz[i]);break;}}
for(i=i+1;i<n;i++)
{if(sz[i]%2==1) {printf(",%d",sz[i]);}}
return 0;}
/*
 * 1111.cpp
 *
 *  Created on: 2012-11-9
 *      Author: 12272
 */
int main()
{
	int N, i, j, temp, m = 0;
	int a[501], b[501];
	cin >> N;
	for(i = 0; i < N; i++)
		cin >> a[i];
	for(i = 0; i < N; i++)
		if(a[i] % 2 != 0)
		{
			b[m] = a[i];
			m++;
		}
	for(i = 0; i < m-1; i++)
		for(j = 0; j < m-1-i; j++)
			if(b[j] > b[j+1])
			{
				temp = b[j];
				b[j] = b[j+1];
				b[j+1] = temp;
			}
	for(i = 0; i < m; i++)
	{
		if(i == 0)
			cout << b[i];
		else
			cout << "," << b[i];
	}
	return 0;
}
int main()
{
    int n,i,j=1,p,num,k;//???????n?????i?j?k??????num 
    int a[500]={0};//????a?????0 
    cin>>n;//??n 
    for(i=1;i<=n;i++)//???? 
    {
                     cin>>num;//???? 
                     if(num%2!=0)//????????? 
                     a[j++]=num;//???????????? 
    }
    j=j-1;//?j????????? 
    for(k=1;k<=j-1;k++)//???????xunhuan 
    {
                       for(i=1;i<=j-k;i++)//???? 
                       {
                                          if(a[i]>a[i+1])
                                          {
                                                         p=a[i];
                                                         a[i]=a[i+1];
                                                         a[i+1]=p;//?a[i]?a[i+1]?? 
                                          }
                       }
    }
    for(i=1;i<=j;i++)
    {
                     if(i!=j)
                     cout<<a[i]<<",";
                     else
                     cout<<a[i];//?? 
    }
    return 0;
}
int main()
{
    int N, a[500], i, j=0, z, b[500], sum, temp;
    scanf("%d",&N);
    for(i=0;i<N;i++)
    {
        scanf("%d",&a[i]);
        if(a[i]%2!=0)
        {
            b[j]=a[i];
            j=j+1;
        }
    }
    sum=j;
    for(i=0;i<sum;i++)
    {
        for(z=i+1;z<sum;z++)
        {
            if(b[i]>b[z])
            {
                temp=b[i];
                b[i]=b[z];
                b[z]=temp;
            }
        }
    }
    for(i=0;i<sum;i++)
    {
        printf("%d",b[i]);
        if(i<(sum-1))
            printf(",");
    }
    return 0;
}
int main(){
	int n;
	cin>>n;
	int a[500],ji[500];
	int num=0;
	int i,j;
	int t;
	for(i=0;i<=n-1;i++)
	{
		cin>>a[i];
		if(a[i]%2==1)
		{
			ji[num]=a[i];
			num=num+1;
		}
	}
	for(i=num-1;i>=1;i--)
		for(j=0;j<=i-1;j++)
		{
			if(ji[j]>ji[j+1])
			{
				t=ji[j];
				ji[j]=ji[j+1];
				ji[j+1]=t;
			}
		}
	cout<<ji[0];
	for(i=1;i<=num-1;i++)
		cout<<","<<ji[i];
}
int main()
{
	int n,a[1000],odd=0,t;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		cin>>t;
		if(t%2)
		{
			a[odd]=t;
			odd++;
		}
	}
	for(int i=0;i<odd-1;i++)
		for(int j=0;j<(odd-i-1);j++)
			if(a[j]>a[j+1])
			{
				t=a[j];a[j]=a[j+1];a[j+1]=t;
			}
	for(int i=0;i<odd-1;i++)
		cout<<a[i]<<',';
	cout<<a[odd-1];
	return 0;
}
/*
	name : ??(14-3) ?????? 
	author : 1200012757(chenminhuan)
	Data : 11/04/2012 0:26
*/


int main()
{
	int N,cnt=0;
	int a[500+10];	
	cin>>N;
	
	for (int i = 0 ; i < N ;++i) 	    //??n??
	{		
		cin>>a[i];
		if (a[i]%2)		    //mod 2?1?????
			a[cnt++]=a[i];
	}
	
	sort(a, a+cnt);
	
	for (int i =0 ; i < cnt ; ++i) 
	{
		if (i) cout << ",";
		cout << a[i];
	}
	return 0;
}
int main()
{
	int a[501],b[501];
	int i,j=1,t,n,p,m=1;
	scanf("%d",&n);
	for(i=1;i<=n;i++)
	{
		scanf("%d",&a[i]);
		if(a[i]%2==1)
		{
			b[j]=a[i];
			j++;
			m++;
		}
	}
	for(p=1;p<m-1;p++)
	{
		for(j=1;j<m-p;j++)
		{
			if(b[j]>b[j+1])
			{
				t=b[j];
				b[j]=b[j+1];
				b[j+1]=t;
			}
		}
	}
	printf("%d",b[1]);
	for(j=2;j<=m-1;j++)
	{
		printf(",%d",b[j]);
	}
	return 0;
}
/*
 * ???:test1.cpp
 * ??:???
 * ????: 2010-12-24
 * ??:???????N,?2?? N ????,????????????????????
 */

int main(){
	int N,x,t;//????
	cin>>N;//????????
	int a[N+1],i=0,m=0;//????
	while(N>0){
		cin>>x;//????
		if(x%2!=0){
			a[i]=x;
			m++;
			i++;
		}//???????
		N--;//N???????
	}
	for(int j=0;j<m-1;j++)
		for(int k=0;k<m-j-1;k++){
			if(a[k]>a[k+1]){
				t=a[k];
				a[k]=a[k+1];
				a[k+1]=t;
			}
		}//?????????
	cout<<a[0];
	for(int j=1;j<m;j++)
		cout<<','<<a[j];//????????
	return 0;//????
}
int cmp(const void *a,const void *b){
	return *(int *)a-*(int *)b;
}

int main(){
	int N,inA[MAXN],oddA[MAXN],M=0;
	cin>>N;
	for(int i=0;i<N;i++) cin>>inA[i];
	for(int i=0;i<N;i++){
		if(inA[i]%2){
 			oddA[M]=inA[i];
			M++;
		}
	}
	qsort(oddA,M,sizeof(int),cmp);
	for(int i=0;i<M;i++){
		cout<<oddA[i];
		if(i!=M-1) cout<<',';
	}
	return 0;
}
int main()
{
	int n,i,j,e;
	int k=1,s=0;
	int a[500],b[500];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&(a[i]));
	}
	for(i=0;i<n;i++)
	{
		if(a[i]%2!=0)
		{
			b[k]=a[i];
			k++;
			s++;
		}
	}
	for(j=0;j<s;j++)
	{
		for(k=1;k<=s-j;k++)
		{
			if(b[k]<b[k+1])
			{
				e=b[k+1];
			    b[k+1]=b[k];
			    b[k]=e;
			}
		}
		if(s-j!=1)
		{
		printf("%d,",b[s-j]);
		}
		if(s-j==1)
		{
			printf("%d",b[s-j]);
		}
	}
	return 0;
}
int main()
{
    int sz[500],js[500];
    int n,i,k,x=0,e;
    scanf("%d",&n);
    for(i=0;i<n;i=i+1){
		scanf("%d ",&sz[i]);
		}
	for(i=0;i<n;i=i+1){
		if(sz[i]%2==1){
			js[x]=sz[i];
			x=x+1;
			} 
		}
	for(k=1;k<=x;k=k+1){
		for(i=0;i<x-k;i=i+1){
			if(js[i]>js[i+1]){
				e=js[i];
				js[i]=js[i+1];
				js[i+1]=e;
				}
			}
		}
	for(i=0;i<x;i=i+1){
		if(i<x-1) printf("%d,",js[i]);
		else if(i=x-1) printf("%d",js[i]);
		}
    
    return 0;
}
int main()
{
int n,i,j,k,q,p,e,w;
j=-1;
scanf("%d",&n);
int sz[500];
int zs[500];
for(i=0;i<n;i++){
scanf("%d",&(sz[i]));
if(sz[i]%2!=0){
j=j+1;
zs[j]=sz[i];
}
}
for(k=1;k<=j+1;k++){
q=0;
for(int p=0;p<=j+1-k;p++){
if(zs[p]>zs[q]){
q=p;
}
if(q!=j-k+1){
e=zs[q];
zs[q]=zs[j-k+1];
zs[j-k+1]=e;
}
}
}
for(w=0;w<=j;w++){
if(w!=j){
printf("%d,",zs[w]);
}
else {
printf("%d",zs[w]);
}
}
return 0;}
/**
* @file 8.cpp
* @author ???
* @date 2010?11?7
* @description
* ?????????????
*/
int main()
{
	int N, num, a[500], i, j = 0, flag = 1, k, temp; 
	cin >> N;
	for (i = 0; i < N; i++)
	{
		cin >> num;
		if (num % 2 != 0)
		{
			a[j++] = num;
		}
	}
	for (i = 0; i < j; i++)
	{
		for (k = 0; k < j - 1 - i; k++)
		{
			if (a[k] > a[k + 1])
			{ 
				temp = a[k];
				a[k] = a[k + 1];
				a[k + 1] = temp;
			}
		}
	}
	for (i = 0; i < j; i++)
	{
		cout << a[i];
		flag = 0;
		if (flag == 0 && i != j - 1)
		{
			cout << ",";
		}
	}
	return 0;
}
int main()
{
	int a[500],n,i,j=0,b,k=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&b);
		if(b%2!=0)
		{
			a[k]=b;
			k+=1;
		}
	}
	for(i=0;i<k;i++)
	{
		for(j=0;j<k-1;j++)
		{
			if(a[j]>a[j+1])
			{
				b=a[j];
				a[j]=a[j+1];
				a[j+1]=b;
			}
		}
	}
	for(i=0;i<k-1;i++)
	{
		printf("%d,",a[i]);
	}
	printf("%d",a[k-1]);
	return 0;
}
int main()
{
	int N, i, j, x;
	int a[500];
	scanf("%d", &N);
	for(i=0;i<N;i++)
	{
		scanf("%d", &a[i]);
		if(a[i]%2==0)a[i]=0;
	}
	for(j=1;j<N;j++)
	{
		for(i=0;i<N-j;i++)
		{
			if(a[i]>a[i+1])
			{
				x=a[i];
				a[i]=a[i+1];
				a[i+1]=x;
			}
		}
	}
	for(i=0;i<N;i++)
	{
		if(a[i]!=0)
		{
		if(i<(N-1))
			printf("%d,", a[i]);
		else
			printf("%d", a[i]);
		}
	}
	return 0;
}
int main()
{
    int n,i,x[500],s,t,y[500],k,m;
    k=0;
    scanf("%d ",&n);
    for(i=0;i<n;i++){
        scanf("%d",&x[i]);
        s=x[i]%2;
        if(s==1){
            y[k]=x[i];
            k=k+1;
        }
    }
    for(t=0;t<k;t++){
        for(i=k-1;i>t;i--){
            if(y[i]<y[i-1]){
                m=y[i];
                y[i]=y[i-1];
                y[i-1]=m;
            }
        }
    }
    for(i=0;i<k-1;i++){
        printf("%d,",y[i]);
    }
    printf("%d",y[k-1]);
    return 0;
}
int main(){
int n,i,k,e;
int a[500];
char x=',';
scanf("%d",&n);
for(i=0;i<n;i++)
scanf("%d ",&a[i]);
for(k=1;k<=n;k++){
for(i=0;i<n-k;i++){
if(a[i]>a[i+1]){
e=a[i+1];
a[i+1]=a[i];
a[i]=e;
}}}
for(i=0;i<n-1;i++){
if((a[i]%2==1)&&(i<n-2)){
printf("%d%c",a[i],x);}
else if((a[i]%2==1)&&(i=n-1))
 printf("%d",a[i-1]); 

}


return 0;
}
int main()
{
	int a[500]={0};
	int b[500]={0};

	int i,n;
	int j,temp;
	int p=0;

	scanf("%d",&n);

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


	for(i=0;i<n;i++)
	{
		if(a[i]%2==1)
		{
			b[p]=a[i];
			p=p+1;
		}
	}
	


	for(i=1;i<p-1;i++)
	for(j=0;j<=p-2;j++)
	{
	   if(b[j]>b[j+1])
	   {
	   temp=b[j+1];
	   b[j+1]=b[j];
	   b[j]=temp;
	   }
	}

	if(p==1) printf("%d",b[0]);
	else
	{
		printf("%d",b[0]);
		for(i=1;i<=p-1;i++)
			printf(",%d",b[i]);
	
	}

}
void maopao(int a[],int n)
{
	int i,k,t;
	for(k=n-1;k>0;k--){
		for(i=0;i<k;i++){
			if(a[i]>a[i+1]){
				t=a[i];
				a[i]=a[i+1];
				a[i+1]=t;
			}
		}
	}
}
int main(){
	int a[MAX],b[MAX];
	int i,n,c,m,x;
	x=0;
	scanf("%d",&n);
	
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
	for(i=0;i<n;i++){
		if(a[i]%2!=0){
			b[x]=a[i];
			x=x+1;

		}
	}
	c=0;
    maopao(b,x);
    for(c=0;c<x-1;c++){
          printf("%d,",b[c]);
	}
	printf("%d",b[x-1]);
	return 0;
}
int f(int x)
{  return x%2; }

int cmp(const void*a,const void*b)
{  return *(int*)a-*(int*)b; }

main()
{
      int i,j=0,n,x;
      int *b;
      scanf("%d",&n);
      b=(int*)malloc(n*sizeof(int));
      for(i=0;i<n;i++)
      {
           scanf("%d",&x);
           if(f(x)){ b[j]=x;j++;}
      }
      qsort(b,j,sizeof(int),cmp);
      for(i=0;i<j-1;i++) printf("%d,",b[i]);
      printf("%d",b[i]);
 
}
int judge(int x){
if(x%2==0){return 0;}
else{return 1;}
}
int main(){

int n,number[500],count,i,p;
scanf("%d",&n);
for(i=0;i<n;i++){scanf("%d",&number[i]);}
for(i=0;i<n;i++){for(p=0;p<n-1;p++){if(number[p]>number[p+1]){number[p]+=number[p+1];number[p+1]=number[p]-number[p+1];number[p]-=number[p+1];}}}
count=0;
for(i=0;i<n;i++){
if(judge(number[i])&&count==0){printf("%d",number[i]);count=1;continue;}
if(judge(number[i])&&count==1){printf(",%d",number[i]);}
}







return 0;}
int main()
{
 int n,i,k=0,j,a[500];
 scanf("%d",&n);
 for(i=0;i<n;i++)
  scanf("%d",&a[i]);
 for(i=1;i<1000;i++,i++)
 {
  for(j=0;j<n;j++)
  if(a[j]==i) 
  {k++;
   if(k==1)
    printf("%d",i);
   else printf(",%d",i);
   }}
 
}
int main(){
    int n,i,j=0,c=0;
    scanf("%d",&n);
    int sz[n];
    int js[501];
    for(i=0;i<n;i++){
        scanf("%d",&sz[i]);
    }
    for(i=0;i<501;i++){
        js[i]=0;
    }
    for(i=0;i<n;i++){
        if(sz[i]%2==1){
            js[j]=sz[i];
            j++;
            c++;
        }
    }
    int e,k;
    for(k=1;k<=c;k++){
        for(i=0;i<c-k;i++){
            if(js[i]>js[i+1]){
                e=js[i+1];
                js[i+1]=js[i];
                js[i]=e;
            }
        }
    }
    for(i=0;i<c-1;i++){
        printf("%d,",js[i]);
    }
    printf("%d",js[c-1]);
    return 0;
}
int main()
{
	int m[500],j[500],i=0,n,e,v=0;
	scanf("%d", &n);
	for(i=0;i<n;i++){
		scanf("%d", &m[i]);
		if(m[i]%2!=0){
			j[v]=m[i];
			v=v+1;
		}
	}
	for(int k=0;k<v-1;k++){
		for(int q=0;q<v-k-1;q++){
			if(j[q]>j[q+1]){
				e=j[q+1];
				j[q+1]=j[q];
				j[q]=e;
			}
		}
	}
	for(int u=0;u<v-1;u++){
	printf("%d,", j[u]);
	}
	printf("%d", j[v-1]);
	return 0;
}
int main(){
    int n;
    scanf("%d",&n);
    int z[500],s=0,m=0,j[m],e;
    for(int i=0;i<n;i++){
        scanf("%d ",&(z[i]));
    }
    for(int i=0;i<n;i++){
        if(z[i]%2!=0){
            j[m]=z[i];
            s++;
            m++;
        }
    }
    for(int k=1;k<=s;k++){
        for(m=0;m<s-k;m++){
            if(j[m]>j[m+1]) {
            e=j[m];
            j[m]=j[m+1];
            j[m+1]=e;
            }       
            
        }
    }
    for(m=0;m<s-1;m++){
        printf("%d,",j[m]);
    }
    printf("%d",j[s-1]);
    return 0;
}
int main(){ 
	int n,j,i,t,k=0,sr[501]={0},px[501]={0};
    scanf("%d",&n);
	for(i=1;i<=n;i++){
	scanf("%d",&sr[i]);
	}
    for(i=1;i<=n;i++){
		if(sr[i]%2==1){
		k++;
		px[i]=sr[i];}
	}
	for(j=1;j<=n;j++){
		for(i=1;i<n;i++){
			if(px[i]<px[i+1]){
			t=px[i];
			px[i]=px[i+1];
			px[i+1]=t;
			}
		}
	}
	for(i=k;i>=1;i--){
	printf("%d",px[i]);
	if(i==1){
	break;}
	printf(",");
	}




return 0;
}
int main(){
    int N,i,j,s;
    scanf("%d",&N);
    int jishu[501];
    int sz[501];
    j=0;
    for(int i=0;i<N;i++){
        scanf("%d" ,&sz[i]);
        if(sz[i]%2==1){
            jishu[j]=sz[i];
            j++;
        }
    }
    s=j;
    int e;
    for(int i=0;i<s;i++){
      for(int j=0;j<s-i;j++){
         if(jishu[j]>jishu[j+1]){
             e=jishu[j];
             jishu[j]=jishu[j+1];
             jishu[j+1]=e;
         }
      }  
    }
    for(int j=0;j<s;j++){
       if(j!=s-1){
        printf("%d,",jishu[j]);
        }else{
            printf("%d",jishu[j]);
        }
    }
      
   return 0;
}
int main(){
    int N,i,a=0,e,k;
    scanf("%d",&N);
    int sz[N],m[N];
    for(i=0;i<N;i++){
        scanf("%d",&(sz[i]));
        }
        for(i=0;i<N;i++){
            m[i]=0;
        }
        for(i=0;i<N;i++){
            if((sz[i])%2==1){
                a++;
                m[i]=sz[i];
                }else{
                    continue;
                }
        }
           for(k=1;k<N;k++){
           for(i=0;i<N-k;i++){
               if(m[i]>m[i+1]){
                   e=m[i+1];
                   m[i+1]=m[i];
                   m[i]=e;
               }
           }
           }     
            for(i=N-a;i<N-1;i++){
            printf("%d,",m[i]);
            
            }    
            printf("%d",m[N-1]);
            return 0;    
                
            }
int main()
{
	int num[500];
	int n;
	int i;
	int sum=0;
	int a;
	int j;
	int k;
	int g;
	scanf("%d",&n);
	for(i=0;i<=n-1;i++)
	{
		scanf("%d",&a);
		if(a%2==1)
		{
			num[i]=a;
			sum=sum+1;
		}

		else
			num[i]=0;
	}
	for(j=1;j<=n-1;j++)
	{
		for(i=n-1;i>=j;i--)
		{
			if(num[i]>=num[i-1])
			{	g=num[i-1];
				num[i-1]=num[i];
				num[i]=g;
			}
		}
	}
         printf("%d",num[sum-1]);
	for(k=sum-2;k>=0;k--)
		printf(",%d",num[k]);
}
int main(){
	int n,k,i,j,r;
	int sz[200],jsz[200];
	scanf("%d",&n);
	for(i=0;i<n-1;i++){
		scanf("%d ",&sz[i]);
	}
	if(i=n-1){
		scanf("%d",&sz[i]);
	}
		
	r=0;
	for(i=0;i<n;i++){
		if(sz[i]%2!=0)
		{
			jsz[r]=sz[i];
		    r++;
		}else{
			r=r;
		}
	}
	for(k=1;k<r;k++){
		int tmp=jsz[k];
		for(j=k-1;j>=0;j--){
			if(tmp<jsz[j])
			{
				jsz[j+1]=jsz[j];
				jsz[j]=tmp;}
			else{
				jsz[j+1]=tmp;
				break;
			}
		}
	}
	for(j=0;j<r-1;j++){
		printf("%d,",jsz[j]);
	}
	if(j=r-1)
	{printf("%d",jsz[j]);
	}
	return 0;
}
int main (){
int N,i,j,a,num;
int x[500],y[500];
scanf("%d",&N); 
for (i=0;i<N;i++){
       scanf("%d",&x[i]);
}
for(j=0;j<N;j++){
   for(int k=0;k<N-j;k++){
           if (x[k]>x[k+1]){
            a=x[k+1];
            x[k+1]=x[k];
            x[k]=a; 
            }
     }
}
for (int t=0;t<N;t++){
    if (x[t]%2==1){
                   num=0;
       for (int m=0;m<t;m++){
           if (x[m]%2==1){
                num++;     
            }
        }
        if (num==0){
        printf("%d",x[t]);
        }
      else {
           printf(",%d",x[t]);
      }
    }
}
 return 0;
}
int main(){
int N,sz[500],sz2[500],a=0,b;
scanf("%d",&N);
for(int i=0;i<N;i++){
scanf("%d",&(sz[i]));
if(sz[i]%2!=0){
sz2[a]=sz[i];
a+=1;
}
}
for(int p=0;p<a;p++){
for(int q=0;q<p;q++){
if(sz2[q]>sz2[p]){
b=sz2[q];
sz2[q]=sz2[p];
sz2[p]=b;
}
}
}
for(int c=0;c<a-1;c++){
printf("%d,",sz2[c]);
}
printf("%d",sz2[a-1]);
return 0;
}
int main()
{
 int n,sz[500],i,e,c,t=0,N,k=0,J[500];
 scanf("%d",&n);
 N=n;
 for(i=0;i<n;i++)
 {scanf("%d",&sz[i]);}

 for(i=0;i<N;i++)
 {
 c=sz[i]%2;
 if(c!=0)
 {J[t]=sz[i];
  t++;}
 if(c==0)
{J[t]=0;
  t++;
  k++;}
 }

 while(n>0)
 {
 for(t=0;t<n-1;t++)
   {
  if(J[t]>J[t+1])
    {e=J[t+1];
     J[t+1]=J[t];
     J[t]=e;}
   }
 n--;
 }
  printf("%d",J[k]);
  for(t=k+1;t<N;t++)
 {printf(",%d",J[t]);}

return 0;
}
int main()
{
    int N,i,j=0,k,sz[500],result[500],e;
    scanf("%d",&N);
    for(i=0;i<N;i++)
    {
        scanf("%d",&sz[i]);
        if(sz[i]%2==1)
        {
            result[j]=sz[i];
            j++;
        }
    }
    for(k=1;k<=j;k++)
    {
        for(i=0;i<j-k;i++)
        {
            if(result[i]>result[i+1])
            {
                e=result[i+1];
                result[i+1]=result[i];
                result[i]=e;
            }
        }
    }
    for(i=0;i<j-1;i++) printf("%d,",result[i]);
    printf("%d",result[j-1]);
    return 0;
}
int main()
{
int i,r=0,n,m,j;
scanf("%d",&n);
int a[10000],b[10000];
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
}
for(i=0;i<n;i++)
{
if(a[i]%2==1)
{
b[r]=a[i];
r=r+1;
}
if(a[i]%2==0)
{
r=r;
}
}
for(i=0;i<r;i++)
{
for(j=r-1;j>i;j--)
{
if(b[j]<=b[j-1])
{
m=b[j-1];
b[j-1]=b[j];
b[j]=m;
}
if(b[j]>b[j-1])
{
b[j]=b[j];
b[j-1]=b[j-1];
}
}
}
for(i=0;i<r-1;i++)
{
printf("%d,",b[i]);
}
printf("%d",b[r-1]);
}
int main ()
{
int N,sz[500];
scanf("%d",&N);
int i;
for(i=0;i<N;i++)
{
 scanf("%d",&sz[i]);
}
i=0;
int j=0;
while(i<N)
{
if(sz[i]%2!=0)
{
sz[j]=sz[i];
j++;
}
i++;
}                                                                                                                                                     
int LEN=j;
int e;
int k;
for(k=1;k<=LEN;k++)
{
int j;
for(j=0;j<LEN-1;j++)
{
if(sz[j]>sz[j+1])
{
e=sz[j+1];
sz[j+1]=sz[j];
sz[j]=e;
}
}
}
int m=0;
while(m<LEN-1)
{
printf("%d,",sz[m]);
m++;
}
printf("%d",sz[LEN-1]);
return 0;

}
int main(){
	int n,m,i,e,k,a,sz[1000],js[1000];
	scanf("%d",&n);
	for(i=0;i<n;i++){
	scanf("%d",&sz[i]);
}
	a=0;
	for(i=0;i<n;i++){
		if(sz[i]%2!=0){
			js[a]=sz[i];
			a++;}
	}
	for(k=1;k<=a;k++){
		m=0;
	for(i=0;i<=a-k;i++){
		if(js[i]>js[m]){
			m=i;
		}
	}
		if(js[m]!=js[a-k]){
			e=js[a-k];
			js[a-k]=js[m];
			js[m]=e;
		}
	}
	for(i=0;i<a;i++){
		if(i==a-1){printf("%d",js[i]);}
        else{printf("%d,",js[i]);}
}
	return 0;
	}
int main(){
	int N,i,m,e,sz[1000],x=-1,a[1000];
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d",&sz[i]);
	}
	for(m=1;m<=N;m++){
		for(int a=0;a<N-m;a++){
			if(sz[a]>sz[a+1]){
				e=sz[a+1];
				sz[a+1]=sz[a];
				sz[a]=e;
			}
		}
	}
	for(int y=0;y<N;y++){
		if(sz[y]%2==1){
			x++;
			a[x]=sz[y];
		}
	}
	for(int q=0;q<=x;q++){
		if(q<x){
			printf("%d,",a[q]);
		}else if(q==x){
			printf("%d",a[q]);
		}
	}
	return 0;
}