semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
int main(){
	int n,a,b,c;
	scanf("%d",&n);
	a=n%3;
	b=n%5;
	c=n%7;
	if(a==0&&b==0&&c==0){
		printf("3 5 7");
	}else if(a==0&&b==0){
		printf("3 5");
	}else if(a==0&&c==0){
		printf("3 7");
	}else if(b==0&&c==0){
		printf("5 7");
	}else if(a==0){
		printf("3");
	}else if(b==0){
		printf("5");
	}else if(c==0){
		printf("7");
	}else{
		printf("n");
	}
	return 0;
}
int main()
{
	int n,n0,flag=0;
	cin >> n;
	n0=n;
	if(n%3==0){n/=3;cout<<"3";flag=1;}
	if(n%5==0){
	if(n!=n0)cout<<" ";n/=5;
	cout<<5;flag=1;}
	if(n%7==0)
	{
	if(n!=n0)cout<<" ";n/=7;
	cout<<7;flag=1;}
	if(flag==0)cout<<'n';
	cout<<endl;
	return 0;
}
main()
{
	int n,a[8]={0},i,j,k;
 scanf("%d",&n);
 j=0;
 if (n%3==0) {a[3]=1;j++;}
 if (n%5==0) {a[5]=1;j++;}
 if (n%7==0) {a[7]=1;j++;}
 k=j;
 for (i=1;i<=7;i++)
 {   
	 if (j==1) break;
	 if (a[i]==1) {printf("%d ",i);j--;}
 }
 if (k!=0) 
 {
  for (j=i;j<=7;j++)
	if (a[j]==1) printf("%d\n",j);
 }
 else printf("n\n");
 return 0;
}
int main(){

  int x,i;
  char n;

  scanf("%d",&x);
  if(x%3==0&&x%5==0&&x%7==0){
    
    printf("3 5 7");

  }

  else if(x%3==0&&x%5==0){printf("3 5");}
  else if(x%5==0&&x%7==0){printf("5 7");}
  else if(x%3==0&&x%7==0){printf("3 7");}
  else if(x%3==0){printf("3");}
  else if(x%5==0){printf("5");}
  else if(x%7==0){printf("7");}

 if(x%3!=0&&x%5!=0&&x%7!=0){printf("n");}


  return 0;
}
int main(int argc, char* argv[])
{
    int d,m=0;
	scanf("%d",&d);
    if(d%3==0){
	printf("3");
	m++;}
if(d%5==0){
	if(m==1) printf(" ");
	printf("5");
	m++;}
if(d%7==0){
    if(m!=0) printf(" ");
	printf("7");
	m++;}
if(m==0){
  printf("n");
}
	return 0;
}
int main() 
{
    int n, count = 0;
    cin >> n;
    if (n % 3 == 0)
    count++;
    if (n % 5 == 0)
    count ++;
    if (n % 7 == 0)
    count ++;
    switch (count)
    {
           case 0:
                cout << 'n';
                break;
           case 1:
                {
				if (n % 3 == 0)
                cout << 3;
                if (n % 5 == 0)
                cout << 5;
                if (n % 7 == 0)
                cout << 7;
                break;
                }
           case 2:
                {
				if (n % 3 !=0)
                cout << 5 << ' ' << 7;
                if (n % 5 !=0)
                cout << 3 << ' ' << 7;
                if (n % 7 !=0)
                cout << 3 << ' ' << 5;
                break;
                }
           case 3:
                cout << 3 << ' ' << 5 << ' ' << 7; 
                break;
    }
    return 0;
}
int main()
{
	int a;
	scanf("%d",&a);
	if(a%3==0)
	{
		if(a%5==0)
		{
			if(a%7==0)
			{
				printf("3 5 7");
			}
			else
			{
				printf("3 5");
			}
		}
		else
		{
			if(a%7==0)
			{
				printf("3 7");
			}
			else
			{
				printf("3");
			}
		}
	}
	else
	{
		if(a%5==0)
		{
			if(a%7==0)
			{
				printf("5 7");
			}
			else
			{
				printf("5");
			}
		}
		else if(a%7==0)
		{
			printf("7");
		}
		else
		{
			printf("n");
		}
	}
	return 0;
}
int main(){

    int a;

    scanf ("%d", &a);

    if ( a % (3*5*7) == 0 ){
         printf ("3 5 7\n");
         return 0;
    }

    if ( a % ( 3*5) == 0) {
        printf ("3 5\n");
        return 0;
    }

    if ( a % ( 3*7) == 0) {
        printf ("3 7\n");
        return 0;
    }
    if ( a % ( 5*7) == 0) {
        printf ("5 7\n");
        return 0;
    }
    if ( a % ( 3) == 0) {
        printf ("3\n");
        return 0;
    }
    if ( a % ( 5) == 0) {
        printf ("5\n");
        return 0;
    }
    if ( a % ( 7) == 0) {
        printf ("7\n");
        return 0;
    }

    printf ("n\n");

    return 0;
}
int main ()
{
	int a,i=0,m=0;
	cin>>a;
	if (a%3==0)
	{
		cout<<"3";
	i++;
	m++;}
	if (a%5==0)
	{
		if (i!=0)
	{cout<<" 5";}
	else
	{cout<<"5";}
	i++; 
		m++;}
	if (a%7==0)
	{
		if (i!=0)
	{cout<<" 7";}
	else
	{cout<<"7";}
	m++;}
	if (m==0)
		cout<<"n";
	return 0;
}
int main()
{
	int n,a,b,c;
	scanf("%d",&n);
	a=n%3;
	b=n%5;
	c=n%7;
	if((a==0)&&(b==0)&&(c==0))
		printf("3 5 7");
	else;
	if((a==0)&&(b==0)&&(c!=0))
		printf("3 5");
	else;
	if((a==0)&&(c==0)&&(b!=0))
		printf("3 7");
	else;
	if((c==0)&&(b==0)&&(a!=0))
		printf("5 7");
	else;
	if((c==0)&&(b!=0)&&(a!=0))
		printf("7");
	else;
	if((c!=0)&&(b==0)&&(a!=0))
		printf("5");
	else;
	if((c!=0)&&(b!=0)&&(a==0))
		printf("3");
	else;
	if((c!=0)&&(b!=0)&&(a!=0))
		printf("n");
	else;
	return 0;
}
//********************************
//*?????3?5?7????.cpp   **
//*?????? 1200012768 **
//*???2012.10.5  **
//********************************
int main()                //??? 
{
     int num = 0, a = 0, b = 0, c = 0;//??int?? 
     cin >> num;                     //?????? 
     a = num % 3, b = num % 5, c = num % 7 ;//???3?5?7?? 
     if ( a == 0 && b == 0 && c == 0 )      //????3?5?7?? 
         cout << 3 << " " << 5 << " " << 7 << endl; 
     else if ( a == 0 && b == 0 && c != 0 ) //????3?5??
         cout << 3 << " " << 5 << endl;
     else if ( a == 0 && b != 0 && c == 0 ) //????3?5?7??
         cout << 3 << " " << 7 <<endl;
     else if ( a == 0 && b != 0 && c != 0 ) //????3??
         cout << 3 <<endl;
     else if ( a != 0 && b == 0 && c == 0 ) //????5?7??
         cout << 5 << " " << 7 <<endl;   
     else if ( a != 0 && b == 0 && c != 0 ) //????5??
         cout << 5 <<endl;
     else if ( a != 0 && b != 0 && c == 0 ) //????7??
         cout << 7 <<endl;
     else if ( a != 0 && b != 0 && c != 0 ) //?????3?5?7??
         cout << "n" <<endl;
     return 0;
}
//?????? 1300012809 **
//**************************
int main()                                    //???
{
   int  a ;
   cin >> a ;
   char g ;                                   //??????
	   g=' ';
   int x,y,z;
   if (a%3==0) { x=1;}
   if (a%5==0) { y=1;}
   if (a%7==0) { z=1;}
   {      if (x==1)                          //??????
           if (y==1)
			   if (z==1)  cout<< "3" << g << "5" << g << "7" << endl ;
               else cout<< "3" << g << "5" << endl ;
   }
   {	  if (x==1)
			   if (y!=1)
   			   if (z==1) cout<< "3" << g << "7" << endl ;
   }            
   {           if (x==1)
				   if (y!=1)
				    if (z!=1) cout<< "3" << endl; 
   }
   {  if (x!=1)
		 if (y==1)
            if (z==1) cout<< "5" << g << "7" << endl ;
	             else cout<< "5" << endl;        
}
{	if (x!=1)
		if (y!=1)
			if (z==1) cout<< "7" << endl;
} 
	if (x!=1)		
      if (y!=1)
		  if (z!=1) cout << "n" << endl ; 
 return 0;
}
void main()
{
	int a,x,y,z;
	scanf("%d",&a);
	x=a%3;
	y=a%5;
	z=a%7;
	if(x+y+z==0)
	printf("%d %d %d",3,5,7);
    else  if(z!=0 && x==0 && y==0) 	   
	  printf("%d %d",3,5) ; 
    else if(x!=0 && y==0 && z==0) 	   
	  printf("%d %d",5,7) ; 
    else if(y!=0 && x==0 && z==0) 	   
	  printf("%d %d",3,7) ; 
    else if(z!=0 && x!=0 && y!=0) 	   
	  printf("n") ;   
	else if(x==0 && z!=0 && y!=0) 	   
	  printf("%d",3 ) ;
    else  if(y==0 && z!=0 && x!=0) 	   
	  printf("%d", 5) ;
     else if(z==0 && x!=0 && y!=0) 	   
	 printf("%d",7) ;
}
/*??? 1200012866
2012.10.12
??3?5?7??*/
int main()
{
	int n,f=0;//f???????????
	cin>>n;
	if(n%105==0&&f==0){cout<<"3 5 7";f=1;}
	if(n%15==0&&f==0){cout<<"3 5";f=1;}
	if(n%21==0&&f==0){cout<<"3 7";f=1;}
	if(n%35==0&&f==0){cout<<"5 7";f=1;}
	if(n%3==0&&f==0){cout<<"3";f=1;}
	if(n%5==0&&f==0){cout<<"5";f=1;}
	if(n%7==0&&f==0){cout<<"7";f=1;}
	if(f==0)cout<<"n";//???????n

	return 0;
}
int main()
{
	int a;
	scanf("%d",&a);
	    if(a%105==0){
		printf("3 5 7");
		}	
		if(a%21==0&&a%5!=0){
			printf("3 7");
		}
		if(a%35==0&&a%3!=0){
			printf("5 7");
		}
		if(a%15==0&&a%7!=0){
			printf("3 5");
		}	
		if(a%3==0&&a%5!=0&&a%7!=0){
			printf("3");
		}
		if(a%5==0&&a%3!=0&&a%7!=0){
			printf("5");
		}
		if(a%7==0&&a%3!=0&&a%5!=0){
			printf("7");
		}
		if(a%7!=0&&a%3!=0&&a%5!=0){
			printf("n");
		}
	return 0;
}
void main()
{
	int a,b,c,i;
	scanf("%d",&a);
	b=1;
		if(a%3==0)
		{printf("3");b++;}
		if(a%5==0)
		{
			if(b==1)
			{printf("5");b++;}
			else
			printf(" 5");
		}
		if(a%7==0)
		{
			if(b==1)
			{printf("7");b++;}
			else
			printf(" 7");
		}
	if(b==1)
		printf("n");
}
int main()
{
    int number;
    cin>>number;
    if(number%3==0&&number%5==0&&number%7==0)
    cout<<"3 5 7"<<endl;
    if(number%3==0&&number%5==0&&number%7!=0)
    cout<<"3 5"<<endl;
    
    if(number%3==0&&number%5!=0&&number%7==0)
    cout<<"3 7"<<endl;
    
    if(number%3!=0&&number%5==0&&number%7==0)
    cout<<"5 7"<<endl;
    
    if(number%3==0&&number%5!=0&&number%7!=0)
    cout<<"3"<<endl;
    
    if(number%3!=0&&number%5==0&&number%7!=0)
    cout<<"5"<<endl;
    
    if(number%3!=0&&number%5!=0&&number%7==0)
    cout<<"7"<<endl;
    
    if(number%3!=0&&number%5!=0&&number%7!=0)
    cout<<"n"<<endl;
    cin.get();cin.get();cin.get();
    return 0;
    }
int main()
{
int i;
cin >> i;
if(!(i % 3) && !(i % 5) && !(i % 7))
        cout << "3 5 7" << endl;
		else if(!(i % 3) && !(i % 5))
            cout << "3 5" << endl;
			else if(!(i % 5) && !(i % 7))
          cout << "5 7" << endl;
		  else if(!(i % 3) && !(i % 7))
         cout << "3 7" << endl;
		 else if(!(i % 3))
        cout << "3" << endl;
		else if(!(i % 5))
      cout << "5" << endl;
	  else if(!(i % 7))
     cout << "7" << endl;
     else cout << "n";
     return 0;
}
void main()
{
	int n,i;
	scanf("%d",&n);
	i=0;
	if ((n%3)==0)
		if (i==0)
		{
			printf("3");
			i=1;
		}
		else
			printf(" 3");
			if ((n%5)==0)
		if (i==0)
		{
			printf("5");
			i=1;
		}
		else
			printf(" 5");
			if ((n%7)==0)
		if (i==0)
		{
			printf("7");
			i=1;
		}
		else
			printf(" 7");
		if (i==0)
			printf("n");
}
int main()
{
	int a;
	char b;
	b='n';
	scanf("%d",&a);
	if(a%3==0&&a%5==0&&a%7==0){
		printf("3 5 7");}
	else if(a%3==0&&a%5==0&&a%7!=0){
		printf("3 5\n");}
	else if(a%3==0&&a%5!=0&&a%7==0){
		printf("3 7\n");}
	else if(a%3!=0&&a%5==0&&a%7==0){
		printf("5 7\n");}
	else if(a%3==0&&a%5!=0&&a%7!=0){
		printf("3\n");}	
	else if(a%3!=0&&a%5!=0&&a%7==0){
		printf("7\n");}
	else if(a%3!=0&&a%5==0&&a%7!=0){
		printf("5\n");}
	else{
		printf("%c",b);}
	return 0;
}
void main()
{
	int m=0,n=0,p=0,a;
	scanf("%d",&a);
    if(a%3==0)m=3;
    if(a%5==0)n=5;
	if(a%7==0)p=7;
	if(m+n+p==15)printf("3 5 7");
	else if(m+n+p==8)printf("3 5");
	else if(m+n+p==10)printf("3 7");
	else if(m+n+p==12)printf("5 7");
	else if(m+n+p==3)printf("3");
	else if(m+n+p==5)printf("5");
	else if(m+n+p==7)printf("7");
	else if(m+n+p==0)printf("n"); 


}
//******************************************
// ??????3?5?7????             *
// ???1200012826 ??                   *
// ???2012?9?30?                     *
//******************************************
int main()                                 // ?????
{
	int N, x=3, y=5, z=7;                  // ????N?x=3?y=5?z=7
	char n='n';                            // ?????n
	cin>>N;                                // ??N
	if(N%3==0)                             // ??????
	{if(N%5==0&&N%7==0)
		{cout<<x<<' '<<y<<' '<<z<<endl;
		}                                  // N???3?5?7?????3 5 7 
	else if(N%5==0&&N%7!=0)
		{cout<<x<<' '<<y<<endl;
		}                                  // N??3?5?????3 5
	else if(N%5!=0&&N%7==0)
		{cout<<x<<' '<<z<<endl;
		}                                  // N??3?7?????3 7
	else
		{cout<<x<<endl;
		}                                  // N???3?????3
	}
	else if(N%5==0&&N%7==0)
		{cout<<y<<' '<<z<<endl;
		}                                  // N???5?7?????5 7                
	else if(N%5==0&&N%7!=0)
		{cout<<y<<endl;
		}                                  // N???5?????5
	else if(N%5!=0&&N%7==0)
		{cout<<z<<endl;
		}                                  // N???7?????7
	else
		{cout<<n<<endl;
		}                                  // N???3?5?7????????n
	return 0;
}
//********************************
//*?????3?5?7????.cpp   **
//*?????? 1200012768 **
//*???2012.10.5  **
//********************************
int main()                //??? 
{
     int num = 0, a = 0, b = 0, c = 0;//??int?? 
     cin >> num;                     //?????? 
     a = num % 3, b = num % 5, c = num % 7 ;//???3?5?7?? 
     if ( a == 0 )          
         cout << 3 ;    //????? 3????????????????5?7?? 
     if ( a == 0 && b == 0 )
         cout << " "<< 5 ;
     else if ( a != 0 && b == 0 )
         cout << 5 ;
     if ( ( a == 0 || b == 0 ) && c == 0 )
         cout << " " << 7 ;
     else if ( ( a != 0 && b != 0 ) && c == 0 )
         cout << 7 ;
     if ( ( a != 0 && b != 0 ) && c != 0 )
         cout << "n";
     cout << endl;
     return 0;
}
int main()
{
	int a,b,c,d;

	scanf("%d",&a);
	b=a%3;

	c=a%5;

	d=a%7;
	if(b==0&&c==0&&d==0)
	{
		printf("%d%2d%2d",3,5,7);
	}
	else {if(b==0&&c==0)
	{
		printf("3 5");
	}
	else {if(b==0&&d==0)
	{
		printf("3 7");
	}
	else {if(c==0&&d==0)
	{
		printf("5 7");
	}
	else {if(b==0)
	{
		printf("3");
	}
	else {if(c==0)
	{
		printf("5");
	}
	else {if(d==0)
	{
		printf("7");
	}
	else {
		printf("n");
	}
	}
	}
	}
	}
	}
	}
	return 0;
}
int main(){
int n, m, i, j;
scanf ("%d", &n);
int x[n], y[n];
m=0;
for (i=1;i<=n;i++){
scanf ("%d", &x[i]);
if (x[i]%2==1){
m=m+1;
y[m]=x[i];}}
for (i=1;i<=m;i++){
for (j=i;j<=m;j++){
if (y[i]>y[j]){
n=y[i];
y[i]=y[j];
y[j]=n;}}
if (i>1){printf (",");}
printf ("%d", y[i]);}
return 0;}
int main()
{
    int j,n,e,shuru[501],shuchu[501];
    j=0;
    scanf("%d",&n);
    for(int i=0;i<=n-1;i++)
    {
        scanf("%d",&shuru[i]);
        if(shuru[i]%2==1)
        {
             shuchu[j]=shuru[i];
             j=j+1;
        }
       
    }
    for(int k=1;k<j;k++)
    {
        for(int m=0;m<j-k;m++)
        {
            if(shuchu[m]<shuchu[m+1])
            {
               e=shuchu[m+1];
               shuchu[m+1]=shuchu[m];
               shuchu[m]=e;
            }
        }
        printf("%d,",shuchu[j-k]);
    }
    
    
     for(int m=0;m<j-j;m++)
        {
            if(shuchu[m]<shuchu[m+1])
            {
               e=shuchu[m+1];
               shuchu[m+1]=shuchu[m];
               shuchu[m]=e;
            }
        }
        printf("%d",shuchu[j-j]);
    return 0;
}
int main(){
int n,i,sz[500],js[500],k=0,e,l;
scanf("%d",&n);
for(i=0;i<n;i++){
     scanf("%d",&sz[i]);
     if(sz[i]%2==1){
        js[k]=sz[i];
        k++;
       }
   }
for(l=1;l<k;l++){
   for(i=0;i<k-l;i++){
       if(js[i]>js[i+1]){
          e=js[i+1];
          js[i+1]=js[i];
          js[i]=e;
          }
       }
    }
for(i=0;i<k;i++){
   if (i<k-1)
       printf("%d,",js[i]);
   if (i==k-1)
       printf("%d",js[i]);
   }

return 0;
}
int main (){
    int n;
    scanf("%d",&n);
    int sz[500];
    int js[500];
    for(int i=0;i<n;i++){
        scanf("%d",&(sz[i]));
    }
    for(int i=0;i<n;i++){
        if((sz[i])%2!=0){
            js[i]=sz[i];
        }
    }
    int e;
    for(int k=0;k<=n;k++){
        for(int i=0;i<n-1;i++){
            if((js[i])>(js[i+1])){
                e=js[i+1];
                js[i+1]=js[i];
                js[i]=e;
            }
        }
    }
    for(int i=0;i<n;i++){
        if((js[i])!=0&&i!=n-1){
        printf("%d,",(js[i]));
        }else if(i==n-1){
            printf("%d",(js[i]));
        }
    }return 0;
}
int main() {
	int n,sz[501];
	scanf("%d",&n);
	int i,j,a;
	for(i=0;i<n;i++){
		scanf("%d",&sz[i]);
	}
	for(i=1;i<=n;i++){
		for(j=0;j<n-i;j++){
			if(sz[j]>sz[j+1]){
				a=sz[j+1];
				sz[j+1]=sz[j];
				sz[j]=a;
			}
		}
	}
	j=0;
	while(sz[j]%2==0){
		j+=1;
	}
	printf("%d",sz[j]);
	for(j=j+1;j<n;j++){
		if(sz[j]%2!=0){
			printf(",%d",sz[j]);
		}
	}
	return 0;
}
int N,M;
int data[10010];

int main(){
    int i,t,j;
    scanf("%d",&N);
    M = 0;
    for (i = 1;i <= N ; i++){
        scanf("%d",&t);
        if (t%2) data[M++] = t;
    }
    for (i = M-1 ; i >= 0; i--){
        for (j = 0;j < i ; j++){
            if (data[j] > data[j+1]){
                data[j] = data[j+1] + data[j];
                data[j+1] = data[j] - data[j+1];
                data[j] = data[j]- data[j+1];
            }
        }
    }

    for (i = 0;i <= M-2; i++){
        printf("%d,",data[i]);
    }
    printf("%d\n",data[i]);

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

int N,x[500],y[500],t;
scanf("%d",&N);
int b=0;
for(int a=0;a<N;a++)
{
	scanf("%d",&x[a]);
if(x[a]%2==1)
{y[b]=x[a];b++;}
}
int m=0;
for(int k=0;k<=b;k++)
{
	for(int c=1;c<=b-k;c++)
	{
		if(y[c]>y[m]){m=c;} 
	}

if(m!=b-k){t=y[b-k];
y[b-k]=y[m];
y[m]=t;}
m=0;
}


for(int d=1;d<=b;d++){
if(d<b){printf("%d,",y[d]);}
else{printf("%d",y[d]);}



}
return 0;
}
int main(){
    int n; int i;
    scanf("%d\n",&n);
    int sz[n];for(i=0;i<n;i++)
	{scanf("%d ",&sz[i]);}
   
	int e;
	for(int t=1;t<=n;t++)
	{
		for(i=0;i<n-t;i++)
		{
			if(sz[i]>sz[i+1])
			{
				e=sz[i+1];
				sz[i+1]=sz[i];
				sz[i]=e;
			}
		}
	}
int k=0,ul[k];
       for(i=0;i<n;i++)
{
for(int a=1;a<=sz[n-1];a=a+2)
{
if(a==sz[i])
{k=k+1;}
}
}
int f;
f=k;
k=0;
for(i=0;i<n;i++)
{
for(int a=1;a<=sz[n-1];a=a+2)
{
if(a==sz[i])
{
ul[k]=sz[i];
k++;
}
}
}
for(k=0;k<f-1;k++)
{
	printf("%d,",ul[k]);
}printf("%d",ul[f-1]);
    return 0;
}
int main(){
     int n,t=0,e;
     scanf("%d",&n);
     int s[n];
     for(int i=1;i<=n;i++){
         scanf("%d",&s[i]);
         if(s[i]%2==0){
             s[i]=0;
             t+=1;
         }
     }
     t=n-t;
     for(int m=n-1;m>=1;m--){
         for (int r=1;r<=m;r++){
             if(s[r]>s[r+1]){
                 e=s[r];
                 s[r]=s[r+1];
                 s[r+1]=e;
             }
         }
     }
     for(int i=n-t+1;i<n;i++){
         printf("%d,",s[i]);
     }
     printf("%d",s[n]);
     return 0;
 }
int main()
{
	void maopao(int n,int a[]);
	int shuzu1[500],shuzu2[500];
	int n,i,j;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&(shuzu1[i]));
	for(i=j=0;i<n;i++)
		if(shuzu1[i]%2==1){
			shuzu2[j]=shuzu1[i];
			j++;
		}
	maopao(j,shuzu2);
	for(i=0;i<j-1;i++)
		printf("%d,",shuzu2[i]);
	printf("%d\n",shuzu2[j-1]);
	return 0;
}

void maopao(int n,int a[]){
	int i,j,temp;
	for(i=0;i<n-1;i++)
		for(j=0;j<n-1-i;j++)
			if(a[j]>a[j+1]){
				temp=a[j];
				a[j]=a[j+1];
				a[j+1]=temp;
			}
}
/*
@ ??????.cpp
@ 1000012895
@ ???
@ 2010/10/31
*/
int main()
{
	int N, a[501], b[501], i, j, k, temp1, temp2 = 0;
	cin >> N;
	for(i = 1; i <= N; i++)
		cin >> a[i];
	j = 1;
	for(i = 1; i <= N; i++)
	{
		if(a[i] % 2 != 0)
		{
			b[j] = a[i];
			j++;
		}
	}
	j--;
	for(i = 1; i < j; i++)
		for(k = 1; k < j - i + 1; k++)
			if(b[k] > b[k+1])
			{
				temp1 = b[k];
				b[k] = b[k+1];
				b[k+1] = temp1;
			}
	for(i = 1; i <= j; i++)
	{
		if(temp2 == 0)
			cout << b[i];
		else
			cout << ',' << b[i];
		temp2++;
	}
	return 0;
}
int main()
{
	int n,t,j,i;
	cin>>n;
	int a[n];
	for(i=0;i<n;i++)
		cin>>a[i];
	for(j=0;j<n-1;j++)
		for(i=0;i<n-j-1;i++)
			if(a[i]>a[i+1])
			{
				t=a[i];
				a[i]=a[i+1];
				a[i+1]=t;
			}
	j=0;
	for(i=0;i<n;i++)
			if(a[i]%2==1)
				{
				j=j+1;
				if(j==1)
				cout<<a[i];
				else
				cout<<","<<a[i];
				}
	return 0;
}
int main (){
	int first[500], n, i, a, b;
	scanf("%d", &n);
	for(i=0; i<n; i++){
		scanf("%d", &(first[i]));
	}
	for(i=0; i<n; i++){
		if(first[i]%2==0){
			first[i]=0;
		}
	}
	b=n;
	while(n>1){
		for(i=0; i<n-1; i++){
			if(first[i]>first[i+1]){
				a=first[i];
				first[i]=first[i+1];
				first[i+1]=a;
			}
		}
		n--;
	}
	for(i=0; i<b; i++){
		if(first[i]!=0){
			printf("%d", first[i]);
			i++;
			break;
		}
	}
	while(i<b){
		if(first[i]!=0){
			printf(",%d", first[i]);
		}
		i++;
	}
	return 0;
}
int main()
{
	int n,x[500],i,j,k,m;
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d",&x[i]);
	for(i=0,k=0;i<n;i++)
		if(x[i]%2!=0)
		{
			x[k]=x[i];
			k=k+1;
		}
    for(i=1;i<=k-1;i++)
		for(j=i+1;j<=k;j++)
			if(x[i-1]>x[j-1])
			{
				m=x[i-1];
				x[i-1]=x[j-1];
				x[j-1]=m;
			}
	for(i=1;i<=k;i++)
	{
		printf("%d",x[i-1]);
		if(i<k)
			printf(",");
	}



	return 0;
}
/**?????????
  *???2010/11/6
  *??????
  *???1000010449
*/
int main()
{
	int n, i, j, k = 0, tem, a[100];
	cin >> n;
	for (i = 0; i < n; i++)
	{
		cin >> tem;
		if (tem % 2 != 0)
			a[k++] = tem;
	}
	for (i = 0; i < k - 1; i++)
		for (j = 0; j < k - 1 - i; j++)
		{
			if (a[j] > a[j + 1])
			{
				tem = a[j];
				a[j] = a[j + 1];
				a[j + 1] = tem;
			}
		}
	cout << a[0];
	for (i = 1; i < k; i++)
		cout << "," << a[i];
	return 0;
}
int main()
{
	int n,i,j=0;
	cin>>n;
	int a[n];
	for(i=0;i<n;i++)cin>>a[i];
	for(i=0;i<n;i++){
		if(a[i]%2==1)j++;
		else a[i]=0;
	}
	sort(a,a+n);
	for(i=n-j;i<n;i++){
		if(i==n-j)cout<<a[i];
		else cout<<","<<a[i];}
	return 0;
}
int main(){
	int num[500],n,i,j=0,k=0,l=0,a;
	scanf("%d\n",&n);
	for(i=0;i<n;i++){
		scanf("%d",&num[i]);
	}
	for(j=0;j<n;j++){
		for(i=0;i<n-1;i++){
			if(num[i]>num[i+1]){
				a=num[i+1];
				num[i+1]=num[i];
				num[i]=a;
	}
		}
	}
	for(i=0;i<n;i++){
        if(num[i]%2!=0){
           k++;}
	}
      	for(i=0;i<n;i++){ 
			 if(num[i]%2!=0){
				 l++;
					 if(l<k){
						 printf("%d,",num[i]);}
					 else{
						 printf("%d",num[i]);}
			 }
		}
   return 0;
	}
/*
 * hw131029_1.cpp
 *??
???????N????500???????????????????????????
????
?2?
?1?? N
?2?? N ?????????????
????
????????????????????
????
10
1 3 2 6 5 4 9 8 7 10
????
1,3,5,7,9
 *
 *  Created on: 2013?10?30?
 *      Author: KyLin
 */
int main ()
{
	int n;
	cin>>n;
	const int n1=n;
	int z[n1],t,t1;
	for (t=0;t<n1;++t)
		cin>>z[t];                       //????
	int numofdel=0;                    //numofdel?????????????
	for (t=0;t<n;++t)
		if (z[t]%2==0)
		{
			for (t1=t;t1<n;++t1)
				z[t1]=z[t1+1];          //????????????????
		    ++numofdel;
		    --n;                       //??????????--n --t
		    --t;
		}
	const int n2=n1-numofdel;
	int q[n2],change;                //?????????????????
	for (t=0;t<n2;++t)
		q[t]=z[t];
	for (t=0;t<n2;++t)
		for (t1=t;t1<n2;++t1)
			if (q[t]>q[t1])            //????
			{
				change=q[t];
				q[t]=q[t1];
				q[t1]=change;
			}
	for (t=0;t<n2;++t)
	{
		if (t==0)
			cout<<q[t];
		else                            //????
			cout<<","<<q[t];
	}
	return 0;
}
int main()
{
	int i,j,t,n,a[500],num=0;
	scanf("%d",&n);
	for(i=0;i<n;i++){
		scanf("%d",&a[i]);
	}
	for(i=0;i<n-1;i++){
		for(j=0;j<n-1-i;j++){
			if(a[j]>a[j+1]){
				t=a[j];
				a[j]=a[j+1];
				a[j+1]=t;
			}
		}
	}
	for(i=0;i<n;i++){
		if(a[i]%2!=0&&num==0){
			printf("%d",a[i]);
			num++;
			continue;
		}
		if(a[i]%2!=0&&num!=0){
			printf(",%d",a[i]);
		}
	}
	return 0;
}
int main (){
	int a[1000];
	int m[1000];
	int  b;
	int k;
	int e;
	int i=0;
	scanf("%d",&b);
	for(i=0;i<b;i++)
	{
		scanf("%d",&m[i]);
		if(m[i]%2!=0)
			a[i]=m[i];
		else
			a[i]=0;
	}
   

	for(int c=1;c<=b;c++)
	{
	    for(i=0;i<b-1;i++)
		{  if(a[i]>a[i+1])
		{
		      e=a[i+1];
			 a[i+1]=a[i];
			 a[i]=e;
		
		
		
		}
		
		}	
	
	
	}
	
		for(i=0;i<b-1;i++)
		{	if(a[i]!=0)
			printf("%d,",a[i]);
		}
        printf("%d",a[b-1]);
		return 0;
}
int main()
{
	int N,i,j=0,k,dot=0,min=29999,l;
	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)
			continue;
		else
		{
			b[j]=a[i];
			j++;
		}
	}
	for(k=0;k<j;k++)
	{
		for(i=0;i<j;i++)
		{
			if(b[i]<min)
			{
				min=b[i];
			}
			else
				continue;
		}
		if(dot!=0)
			printf(",");
		printf("%d",min);
		dot++;
		for(l=0;l<j;l++)
		{
			if(b[l]==min)
			{
				b[l]=29999;
				break;
			}
		}
		min=29999;
	}
	printf("\n");
	return 0;
}
int main(){
	int sz[500];
	int n;
	scanf("%d",&n);
	int a=0;
	for(int i=0;i<n;i++){
		scanf("%d",&sz[i]);
		if(sz[i]%2!=0)
			a++;
	}
    int e;
    for(int k=1;k<=n;k++){
	   for(int 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(int m=0,b=0;m<n;m++){
		if(sz[m]%2!=0){
			b++;
			if(b==a)
				printf("%d",sz[m]);
			else
				printf("%d,",sz[m]);
		}
	}
	return 0;
}