#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  set<char> ST;
  for (char x : s) ST.insert(x);
  if (k > n) {
    for (int i = 0; i < n; i++) cout << s[i];
    for (int i = n; i < k; i++) cout << *ST.begin();
    return;
  }
  for (int i = k - 1; i >= 0; i--) {
    if (s[i] < *ST.rbegin()) {
      string f = "";
      for (int j = 0; j < i; j++) f += s[j];
      char mnThatWorkz = 'z';
      for (char c : ST) {
        if (c > s[i] && mnThatWorkz > c) mnThatWorkz = c;
      }
      f += mnThatWorkz;
      while ((int)f.size() < k) f += *ST.begin();
      cout << f << "\n";
      return;
    }
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int t = 1;
  while (t--) {
    solve();
  }
}
