You are given n magical numbers a1, a2, ..., an, such that the length of each of these numbers is 20 digits.
You can move from the ith number to the jth number, if the number of common digits between ai and aj is *exactly* 17 digits.
The number of common digits between two numbers x and y is computed is follow:
Where countXi is the frequency of the ith digit in the number x, and countYi is the frequency of the ith digit in the number y.
You are given two integers s and e, your task is to find the minimum numbers of moves you need to do, in order to finish at number ae starting from number as.
The first line contains an integer T (1 ≤ T ≤ 250), where T is the number of test cases.
The first line of each test case contains three integers n, s, and e (1 ≤ n ≤ 250) (1 ≤ s, e ≤ n), where n is the number of magical numbers, s is the index of the number to start from it, and e is the index of the number to finish at it.
Then n lines follow, giving the magical numbers. All numbers consisting of digits, and with length of 20 digits. Leading zeros are allowed.
For each test case, print a single line containing the minimum numbers of moves you need to do, in order to finish at number ae starting from number as. If there is no answer, print -1.
In the first test case, you can move from a1 to a2, from a2 to a3, and from a3 to a5. So, the minimum number of moves is 3 moves.
## Input
The first line contains an integer T (1 ≤ T ≤ 250), where T is the number of test cases.The first line of each test case contains three integers n, s, and e (1 ≤ n ≤ 250) (1 ≤ s, e ≤ n), where n is the number of magical numbers, s is the index of the number to start from it, and e is the index of the number to finish at it.Then n lines follow, giving the magical numbers. All numbers consisting of digits, and with length of 20 digits. Leading zeros are allowed.
## Output
For each test case, print a single line containing the minimum numbers of moves you need to do, in order to finish at number ae starting from number as. If there is no answer, print -1.
[samples]
## Note
In the first test case, you can move from a1 to a2, from a2 to a3, and from a3 to a5. So, the minimum number of moves is 3 moves.
**Definitions**
Let $ T \in \mathbb{Z} $ be the number of test cases.
For each test case:
- Let $ n \in \mathbb{Z} $ be the number of magical numbers.
- Let $ s, e \in \{1, \dots, n\} $ be the start and end indices.
- Let $ A = (a_1, a_2, \dots, a_n) $ be a sequence of strings, each of length 20, representing the magical numbers.
- For each $ a_i $, define its digit frequency vector $ f_i \in \mathbb{N}^{10} $, where $ f_i[d] $ is the count of digit $ d \in \{0,1,\dots,9\} $ in $ a_i $.
**Constraints**
1. $ 1 \le T \le 250 $
2. For each test case:
- $ 1 \le n \le 250 $
- $ 1 \le s, e \le n $
- Each $ a_i $ is a string of exactly 20 decimal digits (leading zeros allowed).
**Edge Condition**
There is a directed edge from node $ i $ to node $ j $ ($ i \ne j $) if and only if:
$$
\sum_{d=0}^{9} \min(f_i[d], f_j[d]) = 17
$$
**Objective**
Find the minimum number of moves (i.e., shortest path in terms of edges) from node $ s $ to node $ e $ in the directed graph defined above.
If no such path exists, output $-1$.