#include #include #include using namespace std; string f(int n){ string s = to_string(n); if(s[s.length() - 1] == '1') s += "st"; else if(s[s.length() - 1] == '2') s += "nd"; else if(s[s.length() - 1] == '3') s += "rd"; else s += "th"; return s; } int main(void){ int h, n; cin >> h >> n; vectorv(n); for(int i = 0; i < n - 1; i++) cin >> v[i]; v[n - 1] = h; sort(v.begin(), v.end(), greater()); for(int i = 0; i < n; i++){ if(v[i] == h) cout << f(i + 1) << endl; } return 0; }