#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  map<char, int> st;
  for (auto it : s) {
    st[it] = 1;
  }
  int num = 0;
  vector<char> get(st.size());
  for (auto &it : st) {
    it.second = num;
    get[num++] = it.first;
  }
  if (n >= k) {
    vector<int> a(k);
    for (int i = 0; i < k; i++) a[i] = st[s[i]];
    a[k - 1]++;
    for (int i = k - 1; i > 0; i--) {
      a[i - 1] += (a[i] / (st.size()));
      a[i] %= (st.size());
    }
    for (auto it : a) {
      cout << get[it];
    }
    cout << endl;
  } else {
    cout << s;
    for (int i = 0; i < k - n; i++) {
      cout << get[0];
    }
    cout << endl;
  }
  return 0;
}
