#include <bits/stdc++.h> using namespace std; struct s{ int score; int id; bool operator ((const s &o)const){ if(score != o.score) return score>o.score; } }a[1505],b[1505]; int main() { int n; cin>>n; for(int i=1;i<=n;i++) { cin>>a[i].score; b[i].score=a[i].score; } sort(b+1,b+1+n); for(int j=1;j<=n;j++) b[i].id=j; for(int k=1;k<=n;k++) { for(int d=1;d<=n;d++){ if(b[k].score==a[d].score) a[d].id=b[k].id; } } for(int l=1;l<=n;l++) cout<<a[l].score<<" "<<a[l].score<<endl; return 0; }