#include <bits/stdc++.h>
using namespace std;
template <class T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
const int maxn = 1000100;
char d[100002];
int main() {
  int n, k;
  cin >> n >> k;
  map<char, int> f;
  string s;
  cin >> s;
  for (int i = 0; i < s.length(); i++) d[i] = s[i];
  sort(d, d + s.length());
  for (int i = 0; i < s.length(); i++) {
    f[d[i]] = i;
  }
  int q = s.length();
  if (k > n) {
    cout << s;
    for (int i = n; i < k; i++) {
      cout << d[0];
    }
  } else {
    s = s.substr(0, k);
    bool help = true;
    int j = s.length() - 1;
    while (true) {
      int g = f[s[j]];
      if (help) {
        g++;
        help = false;
      }
      if (g == q) {
        s[j] = d[0];
        help = true;
      } else {
        s[j] = d[g];
      }
      if (!help) break;
      j--;
    }
    cout << s;
  }
}
