#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, m, i = 0;
  cin >> n >> k;
  string s = "";
  char d = 'a';
  m = k;
  for (size_t i = 0; i < n; i++) {
    if (m == 0) {
      d = 'a';
      m = k - 1;
    } else
      m--;
    s += d;
    d++;
  }
  cout << s << endl;
}
