#include <bits/stdc++.h>
using namespace std;
set<char> st;
string s, t;
int n, k, dp[100005][2];
int solve(int i, int f) {
  if (i == k) return f;
  if (dp[i][f] != -1) return dp[i][f];
  int ans = 0;
  for (char c : st) {
    if (!f && c < s[i]) continue;
    ans = max(ans, solve(i + 1, f ? 1 : (c > s[i])));
    if (ans) {
      t[i] = c;
      break;
    }
  }
  return dp[i][f] = ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  while (cin >> n >> k) {
    cin >> s;
    st.clear();
    for (char c : s) st.insert(c);
    if (k > n) {
      cout << s;
      for (int i = 0; i < k - n; i++) cout << *st.begin();
      cout << '\n';
    } else {
      memset(dp, -1, sizeof dp);
      t = s;
      solve(0, 0);
      cout << t.substr(0, k) << '\n';
    }
  }
  return 0;
}
