#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 10;
int n, k;
string s, ans;
bool mark[26];
vector<char> v;
int32_t main() {
  cin >> n >> k >> s;
  for (char c : s) {
    if (!mark[c - 'a']) {
      mark[c - 'a'] = 1;
      v.push_back(c);
    }
  }
  sort(v.begin(), v.end());
  if (n < k) {
    cout << s;
    for (int i = int(n); i < int(k); i++) {
      cout << v[0];
    }
    cout << endl;
    return 0;
  }
  for (int i = int(0); i < int(k); i++) {
    ans.push_back(s[i]);
  }
  int j = k - 1;
  while (j >= 0 && ans[j] == v.back()) {
    ans[j] = v[0];
    j--;
  }
  if (j < 0) return -1;
  for (int i = int(ans[j] - 'a' + 1); i < int(26); i++) {
    if (mark[i]) {
      ans[j] = char(i + 'a');
      break;
    }
  }
  cout << ans << endl;
}
