#include <stdio.h>
main(){
  int a[10],i,max,m2,m3;
  i=0;
  while(i<10){
    printf("height of mountain %d ",i+1);
    scanf("%d",&a[i]);
    i++;
  }
  max=a[0];
  i=0;
  while(i<10){
    if(a[i]>max) max=a[i];
  i++;
  }

if(a[0]==max) m2=a[1];
 else m2=a[0];
i=0;

  while(i<10){
    if(a[i]>m2&&a[i]!=max) m2=a[i];
    i++;
  }

if(a[0]!=max&&a[0]!=m2) m3=a[0];
 else if(a[1]!=max&&a[1]!=m2) m3=a[1];
 else if(a[2]!=max&&a[2]!=m2) m3=a[2];
 else m3=a[3];
i=0;

  while(i<10){
    if(a[i]>m3&&a[i]!=max&&a[i]!=m2) m3=a[i];
    i++;
  }

printf("height of the 1st mountain %d\nheight of the 2nd mountain d\nheight of the 3rd mountain &d\n",max,m2,m3);
return 0; 
}