#include <bits/stdc++.h>
using namespace std;
long long n, k;
char s[100010], t[100010];
int used[30], nxt[30], fir, las;
int main() {
  scanf("%d%d", &n, &k);
  scanf("%s", s);
  for (int i = 0; i < n; i++) used[s[i] - 'a'] = 1;
  int las = -1;
  for (int i = 0; i < 26; i++)
    if (used[i] == 1) {
      if (las == -1) {
        las = i;
        fir = las;
      } else {
        nxt[las] = i;
        las = i;
      }
    }
  if (n < k) {
    for (int i = 0; i < n; i++) t[i] = s[i];
    for (int i = n; i < k; i++) t[i] = fir + 'a';
  } else {
    for (int i = 0; i < k; i++) t[i] = s[i];
    int j = k - 1;
    while (nxt[t[j] - 'a'] == 0 && j >= 0) {
      t[j] = fir + 'a';
      j--;
    }
    t[j] = nxt[t[j] - 'a'] + 'a';
  }
  printf("%s", t);
}
