/*
#include <stdio.h>
void f(int n)
{
if(n==1||n==0)
{
printf("%d",n);
return ;
}
if(n%2==0) f(n/2);
else f((n-1)/2);
printf("%d",n%2);
}
int main()
{
int n;
scanf("%d",&n);
f(n);
return 0;
}
*/
/*
#include <stdio.h>
int S[15][15]={};
int SuperSum(int k,int n)
{
if(S[k][n]!=0) return S[k][n];
if(k==0 || n==0) return S[k][n]=n;
return S[k][n]=SuperSum(k-1,n)+SuperSum(k,n-1);
}
int main()
{
int n,k;
while( scanf("%d %d", &k, &n) != EOF )
printf("%d\n", SuperSum(k, n));
}
*/
/*
#include <stdio.h>
int p[51][51]={};
int pas(int r,int c)
{
if(p[r][c]!=0) return p[r][c];
if(r==1 || c==1)
{
return p[r][c]=1;
}
return p[r][c]=(pas(r-1,c)+pas(r,c-1))%100000000;
}
int main()
{
int r,c;
scanf("%d%d",&r,&c);
printf("%d",pas(r,c));
}
n return
1 1
2 2
3 4
4 7
5 13
*/
/*
#include <stdio.h>
int s[100001];
int sta(int n)
{
if(s[n]!=0) return s[n];
else if(n==1 || n==0) return 1;
else if(n==2) return 2;
return s[n]=(sta(n-3)+sta(n-2)+sta(n-1))%1000;
}
int main()
{
int n;
scanf("%d",&n);
printf("%d",sta(n));
}
*/
//student 이름, 나이, 성적
/*
#include <stdio.h>
typedef struct
{
char name[50]; //멤버
int age;
float score;
}a;
int main()
{
a ar;
ar.age=50;
scanf("%d",&ar.age);
a arr[100];
int i;
for(i=1;i<=50;i++)
{
scanf("%s %d %f",arr[i].name, &arr[i].age, &arr[i].score);
}
}
*/
/*
#include <stdio.h>
typedef struct
{
int score,place;
} s;
int main()
{
int n,i,k=0,j;
s arr[201];
scanf("%d",&n);
for(i=1; i<=n; i++)
{
scanf("%d",&arr[i].score);
}
for(i=1; i<=n; i++)
{
arr[i].place=1;
for(j=1; j<=n; j++)
{
if(arr[i].score<arr[j].score)
{
arr[i].place++;
}
}
printf("%d %d\n",arr[i].score,arr[i].place);
}
}
*/
/*
#include <stdio.h>
#include <string.h>
typedef struct
{
int score,place;
char name[11];
} s;
int main()
{
int n,i,k=0,j,m,max;
s arr[201];
scanf("%d%d",&n,&m);
for(i=1; i<=n; i++)
{
scanf("%s",arr[i].name);
scanf("%d",&arr[i].score);
}
for(i=1; i<=m; i++)
{
max=1;
for(j=1;j<=n;j++)
{
if(arr[max].score<arr[j].score) max=j;
}
printf("%s\n",arr[max].name);
arr[max].score=0;
}
}
*/
/*
#include <stdio.h>
typedef struct
{
int ctr,num,scr,rank;
} list;
int main()
{
int n,i,j,b[4];
list arr[101];
scanf("%d",&n);
for(i=1; i<=n; i++)
{
scanf("%d %d %d",&arr[i].ctr,&arr[i].num,&arr[i].scr);
}
for(i=1; i<=n; i++)
{
arr[i].rank=1;
for(j=1; j<=n; j++)
{
if(arr[i].scr<arr[j].scr)
{
arr[i].rank++;
}
}
}
for(j=1; j<=2; j++)
{
for(i=1; i<=n; i++)
{
if(arr[i].rank==j)
{
b[j]=arr[i].ctr;
printf("%d %d\n",arr[i].ctr,arr[i].num);
}
}
}
if(b[1]==b[2])
{
for(i=1; i<=n; i++)
{
if(arr[i].ctr==b[1])
{
arr[i].rank=1000;
}
}
for(i=1; i<=n; i++)
{
if(arr[i].rank==4)
{
printf("%d %d\n",arr[i].ctr,arr[i].num);
}
}
}
else
{
for(i=1; i<=n; i++)
{
if(arr[i].rank==3)
{
printf("%d %d\n",arr[i].ctr,arr[i].num);
}
}
}
}
*/