#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  string s, ss, final;
  cin >> s;
  ss = s;
  int f = 0;
  sort(ss.begin(), ss.end());
  if (k > n) {
    cout << s;
    for (int i = 0; i < k - n; ++i) {
      cout << ss[0];
    }
  } else {
    int d = 0;
    for (int i = k - 1; i >= 0; --i) {
      if (s[i] != ss[n - 1]) {
        d = i;
        break;
      }
    }
    for (int i = 0; i < d; ++i) {
      cout << s[i];
    }
    string g;
    for (int i = 0; i < n; ++i) {
      if (ss[i] == s[d]) {
        g = ss[i + 1];
      }
    }
    cout << g;
    for (int i = 1; i <= k - d - 1; ++i) {
      cout << ss[0];
    }
  }
  return 0;
}
