#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 7;
char s[40];
int id = 0;
bool mark[40];
char op[maxn];
char ans[maxn];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  scanf("%s", op);
  int len = strlen(op) - 1;
  for (int i = 0; i <= len; ++i) {
    if (mark[op[i] - 'a']) continue;
    mark[op[i] - 'a'] = 1;
    s[id++] = op[i];
  }
  sort(s, s + id);
  if (k > len + 1) {
    printf("%s", op);
    for (int i = 1; i <= k - len - 1; ++i) {
      printf("%c", s[0]);
    }
    puts("");
  } else if (k < len + 1) {
    int m = k - 1;
    while (op[m] == s[id - 1]) m--;
    for (int i = 0; i <= k - 1; ++i) {
      if (i < m)
        printf("%c", op[i]);
      else if (i == m) {
        int inx = lower_bound(s, s + id, op[i]) - s;
        printf("%c", s[inx + 1]);
      } else
        printf("%c", s[0]);
    }
    puts("");
  } else {
    int m = len;
    while (op[m] == s[id - 1]) m--;
    for (int i = 0; i <= len; ++i) {
      if (i < m)
        printf("%c", op[i]);
      else if (i == m) {
        int inx = lower_bound(s, s + id, op[i]) - s;
        printf("%c", s[inx + 1]);
      } else
        printf("%c", s[0]);
    }
    puts("");
  }
  return 0;
}
