#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
constexpr ll lmax = 1e18;
constexpr ll imax = 1e9;
constexpr ll imin = -1e9;
constexpr ll mod = 1e9 + 7;
constexpr ld eps = 1e-9;
int n, k;
string s, p;
void solve() {
  cin >> (n) >> (k) >> (s);
  set<char> st;
  st.insert('{');
  for (ll i = 0; i < n; i += 1) st.insert(s[i]);
  if (k > n) {
    int r = k - n;
    cout << (s);
    while (r--) cout << (*st.begin());
  } else {
    for (ll i = 0; i < k; i += 1) p += s[i];
    for (ll i = k - 1; i >= 0; i -= 1) {
      char c = p[i];
      auto ch = st.upper_bound(c);
      if (*ch == '{') {
        p[i] = *st.begin();
      } else {
        p[i] = *ch;
        break;
      }
    }
    cout << (p);
  }
  return;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  ll tc = 1;
  while (tc--) solve();
  return 0;
}
