The new, popular word game Wordle spreads so fast that its contagiousness has reached Luca.
For those of you who have not yet heard about it, in Wordle you have to guess a 5-letter word in a limited number of attempts. After each attempt you get to know, for each position, whether your guess had the right letter in the right position, a letter present in the word but not in the right position, or a completely wrong letter.
Intrigued by the characteristics of the word game, Luca has decided to create his own more generic version. In this version, one needs to guess an -letter word. Every possible sequence of letters of the English alphabet constitutes a potentially valid guess, but it is guaranteed that the word to guess does not contain the same letter twice.
Task
You are in the middle of a game: you already guessed some letters but you still have to figure out some of them, which are indicated in the input with an underscore (_
). You wonder: how many words could be a valid solution for the game, given the letters you know?
Input data
The first line of the input contains the only integer . The second line contains letters : either an uppercase letter of the English alphabet or an underscore.
Output data
The output contains a single line with an integer: the number of possible solutions.
Constraints and clarifications
- For tests worth points, and the number of missing letters is always .
- For tests worth more points, the number of missing letters is always .
- For tests worth more points, the number of missing letters is always or .
Example 1
stdin
5
H O U S _
stdout
22
Explanation
In the first sample case there are valid possibilities. One of the obvious ones is an E
for the fifth position.
Note that B
is a valid possibility too (even though it does not form a valid English word), but S
is not, given that the letter is already present in the word in the fourth position.
Example 2
stdin
3
A _ _
stdout
600
Explanation
In the second sample case there are valid possibilities.