#include <bits/stdc++.h>
using namespace std;
int n, k;
char s[100005];
bool used[100];
int main() {
  scanf("%d %d", &n, &k);
  scanf("%s", s + 1);
  int minn = 100;
  for (int i = 1; i <= n; i++) minn = min(minn, s[i] - 'a');
  if (k > n) {
    printf("%s", s + 1);
    for (int i = n + 1; i <= k; i++) printf("%c", minn + 'a');
    return 0;
  }
  int maxn = 0;
  for (int i = 1; i <= n; i++) {
    used[s[i] - 'a'] = 1;
    maxn = max(maxn, s[i] - 'a');
  }
  for (int i = k; i >= 1; i--) {
    if (s[i] - 'a' != maxn) {
      for (int j = 1; j < i; j++) printf("%c", s[j]);
      for (int j = s[i] - 'a' + 1; j < 26; j++)
        if (used[j] != 0) {
          printf("%c", j + 'a');
          break;
        }
      for (int j = i + 1; j <= k; j++) printf("%c", minn + 'a');
      return 0;
    }
  }
}
