#include <bits/stdc++.h>
using namespace std;
set<int> x;
int main() {
  int n, m;
  cin >> n >> m;
  string s;
  cin >> s;
  char c[100000];
  for (int i = 0; i < n; i++) {
    x.insert(s[i] - 97);
  }
  int l;
  if (m > n) {
    l = m - n;
    cout << s;
    for (int i = n + l - 1; i >= n; i--) {
      set<int>::iterator f = x.begin();
      cout << (char)(*f + 97);
    }
  } else if (m <= n) {
    set<int>::iterator f = x.begin();
    set<int>::iterator z = x.end();
    z--;
    int l = -1;
    for (int i = m - 1; i >= 0; i--) {
      if (s[i] - 97 == *z) {
        s[i] = (char)(*f + 97);
      } else {
        int l = *x.upper_bound(s[i] - 97);
        s[i] = (char)(l + 97);
        break;
      }
    }
    for (int i = 0; i < m; i++) cout << s[i];
  }
  return 0;
}
