#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
string s;
set<char> S;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, k;
  cin >> n >> k;
  cin >> s;
  for (auto it : s) {
    S.insert(it);
  }
  if (k > n) {
    string ans = s;
    int cnt = k - n;
    char mn = *S.begin();
    while (cnt--) {
      ans += mn;
    }
    cout << ans << "\n";
    return 0;
  }
  string ans = s.substr(0, k);
  char mx = *S.rbegin();
  char mn = *S.begin();
  for (int i = k - 1; i >= 0; i--) {
    if (ans[i] == mx) {
      ans[i] = mn;
    } else {
      auto it = S.upper_bound(ans[i]);
      ans[i] = *it;
      break;
    }
  }
  cout << ans << "\n";
  return 0;
}
