#include <bits/stdc++.h>
using namespace std;
long long a[600000] = {0};
long long c[600000] = {0};
long long b[600000] = {0};
int main() {
  int n, m;
  cin >> n >> m;
  string s;
  cin >> s;
  int kk = -1;
  int tt = 27;
  for (int i = 0; i < n; i++) {
    int c = s[i] - 'a';
    a[c]++;
    if (c > kk) kk = c;
    if (tt > c) tt = c;
  }
  if (m > n) {
    int l = m - n;
    while (l--) {
      char k = tt + 'a';
      s += k;
    }
    cout << s << endl;
  } else {
    string hk;
    int i;
    for (i = m - 1; i >= 0; i--) {
      int t = s[i] - 'a';
      if (t != kk) break;
    }
    if (i < 0) i = 0;
    for (int j = 0; j < i; j++) {
      hk += s[j];
    }
    int t = s[i] - 'a';
    for (int j = 0; j < 26; j++) {
      if (j > t && a[j] > 0) {
        char pp = j + 'a';
        hk += pp;
        break;
      }
    }
    for (int j = i + 1; j < m; j++) {
      char pp = tt + 'a';
      hk += pp;
    }
    cout << hk << endl;
    return 0;
  }
}
