#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 100;
int ax[maxn], vis[maxn], pos[maxn];
int n, k, A, B;
char s[maxn], s1[maxn];
vector<char> ac;
int main() {
  cin >> n >> k;
  cin >> s;
  int cnt = 0;
  int len = strlen(s);
  for (int i = 0; i < len; i++) {
    if (!vis[s[i] - 'a']) ac.push_back(s[i] - 'a'), vis[s[i] - 'a'] = 1;
  }
  sort(ac.begin(), ac.end());
  for (int i = 0; i < ac.size(); i++) pos[ac[i]] = i + 1;
  int m = ac.size();
  if (n >= k) {
    int ma = k;
    while (pos[s[k - 1] - 'a'] == m) {
      s1[k - 1] = (char)(ac[0] + 'a');
      k--;
    }
    s1[k - 1] = (char)(ac[pos[s[k - 1] - 'a']] + 'a');
    for (int i = 0; i < k - 1; i++) cout << s[i];
    for (int i = k - 1; i < ma; i++) cout << s1[i];
  } else {
    cout << s;
    for (int i = 0; i < k - n; i++) cout << (char)(ac[0] + 'a');
  }
  return 0;
}
