#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, c[26], i, j, min_char, max_char;
  char in[100005];
  while (scanf("%d%d%s", &n, &k, in) != EOF) {
    memset(c, 0, sizeof(int) * 26);
    min_char = 26;
    max_char = -1;
    for (i = 0; i < strlen(in); i++) {
      c[in[i] - 'a']++;
      min_char = min(min_char, in[i] - 'a');
      max_char = max(max_char, in[i] - 'a');
    }
    if (n < k) {
      printf("%s", in);
      for (i = n; i < k; i++) printf("%c", min_char + 'a');
      printf("\n");
    } else {
      for (i = k - 1; i >= 0; i--) {
        if (in[i] - 'a' == max_char) {
          in[i] = min_char + 'a';
        } else {
          for (j = in[i] - 'a' + 1; j < 26; j++) {
            if (c[j] > 0) break;
          }
          in[i] = j + 'a';
          break;
        }
      }
      in[k] = 0;
      printf("%s\n", in);
    }
  }
  return 0;
}
