#include <bits/stdc++.h>
using namespace std;
const int N = 200005;
const int inf = 1000 * 1000 * 1000;
const int mod = 1000 * 1000 * 1000 + 7;
int n, k;
string s;
bool used[N];
int main() {
  cin >> n >> k;
  cin >> s;
  int mx = -1;
  for (int i = 0; i < n; i++) {
    int x = s[i] - 'a';
    used[x] = true;
  }
  if (k > n) {
    for (int i = 0; i < n; i++) cout << s[i];
    int x;
    for (int i = 0; i < 26; i++) {
      if (used[i]) {
        x = i;
        break;
      }
    }
    for (int i = n; i < k; i++) cout << char(x + 'a');
    cout << endl;
    return 0;
  }
  int x;
  for (int i = 25; i >= 0; i--) {
    if (used[i]) {
      x = i;
      break;
    }
  }
  int id = -1;
  for (int i = k - 1; i >= 0; i--) {
    if (s[i] - 'a' != x) {
      id = i;
      break;
    }
  }
  for (int i = 0; i < id; i++) cout << s[i];
  for (int i = 0; i < 26; i++) {
    if (used[i] == false) continue;
    if (i > s[id] - 'a') {
      cout << char(i + 'a');
      break;
    }
  }
  for (int i = 0; i < 26; i++) {
    if (used[i]) {
      x = i;
      break;
    }
  }
  for (int i = id + 1; i < k; i++) cout << char(x + 'a');
  cout << endl;
  return 0;
}
