#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int minn = 26;
  string s;
  cin >> s;
  int i, j;
  bool opada[26] = {false};
  for (i = 0; i < s.length(); i++) {
    opada[s[i] - 97] = true;
    if (s[i] - 97 < minn) minn = s[i] - 97;
  }
  if (k > n) {
    for (i = 0; i < k - n; i++) {
      s += minn + 97;
    }
    cout << s;
  } else {
    for (i = k - 1; i >= 0; i--) {
      for (j = s[i] - 97 + 1; j < 26; j++) {
        if (opada[j]) {
          s[i] = j + 97;
          for (i = 0; i < k; i++) cout << s[i];
          return 0;
        }
      }
      s[i] = minn + 97;
    }
  }
  return 0;
}
