#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  int tmp[256] = {0};
  set<char> S;
  for (auto it : s) tmp[it] = 1;
  for (int i = 0; i < 256; ++i)
    if (tmp[i] == 1) S.insert(i);
  if (k > n)
    cout << s << string(k - n, *S.begin()) << endl;
  else {
    string ans(s, 0, k);
    char largest = *S.rbegin();
    char smallest = *S.begin();
    for (int i = k - 1; i >= 0; i--) {
      if (ans[i] == largest)
        ans[i] = smallest;
      else {
        auto it = S.find(ans[i]);
        ans[i] = *(++it);
        break;
      }
    }
    cout << ans << endl;
  }
  return 0;
}
