#include <bits/stdc++.h>
using namespace std;
int n, k;
string s, t;
set<char> l;
int main() {
  cin >> n >> k >> s;
  for (int i = 0; i < n; ++i) {
    l.insert(s[i]);
  }
  if (k > n) {
    t = s;
    t.resize(k);
    char c = *l.begin();
    for (int i = n; i < k; ++i) {
      t[i] = c;
    }
    cout << t << endl;
    return 0;
  }
  t.resize(k);
  for (int i = 0; i < k; ++i) {
    t[i] = s[i];
  }
  for (int i = k - 1; i >= 0; --i) {
    if (l.upper_bound(t[i]) == l.end()) {
      t[i] = *l.begin();
    } else {
      t[i] = *l.upper_bound(t[i]);
      break;
    }
  }
  cout << t << endl;
  return 0;
}
