#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
bool big[maxn];
int main() {
  int n;
  string str;
  cin >> n;
  cin >> str;
  big[n - 1] = true;
  for (int i = n - 2; i >= 0; i--) {
    if (str[i] == str[i + 1])
      big[i] = big[i + 1];
    else {
      big[i] = str[i] > str[i + 1];
    }
  }
  int p = -1;
  for (int i = 0; i < n; i++) {
    if (big[i]) {
      p = i;
      break;
    }
  }
  if (p == -1)
    cout << str << endl;
  else {
    cout << str.substr(0, p) << str.substr(p + 1, n - p - 1) << endl;
  }
}
