Ran loves playing Maimai DX. However, to play it, she needs to perpare a big bottle of water, a pair of gloves, an earphone and some coins. She wants to play Maimai DX as soon as possible, but she has to take enough coins.
So here's the Maimai DX Problem:
Given an array

guaranteed that

and an integer

. Let's call an interval
![[l,r]](https://www.nowcoder.com/equation?tex=%5Bl%2Cr%5D)
good if it contains all

kinds of numbers. Try to find the shortest good interval with at least

s in it, and output it's length.
It's guaranteed that there're at least one “

”s, "

"s and "

"s in

. Also, there're at least

"

"s. That means, there'll be at lease one good intervals in

.