#include <bits/stdc++.h>
using namespace std;
set<int> ch;
char ans[100010];
int main() {
  ios::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  int len = s.size();
  for (int i = 0; i < len; i++) ch.insert(s[i] - 'a');
  if (len < k) {
    cout << s;
    char temp = *ch.begin() + 'a';
    for (int i = 0; i < k - len; i++) cout << temp;
  } else {
    int pos;
    for (int i = k - 1; i >= 0; i--) {
      auto it = ch.find(s[i] - 'a');
      it++;
      if (it != ch.end()) {
        ans[i] = *it + 'a';
        pos = i;
        break;
      }
    }
    char temp = *ch.begin() + 'a';
    for (int i = 0; i < pos; i++) ans[i] = s[i];
    for (int i = pos + 1; i < k; i++) ans[i] = temp;
    for (int i = 0; i < k; i++) cout << ans[i];
  }
  return 0;
}
