#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
const int N = 1e6 + 5;
string s, t = "";
int a[30];
vector<char> v;
int main() {
  int n, k;
  cin >> n >> k;
  cin >> s;
  for (int i = 0; i < s.size(); i++) {
    a[s[i] - 'a'] = 1;
  }
  for (int i = 0; i < 26; i++)
    if (a[i]) v.push_back(char(i + 'a'));
  for (int i = 0; i < min(k, n); i++) t += s[i];
  if (n < k) {
    for (int i = n; i < k; i++) t += v[0];
  } else {
    for (int i = k - 1; i >= 0; i--) {
      if (t[i] == v.back()) continue;
      for (int j = 0; j < v.size(); j++)
        if (v[j] > t[i]) {
          t[i] = v[j];
          break;
        }
      for (int j = i + 1; j < k; j++) t[j] = v[0];
      break;
    }
  }
  cout << t << endl;
  return 0;
}
