#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  string S;
  cin >> n >> k >> S;
  set<char> exist;
  for (int(i) = 0; (i) < (int)(S.size()); (i)++) exist.insert(S[i]);
  vector<char> order;
  for (auto x : exist) order.push_back(x);
  if (n < k) {
    for (int(i) = 0; (i) < (int)(k - n); (i)++) S.push_back(order[0]);
    cout << S << endl;
  } else {
    S = S.substr(0, k);
    for (int(i) = (int)(S.size()) - 1; i >= 0; i--) {
      if (S[i] < order.back()) {
        for (int(k) = 0; (k) < (int)(order.size()); (k)++) {
          if (order[k] > S[i]) {
            S[i] = order[k];
            cout << S << endl;
            return 0;
          }
        }
      } else {
        S[i] = order[0];
      }
    }
  }
  return 0;
}
