#include <stdio.h>
typedef struct{
	int id;
	int weight;
	int height;
}Body;
void sort(Body *x,Body *y);
void swap(Body *x,Body *y);
void display(Body a[]);
int main(void) {
	Body a[]={
		{1,65,169},
		{2,73,170},
		{3,59,161},
		{4,79,175},
		{5,55,168},
	};
	for(int i=0;i<4;i++){
		for(int j=0;j<4-i;j++){
			sort(&a[j],&a[j+1]);
		}
	}
	display(a);
	return 0;
}
void sort(Body *x,Body *y){
	if(x->height<y->height){
		swap(x,y);
	}
}
void swap(Body *x,Body *y){
	Body temp=*x;
	*x=*y;
	*y=temp;
}
void display(Body a[]){
	for(int i=0;i<5;i++){
		printf("%d,%d,%d\n",a[i].id,a[i].weight,a[i].height);
	}
}