#include <bits/stdc++.h>
using namespace std;
char s[100004], ans[100004];
int n, k, cnt[26];
int main() {
  scanf("%d%d", &n, &k);
  scanf("%s", s + 1);
  for (int i = 1; i <= n; i++) cnt[s[i] - 'a']++;
  if (k > n) {
    for (int i = 1; i <= n; i++) printf("%c", s[i]);
    for (int i = 0; i < 26; i++) {
      if (cnt[i]) {
        for (int j = 1; j <= k - n; j++) printf("%c", i + 'a');
        puts("");
        return 0;
      }
    }
  }
  bool ok = 0;
  int st = 0;
  for (int i = 0; i < 26; i++)
    if (cnt[i]) {
      st = i;
      break;
    }
  for (int i = k; i >= 1; i--) {
    int lad = -1;
    if (ok) {
      ans[i] = s[i];
      continue;
    }
    for (int j = int(s[i] - 'a') + 1; j < 26; j++)
      if (cnt[j]) {
        lad = j;
        break;
      }
    if (lad == -1)
      lad = st;
    else
      ok = 1;
    ans[i] = lad + 'a';
  }
  for (int i = 1; i <= k; i++) printf("%c", ans[i]);
  puts("");
  return 0;
}
