semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main()
{
	int a[501];
	int b[501];
	int n,m,i,j,e;
	cin>>n;
	m=0;
	for(i=1;i<=n;i++)
	{
		cin>>a[i];
		if(a[i]%2!=0)//???????b
		{
			b[m+1]=a[i];
			m++;
		}
	}
	for(i=1;i<=m-1;i++)
		for(j=1;j<=m-i;j++)//????
			if(b[j]>b[j+1])
			{
				b[0]=b[j];
				b[j]=b[j+1];
				b[j+1]=b[0];
			}
	e=0;
	for(i=1;i<=m;i++)//??
	{
		if(e==1)
			cout<<',';
		cout<<b[i];
		e=1;
	}
	return 0;
}
int main()
{
	int zs[N],i,n;
	int js[M],j,k;
	scanf("%d",&n);
	for(i=0,j=0;i<n;i++)
	{
		scanf("%d",&zs[i]);
		if(zs[i]%2==1)
		{
			js[j]=zs[i];
			j++;
		}
		else continue;
	}
	for(k=1;k<j;k++)
	{
		int t=js[k];
		for(i=k-1;i>=0;i--)
		{
			if(t<js[i])
			{
				js[i+1]=js[i];
				js[i]=t;
			}
			else
			{
				js[i+1]=t;
				break;
			}
		}
	}
	for(k=0;k<j-1;k++)
		printf("%d,",js[k]);
	printf("%d",js[j-1]);
	return 0;
}
int main(){
	int n,i,a[100],k,e,s;
	scanf("%d",&n);
	for(i=0;i<=n-1;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!=0)
		s=i;}
for( i = 0; i < s; i++){
	if(a[i]%2!=0)
		printf("%d,",a[i]);
}
printf("%d",a[s]);
return 0;
}
int main(){
	int i,n,z=0,k,h=0;
	int sz[500];
	int mm[500];
	int xx[500];
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&sz[i]);
	}
    for(i=0;i<n;i++){
		if(sz[i]%2==1){
			mm[z]=sz[i];
			z++;
		}
	}
	for(k=0;k<10000;k++){
		for(i=0;i<z;i++){
			if(k==mm[i]){
				xx[h]=k;
				h++;
				break;
			}
		}
	}
	for(i=0;i<(h-1);i++){
		printf("%d,",xx[i]);
	}
	printf("%d",xx[h-1]);
	return 0;
}
int main()
{
	int n,i;//????
	cin>>n;
	int a[501],b[501],count=1;//??a???????b????,??????
	for (i=1;i<=n;i++)
	{
		cin>>a[i];
		if (a[i]%2==1)
			b[count++]=a[i];
	}//?????????????count-1
	int j,k,p;//maopaopaixu
	for (j=1;j<=count-1-1;j++)
	{
		for (k=1;k<=count-1-j;k++)
		{
			if (b[k]>=b[k+1])
			{
				p=b[k];
				b[k]=b[k+1];
				b[k+1]=p;
			}
		}
	}//??????????
	int l;
	for (l=1;l<=count-2;l++)
		cout<<b[l]<<",";
	cout<<b[count-1];
	return 0;
}
int main(){
          int n,a[500],i,j,k;
          cin>>n;
          for(i=0;i<n;i++) cin>>a[i];
          for(i=0;i<n-1;i++)                              //??????
        	  for(j=0;j<n-i-1;j++)
        		  if(a[j]>a[j+1])
        		  {
        			  k=a[j];
        			  a[j]=a[j+1];
        			  a[j+1]=k;
        		  }
          for(i=0;i<n;i++) if(a[i]%2!=0) {cout<<a[i];break;}       //????
          for(j=i+1;j<n;j++) if(a[j]%2!=0) cout<<","<<a[j];
          return 0;
}
int main(){
int N,i,sz[500],m=0,e,js[500],j,p,k;
scanf("%d",&N);
for(i=0;i<N;i++){
    scanf("%d",&(sz[i]));
}
j=0;
p=0;
for(i=0;i<N;i++){
    if(sz[i]%2!=0){
        js[j]=sz[i];
        j++;
        p++;
    }
}
m=0;
for(k=1;k<=p;k++){
    m=0;
    for(j=0;j<=p-k;j++){
        if(js[j]>js[m]){
        m=j;
        }
    }
    if(m!=p-k){
        e=js[m];
        js[m]=js[p-k];
        js[p-k]=e;
    }
}
for(j=0;j<p-1;j++){
printf("%d,",js[j]);
}
printf("%d",js[p-1]);
return 0;
}
int main(){
	int sz[500];
	int zs[500];
	int a,b,c,d,e,i,n;
	scanf("%d\n",&n);
    for(i=0;i<n;i++){
		scanf("%d",&sz[i]);
	}
	a=0;
    for(i=0;i<=n;i++){
		if(sz[i]%2!=0){
			zs[a]=sz[i];
			a++;
		}
	}
	for(i=0,d=0;i<a;i++){
        if(zs[i]>d){
			d=zs[i];
		}
	}
    for(c=0;c<a-1;c++){
	    for(i=0,b=10000;i<a;i++){
            if(zs[i]<b){
			    b=zs[i];
				e=i;
			}
		}
		zs[e]=d;
		printf("%d,",b);
	}
	printf("%d",d);
	return 0;
	}
/*
 *  Name:JudgeCars.cpp
 *
 *  Created on: 2012-11-05
 *  Author: ??
 *  Function?????????
 */


int main()
{
	int N, count=0, i, j, temp;
	cin >> N;
	int shuru[N], shuchu[N];
	for (i=0;i<N;i++){
		cin >> shuru[i];
		if (shuru[i]%2==1){
			shuchu[count]=shuru[i];
			count++;
		}
	}
	for (i=0;i<count-1;i++){
		for (j=0;j<count-1-i;j++){
			if (shuchu[j]>shuchu[j+1]){
				temp=shuchu[j];
				shuchu[j]=shuchu[j+1];
				shuchu[j+1]=temp;
			}
		}
	}
	for (i=0;i<count;i++){
		if (i!=0)
			cout << ',';
		cout << shuchu[i];
	}
}
int main()
{
	int i,j=0,flag=0,n,temp,a[500],b;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{scanf("%d",&b);
	if(b%2)
	{a[j]=b;
	flag++;
	j++;
	}
	}
	for (j=0;j<flag;j++)
	{   b=a[j];
		for(i=j;i<flag;i++)
			if(a[i]<a[j])
			{temp=a[i];
		     a[i]=a[j];
			 a[j]=temp;}
	}
	for(i=0;i<flag-1;i++)
		printf("%d,",a[i]);
printf("%d",a[flag-1]);
	return 0;
}
int main(){
	int n;
	scanf("%d",&n);
	int sz[LEN];
	for(int t=0;t<n;t++){
		scanf("%d",&sz[t]);
	}
	for(int m=0;m<n;m++){
		int e;
		for(int i=0;i<n-m;i++){
            if(sz[i]>sz[i+1]){
				e=sz[i+1];
				sz[i+1]=sz[i];
				sz[i]=e;
			}
		}
	}
	int xsz[LEN];
	int p=0;
	for(int q=0;q<n;q++){
		int s;
		s=(sz[q])%2;
		if(s==1){
            xsz[p]=sz[q];
			p++;
		}
	}
	for(int r=0;r<p-1;r++){
		printf("%d,",xsz[r]);
	}
	printf("%d",xsz[p-1]);
	return 0;
}
int main(){
	int n,i,m,k,c;
	m=0;
	int sz[LEN],p[LEN];
	scanf("%d",&n);
	for(i=0; i<n; i++){
		scanf("%d",&sz[i]);
	}
    m=0;
	for(i=0; i<n; i++){
		if(sz[i]%2!=0){
		p[m]=sz[i];
		m++;
		}
	}
	c=m;
    int maxIndex, e;
    for(k=1;k<=c; k++){
	maxIndex=0;
	for(m=0; m<=c-k; m++){
			if(p[m]> p[maxIndex]){
					maxIndex=m;
			}
	}	
	if(maxIndex != c-k){
		e = p[maxIndex];
		p[maxIndex] = p[c-k];
		p[c-k]=e;
	}
}

    for(m=0; m<c-1; m++){
		printf("%d,",p[m]);
	}
   printf("%d",p[m]);
    return 0;
}
int main()
{
	int a[1000],b[1000],n,i,q=0,k,e;
	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[i]=a[i];
			q++;
		}
		else
		{
			b[i]=0;
		}
	}
	for(k=1;k<=n;k++)
	{
		for(i=0;i<n-k;i++)
		{
			if(b[i]>b[i+1])
			{
				e=b[i];
				b[i]=b[i+1];
				b[i+1]=e;
			}
		}
	}
	for(i=n-q;i<n;i++)
	{
		if(i<n-1)
		{
		printf("%d,",b[i]);
		}
		else if(i==n-1)
		{
			printf("%d",b[i]);
		}
	}
	return 0;
}
int main()
{
	int N,num,b[500],i,j=0,count=0,temp=0;//num?????N???b[100]???????count??????
	cin>>N;
	for(i=0;i<N;i++)
	{
		cin>>num;
		if(num%2!=0)
		{
			b[j]=num;
			j++;
			count++;
		}
	}//???????????????
    for(j=0;j<count-1;j++)
	{
		for(i=0;i<count-j-1;i++)
		{
			if(b[i]>b[i+1])
			{
				temp=b[i];
				b[i]=b[i+1];
				b[i+1]=temp;
			}
		}//????
	}
	for(i=0;i<count-1;i++)
	{
		cout<<b[i]<<",";
	}
	cout<<b[count-1];
	return 0;
}
int main(){
    int N;
    scanf("%d\n",&N);
    int A[N],t=0;
    for(int a=0;a<N;a++){
        scanf("%d",&A[a]);
    }                        //???????
    for(int b=0;b<N;b++){
        if(A[b]%2!=0){
            t++;
        }
    }                         //???????????t
    int B[t];
    int d=0;
    for(int c=0;c<N;c++){
        if(A[c]%2!=0){
           B[d]=A[c];
           d++;
        }
    }               //???A?????????????B
    int i,j,k;
    for(i=0;i<t;i++){
        for(j=t-1;j>i;j--){
            if(B[j]<B[j-1]){
                k=B[j];
                B[j]=B[j-1];
                B[j-1]=k;        //????
            }
        }
    }
    int e=0;
    for(;e<t-1;e++)
       printf("%d,",B[e]);//???????
    printf("%d",B[e]);
    return 0;
}
int main()
{
	int a[500],j[500],i,n,m=0,y,h,q=0,k;
	scanf("%d",&n);
		for(i=0;i<n;i++)
		{
			scanf("%d",&(a[i]));
		}

		for(i=0;i<n;i++)
		{
			if(a[i]%2==1)
			{
				q=q+1;
				j[m]=a[i];
			m++;
			}
			else {continue;}
}
for(m=0;m<q-1;m++)
{
y=m;
for(k=m;k<q;k++)
{
	if(j[k]<j[y])
		y=k;
}
h=j[m];
j[m]=j[y];
j[y]=h;
}
for(m=0;m<q-1;m++)
{
printf("%d,",j[m]);
}
printf("%d",j[q-1]);
return 0;
}
int main()
{
	int N,i,j,k,m,g,f,n=0,h=0;
	int a[500];
	scanf("%d",&N);
	for(i=0;i<N;i++){
		scanf("%d",&a[i]);
	}
	for(k=1;k<N;k++){
		for(j=0;j<=N-k;j++){
			if(a[j+1]<a[j]){
				m=a[j+1];
				a[j+1]=a[j];
				a[j]=m;
			}
		}
	}
	for(g=0;g<N;g++){
		if(a[g]%2!=0){
			n++;
		}
	}
	for(f=0;f<N;f++){
		if(a[f]%2!=0){
			h++;
			if(h<n){
				printf("%d,",a[f]);
			}
			if(h==n){
				printf("%d",a[f]);
			}
		}
	}
	return 0;
}
int main(){
     int n,a;
	 scanf("%d",&n);
	 int sz[N];
	 for(int k=0;k<n;k++){
		 scanf("%d",&sz[k]);
	 }
	 for(int j=1;j<n;j++){
	      for(int i=0;i<n-j;i++){
		       if(sz[i]>sz[i+1]){
			    a=sz[i+1];
			    sz[i+1]=sz[i];
			    sz[i]=a;
			   }
		  }
	 }
	 for(int e=0;e<n;e++){
		 if(sz[e]%2!=0){
			 if(e==n-1||e==n-2){
				 printf("%d",sz[e]);
			 }else{
               printf("%d,",sz[e]);
		 }
	 }
	 }
	 return 0;
}
int main(){
	int n,i,j,a[1000],t,b[1000]={0},h=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
		if(a[i]%2==1){
          b[h]=a[i];
		  h++;
		}
	}
	for(i=1;i<=h;i++){
		for(j=0;j<h-i;j++){
			if(b[j]>b[j+1]){
				t=b[j];
				b[j]=b[j+1];
				b[j+1]=t;
			}
		}
	}
	for(i=0;i<h;i++){
		if(i==0){
			printf("%d",b[i]);
		}else{
			printf(",%d",b[i]);
		}
	}
	return 0;
}
int main() {
	int N,i,m=0,n=0,flag=0;
	int s[501],p[501];//?????
	cin>>N;

	for(i=0;i<N;i++)
	{
	    cin>>s[i];
        if(s[i]%2!=0) p[n++]=s[i];//?s[501]???????????p[501]?
	}
	for(int j=n-1;j>0;j--)
        {
            for(int l=0;l<j;l++)
            {
                if(p[l]>p[l+1])
                {
                    m=p[l];
                    p[l]=p[l+1];
                    p[l+1]=m;//?p??n???????????????
                }
            }
        }//?n-1????
      for (i=0;i<=n-1;i++)
      {if(i<n-1)
          cout<<p[i]<<",";
          else cout<<p[i];
      }
	return 0;
}
int main(int argc, char *argv[])
{
  int number[500],odd[500],n,i,j,t;
  scanf("%d",&n);
  for (i=0;i<=499;i++)
      odd[i]=0;
  for (i=0;i<=n-1;i++)
  {
      scanf("%d",number+i);
      if (number[i]%2!=0)
         odd[i]=number[i];
  }
  for (i=0;i<=499;i++)
  {
      for (j=i+1;j<=499;j++)
      {
          if (odd[i]>odd[j])
          {t=odd[i];odd[i]=odd[j];odd[j]=t;}
      }
  }
  for (i=1;i<=498;i++)
  {
      if (odd[i]!=0)
      printf("%d,",odd[i]);
  }
  printf("%d",odd[499]);
  return 0;
}
int main(){
 int N,i=0,k=0,j=0;
 scanf("%d",&N);
 int s[N];
 while(i<N){
  scanf("%d",&s[i]);
  i=i+1;
  }
 i=0;
 while(i<N){
  if(s[i]%2==1){
   k=k+1;
   }
  i=i+1;
  }
 i=0;
 int m[k];
 while(i<N){
  if(s[i]%2==1){
   m[j]=s[i];
   j=j+1;
   }
  i=i+1;
  }
 j=0;
 i=0;
 int zhan;
 while(i<k){
  while(j<k-1){
   if(m[j]<m[j+1]){
       zhan=m[j];
       m[j]=m[j+1];
       m[j+1]=zhan;
    }
   j=j+1;
  }
 j=0; 
 i=i+1;
 }
 j=k-2;
 printf("%d",m[k-1]);
 while(j!=-1){
  printf(",%d",m[j]);
  j=j-1;
 }
 return 0;
 }
/*
 * T1.cpp
 *
 *  Created on: 2012-11-4
 *      Author: ??
 *      Function: ??????
 */

int main()
{
	int n,a[510],i,temp;
	cin >>n;
	for (i = 0;i < n;i ++)     //?????
		cin >>a[i];
	for (i = 0;i < n;i ++)    //???????????0
	{
		if (a[i] % 2 == 0)a[i] = 0;
	}
	for (i = 0;i < n-1;i ++)    //????????????????0????????
		for (int j = i+1;j < n;j ++)
		{
			if (a[j] < a[i]){temp = a[i];a[i] = a[j];a[j] = temp;}
		}
	for (i = 0;i < n;i ++)    //????
	{while (a[i] != 0)
	  {
		if (i == n-1)
			{cout <<a[n-1] <<endl;break;}
		else
			{cout <<a[i] <<",";break;}
	  }
	}
	return 0;
}
int main()
{
	int n,a[510],b[510],m=0,t=0,num=0;
	cin>>n;
	for(int i=0;i<n;i++)
			{cin>>a[i];
			b[i]=0;
			}
for(int ii=0;ii<n;ii++)
	{if(a[ii]%2==1)
		{b[m]=a[ii];
	num++;}
	if(a[ii]%2==0)
	b[ii]=100000000;
m++;}
for(int ii=0;ii<n-1;ii++)
		for(int j=0;j<n-1-ii;j++)
			if(b[j+1]<b[j])
				{t=b[j];
				b[j]=b[j+1];
				b[j+1]=t;
				}
cout<<b[0];
for(int ai=1;ai<num;ai++)
{
	cout<<","<<b[ai];
}
	return 0;
}
const int MAXN = 600;

int main()
{
    int n; scanf("%d", &n);
    int num[MAXN], temp;
    int i, j, index = 0;
    for (i = 0; i < n; ++ i)
    {
        scanf("%d", &temp);
        if (temp % 2 == 1)
           num[index ++] = temp;
    }
    for (i = 0; i < index; ++ i)
        for (j = index - 1; j > 0; -- j)
            if (num[j] < num[j - 1])
               {
                        temp = num[j - 1];
                        num[j - 1] = num[j];
                        num[j] = temp;
               }
    printf("%d", num[0]);
    for (i = 1; i < index; ++ i)
        printf(",%d", num[i]);
}
/*
 * oddup.cpp
 *
 *  Created on: 2013-10-31
 *      Author: ??
 */
int main(){
	int n,t;cin>>n;int a[n];
	for(int i=0;i<n;i++){
		cin>>a[i];
		if(a[i]%2==0)a[i]=-1;
	}
	for(int jj=1;jj<n;jj++){
       for(int ii=0;ii<n-jj;ii++){
    	   if(a[ii]<0)continue;
    	   if(a[ii+1]<a[ii]){
    		   t=a[ii];a[ii]=a[ii+1];a[ii+1]=t;
    	   }
       }
	}
	int num=1;
	for(int iii=0;iii<n;iii++){
		if(a[iii]<0)continue;
		if(num==1){cout<<a[iii];num++;}
		else cout<<","<<a[iii];
	}
	return 0;
}
int main()
{
	int N,e,i,k,a[500],flag=0;
	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];
			a[i]=a[i+1];
			a[i+1]=e;
			}
		}
	}


	for(i=0;i<=N-1;i++){
		if((a[i]+2)%2!=0){
			if(flag==0)
			{
				printf("%d",a[i]);
				flag=1;
			}
			else
			{
				printf(",%d",a[i]);
			}
		}
	}
	return 0;
}
int main(){
int n,i,j,e,k,h,m=0;
int sz[501],b[501];
scanf("%d",&n);
for(i=0;i<n;i++){
	scanf("%d",&(sz[i]));
	if(sz[i]%2!=0){
     b[m]=sz[i];
	 m++;}
}
for(k=1;k<=m;k++){
	for(j=0;j<k;j++){
		if(b[j]>=b[k]){
			e=b[j];
			b[j]=b[k];
			b[k]=e;}}}
for(h=1;h<=m-1;h++){
	printf("%d,",b[h]);
}
printf("%d",b[m]);
return 0;
}
void bubble_sort(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 Num,i,N=0,j=0;
 scanf("%d",&Num);
 int a[Num];
 for(i=0;i<Num;i++){
  scanf("%d",&(a[i]));
  if(a[i]%2==1){
   N++;
  }
 }
 int b[N];
 for(i=0;i<Num;i++){
  if(a[i]%2==1){
   b[j]=a[i];
   j++;
  }
 }
 bubble_sort(b,N);
 for(j=0;j<N-1;j++){
  printf("%d,",b[j]);
 }
 j=N-1;
 printf("%d",b[j]);
 return 0;
}
int main()
{
    int N,i,j,t=0;
    scanf("%d",&N);
    int a[500],c[500]={0},m=0;
    for(i=0;i<N;i++)
    {
                    scanf("%d",&a[i]);
                    if(a[i]%2!=0)
                    {
                                 c[m]=a[i];
                                 m++;
                    }
    }
    for(i=0;i<m-1;i++)
    {
                      for(j=0;j<m-1-i;j++)
                      {
                                          if(c[j]>c[j+1])
                                          {
                                                         t=c[j];
                                                         c[j]=c[j+1];
                                                         c[j+1]=t;
                                          }
                      }
    }
    printf("%d",c[0]);
    for(i=1;i<m;i++)
    printf(",%d",c[i]);
    return 0;
}
int main(){
	int N;
	int e,i;
	int m=0;
	scanf("%d",&N);
	int sz[1000];
	for(i=0;i<N;i++){
		scanf("%d",&sz[i]);
	}
	for(int k=N-1;k>0;k--){
		for(i=0;i<k;i++){
			if(sz[i]>sz[i+1]){
				e=sz[i];
				sz[i]=sz[i+1];
				sz[i+1]=e;
			}
		}
	}
	for(i=0;i<N;i++){
		if(sz[i]%2!=0){
			m=i;
		}
	}
	for(i=0;i<=m;i++){
		if(sz[i]%2!=0&&i<m){
			printf("%d,",sz[i]);
		}
		if(i==m){
			printf("%d",sz[m]);
		}
	}
	
	
		

	return 0;
}
int main(){
  int n,i,x,l;
  int j=0;
  int num=0;
  int a[501];
  int b[501];
  scanf("%d",&n);
  for(i=0;i<n;i++)
  {
	  scanf("%d",&(a[i]));
	  
	  if((a[i])%2!=0){
		  b[j]=a[i];
		  j++;
		  num++;
	  }
  }
  for(l=num-1;l>=0;l--){
	  for(j=0;j<num;j++){
		  if(b[j]>b[j+1]){
			  x=b[j+1];
			  b[j+1]=b[j];
			  b[j]=x;

		  }

	  }
  }
  for(j=1;j<num;j++){
	  
	  printf("%d,",b[j]);
	  
		  
	  }
  printf("%d",b[num]);
  
  return 0;
}
/*
 * jishu.cpp
 *
 *  Created on: 2012-11-3
 *      Author: ???
 */

int main() {
	int n = 0;   //??????
	cin >> n;   //??
	int a[n], b[n];  //????
	int i = 0, j = 0, sum = 0;
	for (i = 0; i < n; i++) { //???
		b[i] = 0;
		cin >> a[i];
	}
	for (i = 0; i < n; i++) {    //???????????b?
		if (a[i] % 2 == 1) {
			b[j] = a[i];
			j++;
			sum++;
		}
	}
	sort(b, b + sum);  //??
	cout << b[0];
	for (i = 1; i < sum; i++)
		cout << "," << b[i];    //??
	return 0;
}
void bubble(int a[],int len)
{
	int i, j, temp;
	for(j=1; j<len; j++)
	{
		for(i=0; i<len-j; i++)
		{
			if(a[i]>a[i+1])
			{
				temp=a[i];
				a[i]=a[i+1];
				a[i+1]=temp;
			}
		}
	}
}
void main()
{
	int *pi, n, *pj, a[500], b[500]={0};
	scanf("%d",&n);
	for(pi=a; pi<(a+n); pi++)
		scanf("%d",pi);
	for(pi=a, pj=b; pi<(a+n); pi++)
	{
		if((*pi)%2==1)
		{
			*pj=*pi;
			pj++;
		}
	}
	bubble(b,pj-b);
	printf("%d",*b);
	for(pi=b+1; pi<pj; pi++)
		printf(",%d",*pi);
}
int main()
{
	int N,s=0,p;//????
	int a[500],b[500];
	cin>>N;//?????????
	for(int i=0;i<N;i++)
	{
		cin>>a[i];
	}
	for(int j=0;j<N;j++)
	{
		if(a[j]%2!=0)
		{
			b[s]=a[j];
			s++;//13120005218zhy.zbklqx@gmail.com
		}
	}
	for(int m=0;m<s;m++)
	{
		for(int n=0;n<s-1-m;n++)
		{
			if (b[n]>b[n+1])
			{
				p=b[n+1];
			b[n+1]=b[n];
			b[n]=p;
			}
		}
	}
	for(int l=0;l<s;l++)
	{
		if(l==0)cout<<b[0];
		else cout<<","<<b[l];
	}
	return 0;
}
int main(){
	int n,a[10000],b[10000],num=0,i,k=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[k]=a[i];
			num++;
			k++;
		}
	}
	for(int p=1;p<=num;p++){
		int min,e;
		min=0;
		for(k=0;k<=num-p;k++){
			if(b[min]>b[k]){
				min=k;
			}
		}
		if(min!=num-p){
			e=b[min];
			b[min]=b[num-p];
			b[num-p]=e;
		}
		if(p!=num){
			printf("%d,",b[num-p]);
		}
		if(p==num){
			printf("%d",b[num-p]);
		}
	}
	return 0;
}
int main ()
{int k,N;
int sz[500],js[100];
int i,sum=0,e,m;
scanf("%d",&N);
for(k=0;k<N;k++)
                {scanf("%d",&m);
	if(m%2!=0)
    {    sz[sum]=m;
    sum++;
    }
    }
for(k=1; k<=sum; k++)
         {for(i=0;i<sum-k;i++)
         {if(sz[i]>sz[i+1])
         {e=sz[i+1];
		 sz[i+1]=sz[i];
		 sz[i]=e;
			}
	}
}
for(i=0;i<sum;i++)
                  {printf("%d",sz[i]);
                  if(i!=sum-1)
                  {printf(",");
                  }
                       }

return 0;
}
int main(){
	int a[500],b[500],n,i,m,zonghe=0,e;
	char x;
	x=',';
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
	for(i=0;i<n;i++){
		if(a[i]%2!=0){
			zonghe++;
		}else{
			a[i]=0;
		}
	}
	for(m=0;m<n;m++){
		for(i=0;i<n;i++){
			if(a[i]!=0){
				b[m]=a[i];
				a[i]=0;
				break;
			}
		}
	}
	for(m=0;m<zonghe;m++){
		for(i=0;i<zonghe-1;i++){
			if(b[i]>b[i+1]){
				e=b[i+1];
				b[i+1]=b[i];
				b[i]=e;
			}
		}
	}
	for(m=0;m<zonghe-1;m++){
		printf("%d%c",b[m],x);
	}
	if(m==zonghe-1){
		printf("%d",b[m]);
	}
return 0;
}
int t[10001];
int comp ( const void *a, const void *b )
{
    return * ( int * ) a - * ( int * ) b;
}
int main()
{

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

    scanf("%d",&t[i]);
    qsort(t,n,sizeof(int),comp);
    for(i=0;t[i]%2;i++)
    printf("%d",t[i]);
    for(;i<n;i++)
    if(t[i]%2)
    printf(",%d",t[i]);
    return 0;
}
int main()
{
	int sz[500],n,a,i;
	scanf("%d",&n);
    for(int i=0;i<n;i++)
		scanf("%d",&sz[i]);
	for(i=0;i<n;i++){
		if(sz[i]%2==0)
			sz[i]=0;
		else 
			sz[i]=sz[i];
	
	}
	for(int k=1;k<n;k++){
        for(i=0;i<n-k;i++){
            if(sz[i]>=sz[i+1]){
                a=sz[i];
			    sz[i]=sz[i+1];
			    sz[i+1]=a;
			}
		}
	}
 

    for(i=0;i<n;i++){
		if(sz[i]!=0)
		{	printf("%d",sz[i]);
			break;
        }	
	}
	for(int j=i+1;j<n;j++){
		if(sz[j]!=0)
			printf(",%d",sz[j]);
    }
return 0;
}
void main()
{
	int a[500],b,i,j,n,c=0;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
	scanf("%d",&a[i]);
	}
	for(j=0;j<n-1;j++)
	{
		for(i=0;i<n-1-j;i++)
		{
			if(a[i]>a[i+1])
			{	b=a[i];
			a[i]=a[i+1];
			a[i+1]=b;}
		}
	}
	for(i=0;i<n;i++)
	{
		if((a[i]%2)!=0)
		{

			if(c!=0)
			printf(",%d",a[i]);
		
		else
			printf("%d",a[i]);
		c++;
		}

	}

}
int main ()
{
	int k,i,num[500],s=0,num1[500],j,ex,t;
	scanf("%d",&k);
	for(i=0;i<k;i++)
		scanf("%d",&num[i]);
	for(i=0;i<k;i++)
	{
		if(num[i]%2==1)
		{
			num1[s]=num[i];
			s++;
		}
	}
	for(i=1;i<s;i++)
		for(j=0;j<s-i;j++)
		{
			if(num1[j]>num1[j+1])
			{
				ex=num1[j];
				num1[j]=num1[j+1];
				num1[j+1]=ex;
			}
		}
	for(t=0;t<s;t++)
	{
		if(t!=0)
			printf(",");
		printf("%d",num1[t]);
	}
	return 0;
}
int main(){
	int an[500];
	int n,i,max=1,point=1;
	char x;
	x=',';
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&an[i]);
	for(i=0;i<n;i++){
		if(an[i]>max&&an[i]%2==1)
			max=an[i];
	}
	while(point<=max-2){
		for(i=0;i<n;i++){
			if(an[i]==point){
				printf("%d%c",an[i],x);
				break;
			}
		}
		point+=2;
	}
	for(i=0;i<n;i++){
		if(an[i]==point){
			printf("%d",an[i]);
			break;
		}
	}
	return 0;
}
int main()
{
int n,i,j,flag;
flag=0;
int a[10000];
int b[10000]={0};
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d",&a[i]);
if(a[i]%2==1)
b[a[i]]=1;
}
for(i=1;i<10000;i++)
{
if(b[i])
{
 if(flag)
{
printf(",%d",i);
}
else
{
printf("%d",i);
flag=1;
}
}
}
}
void bubble(int a[],int len)
{
	int i, j, temp;
	for(j=1; j<len; j++)
	{
		for(i=0; i<len-j; i++)
		{
			if(a[i]>a[i+1])
			{
				temp=a[i];
				a[i]=a[i+1];
				a[i+1]=temp;
			}
		}
	}
}
void main()
{
	int i, n, j, a[500], b[500]={0};
	scanf("%d",&n);
	for(i=0; i<n; i++)
		scanf("%d",&a[i]);
	for(i=0, j=0; i<n; i++)
	{
		if(a[i]%2==1)
		{
			b[j]=a[i];
			j++;
		}
	}
	bubble(b,j);
	printf("%d",b[0]);
	for(i=1; i<j; i++)
		printf(",%d",b[i]);
}
int main()
{
	int N,a[1000];
	cin>>N;
	int p=0;
	for (int i=0;i<N;i++) cin>>a[i];
	sort (a,a+N);
	for (int i=0;i<N;i++) 
		if ((a[i]%2)==1) {
			if (p==0) {
				cout<<a[i];p=1;
			}else cout<<","<<a[i];
		}
return 0;
}
int main(){
	int n,e,m;
	int i=0,j=0,k=0;
	int sz[500];
	int js[500];
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&sz[i]);
	for(i=0;i<n;i++){
		if(sz[i]%2!=0){
				js[j]=sz[i];
				j++;
		}
	}
	for(m=1;m<j;m++){
		k=0;
		for(i=1;i<=j-m;i++)
			if(js[i]>js[k])
				k=i;
			if(k!=j-m){
				e=js[k];
				js[k]=js[j-m];
				js[j-m]=e;
			}
		}
			for(i=0;i<j-1;i++)
				printf("%d,",js[i]);
			printf("%d",js[j-1]);
			return 0;
}
int main()
{   
	int e,k,i,n,m=1;
	int sz[500];
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%d",&sz[i]);
	}

	for(k=1;k<n+1;k++)
	{
		for(i=0;i<n-k;i++)
		{
			if(sz[i]>sz[i+1])
			{
				e=sz[i+1];
				sz[i+1]=sz[i];
				sz[i]=e;
			}
		}
	}
	for(i=0;i<n;i++)
	{
		if(sz[i]%2==1){
			if(m==1){
		    printf("%d",sz[i]);
			}else{
				printf(",%d",sz[i]);}
		m=m+1;
		}
	}
	return 0;
}
/*
 *???: increasing_odds.cpp
 *??: ???
 *????: 2012-11-05
 *??: ?????????????????
 */



int main()
{
	int a[MAXN+10];
	int n,nOdds=0;

	cin >> n;
	for (int i=0;i<n;i++)
		cin >> a[i];
	for (int i=0;i<n;i++){
		if (a[i]&1) //??a[i]???
			a[nOdds++]=a[i]; //?????1
	}
	for (int i=0;i<nOdds;i++){ //?????
		for (int j=0;j<nOdds-i-1;j++){
			if (a[j]>a[j+1]){
				int tmp=a[j];
				a[j]=a[j+1];
				a[j+1]=tmp;
			}
		}
	}
	for (int i=0;i<nOdds;i++){
		cout << a[i];
		if (i!=nOdds-1)
			cout << ',';
		else
			cout << endl;
	}
	return 0;
}
/*
 * 1000010175_fe1.cpp
 *
 *  Created on: 2010-12-24
 *      Author: ???
 *      function:??????
 */



int main(){
	int n, num[500],odd[500],oddnum=0,i,j,k=0,temp;   //num??????,odd???????,oddnum???????
	cin>>n;
	for(i=0;i<n;i++)    //??????????
	{
		cin>>num[i];
		if(num[i]%2==1)
		{
			odd[oddnum]=num[i];
			oddnum++;
		}
	}
	for(i=0;i<oddnum;i++)   //???????
		for(j=0;j<oddnum-i-1;j++)
			if(odd[j]>odd[j+1])
			{
				temp=odd[j];
				odd[j]=odd[j+1];
				odd[j+1]=temp;
			}
	for(i=0;i<oddnum;i++)    //??
		cout<<(k++?",":"")<<odd[i];
	cout<<endl;
	return 0;
}
int main()
{
	int N,i,j,a[500]={0},b[500]={0},t=0,r=0,tem;
	scanf("%d",&N);
	for(i=0;i<N;i++)
	{
		scanf("%d",&a[i]);
		if(a[i]%2!=0)
		{
			b[t]=a[i];
			t++;
		}
	}
	for(i=0;i<t-1;i++)
		for(j=0;j<t-1-i;j++)
		{
			if(b[j]>b[j+1])
			{
				tem=b[j];
				b[j]=b[j+1];
				b[j+1]=tem;
			}
		}
		for(i=0;i<t;i++)
		{
			if(r==0)
				printf("%d",b[i]);
			else
				printf(",%d",b[i]);
			r++;
		}




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