#include <bits/stdc++.h>
using namespace std;
set<char> availableChars;
int main() {
  int n, k, i, j;
  string s, ans;
  cin >> n >> k >> s;
  for (i = 0; i < n; i++) availableChars.insert(s[i]);
  if (k > n) {
    ans = s;
    for (i = 0; i < (k - n); i++) ans.push_back(*(availableChars.begin()));
    cout << ans << endl;
    return 0;
  }
  ans = s.substr(0, k);
  for (i = k - 1; i >= 0; i--) {
    set<char>::iterator it = availableChars.upper_bound(ans[i]);
    if (it != availableChars.end()) {
      ans[i] = *it;
      break;
    }
  }
  for (j = i + 1; j < k; j++) ans[j] = *(availableChars.begin());
  cout << ans << endl;
}
