#include <bits/stdc++.h>
using namespace std;
int main() {
  int b, c, i;
  string a;
  map<char, char> d;
  map<char, char>::iterator it;
  scanf("%d %d", &b, &c);
  cin >> a;
  for (i = 0; i < b; i++) {
    if (d.find(a[i]) == d.end()) d[a[i]] = a[i];
  }
  if (b >= c) {
    b = c;
    for (b--; b >= 0; b--) {
      it = d.find(a[b]);
      for (it++; it != d.end(); it++) {
        a[b] = it->first;
        break;
      }
      if (it != d.end()) {
        break;
      }
    }
  } else
    b--;
  b++;
  for (i = 0; i < b && (d.size() != 1 || b < c); i++) {
    printf("%c", a[i]);
  }
  for (; b < c; b++) {
    printf("%c", d.begin()->first);
  }
}
