#include <bits/stdc++.h>
using namespace std;
bool letter[26];
char s[100005];
int main() {
  int n, k, MAX = 0;
  char c;
  scanf("%d %d", &n, &k);
  memset(letter, 0, sizeof(letter));
  scanf(" %s", s);
  for (int i = 0; i < n; i++) {
    c = s[i];
    letter[c - 'a'] = 1;
    if (c > MAX) MAX = c;
  }
  if (n >= k) {
    int i;
    for (i = k - 1; s[i] == MAX && i > -1; i--)
      ;
    for (int j = 0; j < i; j++) printf("%c", s[j]);
    for (int j = s[i] - 'a' + 1; j < 26; j++) {
      if (letter[j]) {
        printf("%c", j + 'a');
        break;
      }
    }
    for (int j = 0; j < 26; j++) {
      if (letter[j]) {
        for (int l = i + 1; l < k; l++) printf("%c", j + 'a');
        break;
      }
    }
  } else {
    for (int i = 0; i < n; i++) printf("%c", s[i]);
    for (int i = 0; i < 26; i++) {
      if (letter[i]) {
        for (int j = n; j < k; j++) printf("%c", i + 'a');
        break;
      }
    }
  }
  return 0;
}
