Tom has a string containing only lowercase letters. He wants to choose a subsequence of the string whose length is $k$ and lexicographical order is the smallest. It's simple and he solved it with ease.
But Jerry, who likes to play with Tom, tells him that if he is able to find a lexicographically smallest subsequence satisfying following 26 constraints, he will not cause Tom trouble any more.
The constraints are: the number of occurrences of the $i$th letter from a to z (indexed from $1$ to $26$) must in $[L_i, R_i]$.
Tom gets dizzy, so he asks you for help.