#include <bits/stdc++.h>
using namespace std;
long long a[1000010];
set<char> tt;
set<char>::iterator it;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  for (long long i = 0; i < s.size(); i++) {
    tt.insert(s[i]), a[s[i] - 'a']++;
  }
  char ch = *tt.begin();
  if (k > n) {
    cout << s;
    for (long long i = 1; i <= (k - n); i++) cout << ch;
  } else {
    bool ck = false;
    long long indx = -1;
    char cc;
    for (long long i = k - 1; i >= 0; i--) {
      if (ck)
        break;
      else {
        for (long long j = 0; j < 26; j++) {
          cc = j + 'a';
          if (a[j] && cc > s[i]) {
            ck = true;
            indx = i;
            break;
          }
        }
        if (ck) break;
      }
    }
    for (long long i = 0; i < indx; i++) cout << s[i];
    cout << cc;
    for (long long i = indx + 1; i < k; i++) cout << ch;
  }
}
