#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k, i, j;
  cin >> n >> k;
  string s;
  set<char> ms;
  cin >> s;
  for (i = 0; i < n; i++) {
    ms.insert(s[i]);
  }
  string s1 = s.substr(0, min(n, k));
  if (k <= n) {
    for (i = k - 1; i >= 0; i--) {
      set<char>::iterator it = ms.end();
      it--;
      if (*it == s1[i]) {
        s1[i] = *ms.begin();
      } else {
        it = ms.begin();
        while (*it <= s1[i]) {
          it++;
        }
        s1[i] = *it;
        break;
      }
    }
    cout << s1;
  } else {
    for (i = n; i < k; i++) {
      char c = *ms.begin();
      s1 += c;
    }
    cout << s1;
  }
}
