#include <bits/stdc++.h>
using namespace std;
const int MAX = 100010;
int main() {
  int n, k, idx;
  scanf("%d %d", &n, &k);
  char given[MAX], target[MAX];
  scanf("%s", given);
  bool alpha[28];
  memset(alpha, false, sizeof alpha);
  for (int i = 0; given[i]; i++) alpha[given[i] - 'a'] = true;
  char ch;
  for (int i = 0; i < 26; i++)
    if (alpha[i]) {
      ch = i + 'a';
      break;
    }
  if (k <= n) {
    bool hoise = false;
    for (int i = k - 1; i >= 0; i--) {
      for (int j = given[i] - 'a' + 1; j < 26; j++) {
        if (alpha[j]) {
          target[i] = j + 'a';
          idx = i;
          hoise = true;
          break;
        }
      }
      if (hoise) break;
      target[i] = ch;
    }
    for (int i = 0; i < idx; i++) target[i] = given[i];
    target[k] = '\0';
    puts(target);
    return 0;
  }
  for (int i = 0; given[i]; i++) target[i] = given[i];
  for (int i = 0; i < 26; i++)
    if (alpha[i]) {
      idx = i;
      break;
    }
  for (int i = n; i < k; i++) target[i] = idx + 'a';
  target[k] = '\0';
  puts(target);
  return 0;
}
