#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
string s;
cin >> s;
for (int i = 0; i < n - 1; i++)
{
if (s[i + 1] < s[i])
{
s.erase(s.begin() + i);
break;
}
else
{
s.pop_back();
cout << s << endl;
return 0;
}
}
cout << s << endl;
return 0;}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpCnsKCWludCBuOwoJY2luID4+IG47CglzdHJpbmcgczsKCWNpbiA+PiBzOwoJZm9yIChpbnQgaSA9IDA7IGkgPCBuIC0gMTsgaSsrKQoJewoJCWlmIChzW2kgKyAxXSA8IHNbaV0pCgkJewoJCQlzLmVyYXNlKHMuYmVnaW4oKSArIGkpOwoJCQlicmVhazsKCQl9CgkJZWxzZQoJCXsKCQkJcy5wb3BfYmFjaygpOwoJCQljb3V0IDw8IHMgPDwgZW5kbDsKCQkJcmV0dXJuIDA7CgkJfQoJfQoKCWNvdXQgPDwgcyA8PCBlbmRsOwoKCXJldHVybiAwO30=