#include <bits/stdc++.h>
#pragma comment(linker, "/stack:640000000")
using namespace std;
const double EPS = 1e-9;
const int INF = 0x7f7f7f7f;
const double PI = acos(-1.0);
template <class T>
inline T gcd(T a, T b) {
  return (b) == 0 ? (a) : gcd((b), ((a) % (b)));
}
template <class T>
inline T lcm(T a, T b) {
  return ((a) / gcd((a), (b)) * (b));
}
template <typename T>
string NumberToString(T Number) {
  ostringstream second;
  second << Number;
  return second.str();
}
struct debugger {
  template <typename T>
  debugger& operator,(const T& v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
int t, n, m;
string s;
int mark[26];
string ans;
void add(int i) { ans += (char)(i + 'a'); }
bool dfs(int pos, int flag) {
  if (pos == m) return flag;
  if (flag == 0) {
    for (int i = 0; i < (26); i++) {
      if (mark[i] == 0) continue;
      if (pos >= n) {
        dfs(pos + 1, 1);
        add(i);
        return true;
      }
      if (s[pos] - 'a' > i) continue;
      if (s[pos] - 'a' == i) {
        if (dfs(pos + 1, 0)) {
          add(i);
          return true;
        }
      } else {
        dfs(pos + 1, 1);
        add(i);
        return true;
      }
    }
  } else {
    for (int i = 0; i < (26); i++)
      if (mark[i]) {
        dfs(pos + 1, 1);
        add(i);
        return true;
      }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  while (cin >> n >> m) {
    ans = "";
    cin >> s;
    memset(mark, 0, sizeof(mark));
    for (int i = 0; i < (n); i++) mark[s[i] - 'a'] = 1;
    dfs(0, 0);
    reverse(ans.begin(), ans.end());
    cout << ans << endl;
  }
  return 0;
}
