#include <bits/stdc++.h>
using namespace std;
char st[100000];
int n, t, a[26], minn, maxx;
int main() {
  scanf("%d%d", &n, &t);
  scanf("%s", st);
  minn = 25;
  maxx = 0;
  for (int i = 0; i < n; i++) {
    if (st[i] - 97 < minn) minn = st[i] - 97;
    if (st[i] - 97 > maxx) maxx = st[i] - 97;
    a[st[i] - 97] = 1;
  }
  if (t > n) {
    printf("%s", st);
    for (int i = n + 1; i <= t; i++) printf("%c", minn + 97);
  } else {
    int wei = t - 1;
    while (st[wei] - 97 == maxx) {
      st[wei] = minn + 97;
      wei--;
    }
    st[wei]++;
    while (a[st[wei] - 97] == 0) st[wei]++;
    for (int i = 0; i < t; i++) printf("%c", st[i]);
    printf("\n");
  }
  return 0;
}
