#include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(0); int h, n; cin >> h >> n; vector a(n); a[0] = h; for(int i = 1; i < n; i++) { cin >> a[i]; } sort(a.rbegin(), a.rend()); for(int i = 0; i < n; i++) { if(h == a[i]) { if(i == 0) { cout << "1st"; } else if(i == 1) { cout << "2nd"; } else if(i == 2) { cout << "3rd"; } else { cout << i + 1 << "th"; } cout << '\n'; return 0; } } return 0; }