#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
int n, k, m, rk[210], alpha[210];
char s[N];
bool is[210];
int main() {
  scanf("%d%d%s", &n, &k, s + 1);
  for (int i = 1; i <= n; i++) is[s[i]] = 1;
  for (int i = 'a'; i <= 'z'; i++)
    if (is[i]) alpha[rk[i] = ++m] = i;
  if (k > n) {
    printf("%s", s + 1);
    for (int i = n + 1; i <= k; i++) putchar(alpha[1]);
  } else {
    for (int i = k; i; i--)
      if (s[i] < alpha[m]) {
        char c = s[i];
        s[i] = 0;
        printf("%s", s + 1);
        putchar(alpha[rk[c] + 1]);
        for (int j = i + 1; j <= k; j++) putchar(alpha[1]);
        break;
      }
  }
  puts("");
  return 0;
}
