#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7, siz = 3e5 + 5;
long long n, m, k, a[siz];
string s;
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k >> s;
  set<char> ss;
  for (long long i = 0; i < n; i++) ss.insert(s[i]);
  if (k > n) {
    for (long long i = 0; i < n; i++) cout << s[i];
    for (long long i = 0; i < k - n; i++) cout << *ss.begin();
    return 0;
  }
  for (long long i = k - 1; i >= 0; i--) {
    char cur = s[i];
    if (ss.upper_bound(cur) != ss.end()) {
      char c = *ss.upper_bound(cur);
      for (long long j = 0; j < i; j++) cout << s[j];
      cout << c;
      for (long long j = i + 1; j < k; j++) cout << *ss.begin();
      break;
    }
  }
}
