#include <bits/stdc++.h>
using namespace std;
int n, k, len, cnt;
char s[100010];
int vis[300], a[100010];
int d[300];
int main() {
  scanf("%d%d", &n, &k);
  scanf("%s", s + 1);
  len = strlen(s + 1);
  memset(vis, -1, sizeof(vis));
  for (int i = 1; i <= len; i++)
    if (vis[s[i]] == -1) vis[s[i]] = 1;
  for (int i = 'a'; i <= 'z'; i++)
    if (vis[i] == 1) vis[i] = cnt, d[cnt++] = i;
  for (int i = 1; i <= len; i++) a[i] = vis[s[i]];
  if (k > len) {
    printf("%s", s + 1);
    for (int i = len + 1; i <= k; i++) printf("%c", d[0]);
    return 0;
  }
  a[k]++;
  int nw = k;
  while (k) {
    a[k - 1] += a[k] / cnt;
    a[k] %= cnt;
    k--;
  }
  for (int i = 1; i <= nw; i++) printf("%c", d[a[i]]);
}
