A. Diversity
time limit per test
memory limit per test
input
output
s, so that it contains at least k
s
Input
s, consisting only of lowercase Latin letters (1 ≤ |s| ≤ 1000, |s| denotes the length of s).
k (1 ≤ k ≤ 26).
Output
impossible» (without quotes) if it is impossible.
Examples
input
yandex 6
output
0
input
yahoo 5
output
1
input
google 7
output
impossible
Note
6
4 different letters: {'a', 'h', 'o', 'y'}. To get 5 different letters it is necessary to change one occurrence of 'o' to some letter, which doesn't occur in the string, for example, {'b'}.
7 different letters because the length of the string is 6.
水题