#include <bits/stdc++.h>
using namespace std;
const int N = 2055;
const int M = 1000005;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return a * (b / gcd(a, b)); }
long long fact(long long n) {
  long long ret = 1;
  for (int i = 1; i <= n; i++) ret *= i;
  return ret;
}
bool is_vowel(char c) {
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'y')
    return 1;
  return 0;
}
int n, k;
string s;
bool cnt[30];
int sol[100005];
bool v[100005][2];
bool dfs(int idx, bool is) {
  if (v[idx][is]) return 0;
  v[idx][is] = 1;
  if (idx == k) return is;
  int cur = s[idx] - 'a';
  if (is) cur = 0;
  for (int i = cur; i < 26; i++) {
    if (!cnt[i]) continue;
    int newIS = is | (i > cur);
    sol[idx] = i;
    if (dfs(idx + 1, newIS)) return 1;
  }
  return 0;
}
int main() {
  cin >> n >> k >> s;
  for (int i = 0; i < n; i++) cnt[s[i] - 'a'] = 1;
  if (k > n) {
    cout << s;
    char c = 'a';
    for (int i = 0; i < 26; i++) {
      if (cnt[i]) {
        for (int j = 0; j < k - n; j++) printf("%c", c + i);
        break;
      }
    }
    return 0;
  }
  dfs(0, 0);
  for (int i = 0; i < k; i++) {
    printf("%c", 'a' + sol[i]);
  }
  return 0;
}
