/*
#include <stdio.h>
struct student
{
int country,number,score;
};
int main()
{
struct student st[101];
int i,j,n,a=1,b[3];
scanf("%d",&n);
for(i=1; i<=n; i++)
{
scanf("%d %d %d",&st[i].country,&st[i].number,&st[i].score);
}
for(i=1; i<=3; i++)
{
if(i==3 &&b[1]==b[2])
{
for(j=1; j<=n; j++)
{
if(st[j].country==b[1])
{
st[j].score=0;
}
}
}
a=1;
for(j=1; j<=n; j++)
{
if(st[a].score<st[j].score)
{
a=j;
}
}
b[i]=st[a].country;
st[a].score=0;
printf("%d %d\n",st[a].country,st[a].number);
}
return 0;
}
*/
/*
struct student
{
int a,b;
};
int main()
{
struct student st[10001],temp;
int n,i,j;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d %d",&st[i].a,&st[i].b);
}
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
if(st[i].a<st[j].a)
{
temp=st[i];
st[i]=st[j];
st[j]=temp;
}
}
}
for(i=1;i<=n;i++)
{
printf("%d %d\n",st[i].a,st[i].b);
}
}
*/
/*
struct student
{
int num,math,data;
};
int main()
{
struct student st[1001],temp;
int n,i,j;
scanf("%d",&n);
for(i=1; i<=n; i++)
{
scanf("%d %d",&st[i].math,&st[i].data);
st[i].num=i;
}
for(i=1; i<n; i++)
{
for(j=1; j<=n-i; j++)
{
if(st[j].math<st[j+1].math)
{
temp=st[j+1];
st[j+1]=st[j];
st[j]=temp;
}
else if(st[j].math==st[j+1].math)
{
if(st[j].data<st[j+1].data)
{
temp=st[j+1];
st[j+1]=st[j];
st[j]=temp;
}
else if(st[j].data==st[j+1].data)
{
if(st[j].num>st[j+1].num)
{
temp=st[j+1];
st[j+1]=st[j];
st[j]=temp;
}
}
}
}
}
for(i=1; i<=n; i++)
{
printf("%d %d %d\n",st[i].num,st[i].math,st[i].data);
}
}
*/
/*
struct student
{
char word[100];
int year,month,day;
};
int main()
{
struct student st[101],temp;
int n,i,j,a[101];
scanf("%d",&n);
for(i=1; i<=n; i++)
{
scanf("%s %d %d %d",st[i].word,&st[i].year,&st[i].month,&st[i].day);
}
for(i=1; i<n; i++)
{
for(j=1; j<=n-i; j++)
{
if(st[j].year>st[j+1].year)
{
temp=st[j+1];
st[j+1]=st[j];
st[j]=temp;
}
else if(st[j].year==st[j+1].year)
{
if(st[j].month>st[j+1].month)
{
temp=st[j+1];
st[j+1]=st[j];
st[j]=temp;
}
else if(st[j].month==st[j+1].month)
{
if(st[j].day>st[j+1].day)
{
temp=st[j+1];
st[j+1]=st[j];
st[j]=temp;
}
else if(st[j].day==st[j+1].day)
{
if( strcmp(st[j].word,st[j+1].word)>0 )
{
temp=st[j+1];
st[j+1]=st[j];
st[j]=temp;
}
}
}
}
}
for(i=1; i<=n; i++)
{
printf("%s\n",st[i].word);
}
}
*/
/*
int main()
{
char x,t='a';
scanf("%c", &x);
do
{
printf("%c ",t);
t+=1;
}
while(t<x+1);
}
*/