#include <bits/stdc++.h>
using namespace std;
const long long M = 1e9 + 7;
const long long N = 1e5 + 10;
const long long IM = 1e15 + 37;
const long double PI = 3.1415926535897932384;
inline void PP(long long n) { cout << n << " "; }
void PV(vector<long long> v) {
  for (long long i = 0; i < v.size(); i++) cout << v[i] << " ";
  cout << "\n";
}
void PVV(vector<pair<long long, long long> > v) {
  for (long long i = 0; i < v.size(); i++)
    cout << v[i].first << " " << v[i].second << "\n";
}
void PA(long long v[], long long n, long long x = 0) {
  for (long long i = x; i < n + x; i++) cout << v[i] << ' ';
  cout << "\n";
}
void IN(long long a[], long long n, long long x = 0) {
  for (long long i = x; i < n + x; i++) cin >> a[i];
}
inline void op() {}
signed main() {
  op();
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, k;
  cin >> n >> k;
  string s;
  cin >> s;
  set<char> ck;
  for (char c : s) ck.insert(c);
  char c = *prev(ck.end());
  long long u = min(k, n);
  string ans = s.substr(0, u);
  if (k > n) {
    ans = s;
    while (k > n) {
      k--;
      ans += *ck.begin();
    }
    cout << (ans) << "\n";
    return 0;
  }
  bool ok = 1;
  for (long long i = k - 1; i >= 0; i--) {
    if (ans[i] != c) {
      auto it = ck.upper_bound(ans[i]);
      ans[i] = *it;
      ok = 0;
      break;
    } else {
      ans[i] = *ck.begin();
    }
  }
  if (ok) ans = s.substr(0, u);
  u = k - u;
  while (u--) ans += *ck.begin();
  cout << ans << "\n";
  return 0;
}
