#include <stdio.h>
    void main ()
    {

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

        for (i=0; i<3;++i)
        { for (j=i+1; j<4;++j)
            {
                if (number[i]<number[j])
                {
                    a=number[i];
                    number[i]=number[j];
                    number[j]=a;
                }
            }
        }

        for(i= 0;i<6;++i)
        {
            printf("%d ", number[i]);
        }
    }

