#include<stdio.h>
int main()
{
	struct information
	{
		int number;
		char	name[20];
		float grade;
	}student[100];
	int n,i,j;
	struct information temp;
	printf("please enter the sum of students:");
	scanf("%d",&n);
	for(i=0;i<n;i++)
		scanf("%d%s%f",&student[i].number,student[i].name,&student[i].grade);
	printf("the order is:");
	for(i=0;i<n-1;i++)
		for(j=0;j<n-1-i;j++)
			if(student[j].grade>student[j+1].grade)
			{
				temp=student[j];
				student[j]=student[j+1];
				student[j+1]=temp;
			}
	for(i=0;i<n;i++)
	{
		printf("%d\t%s\t%f\t",student[i].number,student[i].name,student[i].grade);
		printf("\n");
	}
	return 0;
}