#include "testlib.h"
#include <bits/stdc++.h>

using namespace std;

signed main(int argc, char *argv[]) {
    registerValidation(argc, argv);
    int n = inf.readInt(1, 26, "n");
    inf.readEoln();
    string s = inf.readToken("[a-z]+", "s");
    for (auto &i : s) {
        inf.ensuref(i <= char('a' + n - 1), "String has wrong symbols");
    }
    inf.readEoln();
    inf.readEof();
}
