/*#include <stdio.h>
int n;
long long int f(int n)
{
int i;
long long int sum=1;
for(i=1;i<=n;i++)
{
sum=sum*i;
}
return sum;
}
int main()
{
scanf("%d", &n);
printf("%lld\n", f(n));
}
#include<stdio.h>
double f(double n)
{
if(n>=0)
{
return n;
}
else
{
return -n;
}
}
int main()
{
double n;
scanf("%lf",&n);
printf("%.10g",f(n));
return n;
}
*//*
//구조체 struct
//도윤이가 만드는 자료형!
#include <stdio.h>
typedef struct
{
char name[10];
int age;
}student;
//배열 array
int main()
{
student arr[50];
int i,n;
scanf("%d ",&n);
for(i=1;i<=n;i++)
{
scanf("%s %d",arr[i].name, &arr[i].age);
}
for(i=1;i<=n;i++)
{
printf("%s %d\n",arr[i].name, arr[i].age);
}
}*/
#include<stdio.h>
typedef struct
{
int jumsu, sukcha;
}student;
int main()
{
student arr[201];
int n, i,j,c=1;
scanf("%d",&n);
for(i=1;i<=n;i++)
{
scanf("%d",&arr[i].jumsu);
}
for (i=1;i<=n;i++)
{
c=1;
for(j=1;j<=n;j++)
{
if(arr[i].jumsu<arr[j].jumsu)
{
c++;
}
}
arr[i].sukcha=c;
}
for(i=1;i<=n;i++)
printf("%d %d\n",arr[i].jumsu,arr[i].sukcha);
}