#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  char a[100001];
  cin >> a;
  bool ch[27] = {};
  int min = 27;
  int max = -1;
  for (int i = 0; i < n; i++) {
    ch[a[i] - 'a'] = 1;
    if (min > a[i] - 'a') min = a[i] - 'a';
    if (max < a[i] - 'a') max = a[i] - 'a';
  }
  if (n == k) {
    char b[100001];
    strcpy(b, a);
    for (int i = n - 1; i >= 0; i--) {
      if ((a[i] - 'a') == max) {
        b[i] = 'a' + min;
      } else {
        for (int j = a[i] - 'a' + 1; j <= 26; j++) {
          if (ch[j]) {
            b[i] = 'a' + j;
            break;
          }
        }
        break;
      }
    }
    cout << b;
  } else if (n > k) {
    char b[100001];
    strcpy(b, a);
    b[k] = 0;
    for (int i = k - 1; i >= 0; i--) {
      if ((a[i] - 'a') == max) {
        b[i] = 'a' + min;
      } else {
        for (int j = a[i] - 'a' + 1; j <= 26; j++) {
          if (ch[j]) {
            b[i] = 'a' + j;
            break;
          }
        }
        break;
      }
    }
    cout << b;
  } else if (n < k) {
    char b[100005];
    strcpy(b, a);
    b[k] = 0;
    for (int i = n; i < k; i++) {
      b[i] = 'a' + min;
    }
    cout << b;
  }
}
