#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, kk;
  cin >> n;
  cin >> kk;
  bool avail[26];
  for (int i = 0; i < 26; i++) avail[i] = false;
  string s;
  cin >> s;
  for (int i = 0; i < s.size(); i++) avail[s[i] - 'a'] = true;
  string t;
  t = s.substr(0, kk);
  if (kk > t.size()) {
    int sm = -1;
    for (int i = 0; i < 26; i++)
      if (avail[i]) {
        sm = i;
        break;
      }
    while (kk > t.size()) {
      t += (sm + 'a');
    }
    cout << t << endl;
    return 0;
  }
  for (int i = t.size() - 1; i >= 0; i--) {
    bool found = false;
    int ind = -1;
    for (int j = t[i] - 'a' + 1; j < 26; j++) {
      if (avail[j] == true && s[i] != 'a' + j) {
        found = true;
        ind = j;
        break;
      }
    }
    if (found) {
      t[i] = 'a' + ind;
      int smallest = -1;
      for (int k = 0; k < 26; k++) {
        if (avail[k] == true) {
          smallest = k;
          break;
        }
      }
      for (int l = i + 1; l < t.size(); l++) {
        t[l] = smallest + 'a';
      }
      break;
    }
  }
  cout << t << endl;
  return 0;
}
