typedef struct{
	int score;
	char name[100];
}entry;

void ordinalRanking(entry* list,int len){

	int i;

	printf();

	for(i=0;i<len;i++)
		printf(,i+1,list[i].score,list[i].name);
}

void standardRanking(entry* list,int len){

	int i,j=1;

	printf();

	for(i=0;i<len;i++){
		printf(,j,list[i].score,list[i].name);
		if(list[i+1].score<list[i].score)
			j = i+2;
	}
}

void denseRanking(entry* list,int len){

	int i,j=1;

	printf();

	for(i=0;i<len;i++){
		printf(,j,list[i].score,list[i].name);
		if(list[i+1].score<list[i].score)
			j++;
	}
}

void modifiedRanking(entry* list,int len){

	int i,j,count;

	printf();

	for(i=0;i<len-1;i++){
		if(list[i].score!=list[i+1].score){
			printf(,i+1,list[i].score,list[i].name);
			count = 1;
			for(j=i+1;list[j].score==list[j+1].score && j<len-1;j++)
				count ++;
			for(j=0;j<count-1;j++)
				printf(,i+count+1,list[i+j+1].score,list[i+j+1].name);
			i += (count-1);
		}
	}
	printf(,len,list[len-1].score,list[len-1].name);
}

void fractionalRanking(entry* list,int len){

	int i,j,count;
	float sum = 0;

	printf();

	for(i=0;i<len;i++){
		if(i==len-1 || list[i].score!=list[i+1].score)
			printf(,(float)(i+1),list[i].score,list[i].name);
		else if(list[i].score==list[i+1].score){
			sum = i;
			count = 1;
			for(j=i;list[j].score==list[j+1].score;j++){
				sum += (j+1);
				count ++;
			}
			for(j=0;j<count;j++)
				printf(,sum/count + 1,list[i+j].score,list[i+j].name);
			i += (count-1);
		}
	}
}

void processFile(char* fileName){
	FILE* fp = fopen(fileName,);
	entry* list;
	int i,num;

	fscanf(fp,,&num);

	list = (entry*)malloc(num*sizeof(entry));

	for(i=0;i<num;i++)
		fscanf(fp,,&list[i].score,list[i].name);

	fclose(fp);

	ordinalRanking(list,num);
	standardRanking(list,num);
	denseRanking(list,num);
	modifiedRanking(list,num);
	fractionalRanking(list,num);
}

int main(int argC,char* argV[])
{
	if(argC!=2)
		printf();
	else
		processFile(argV[1]);
	return 0;
}