# Tram

Tram network in Zagreb consists of several intersections and rails connecting some of them. In every intersection there is a switch pointing to the one of the rails going out of the intersection. When the tram enters the intersection it can leave only in the direction the switch is pointing. If the driver wants to go some other way, he/she must manually change the switch.

When a driver has do drive from intersection $a$ to the intersection $b$ he/she tries to choose the route that will minimize the number of times he/she will have to change the switches manually.

Write a program that will calculate the minimal number of switch changes necessary to travel from intersection $a$ to intersection $b$.

## Input

The first line contains integers $n,a$ and $bÂ(2â‰¤nâ‰¤10_{5},1â‰¤a,bâ‰¤n)$, where $n$ is the number of intersections in the network, numbered from $1$ to $n$.

Each of the following $n$ lines contain a sequence of integers separated by a single blank character. First number in the $i$-th line, $k_{i}Â(0â‰¤k_{i}â‰¤nâˆ’1)$, represents the number of rails going out of the $i$-th intersection. Next $k_{i}$ numbers represents the intersections directly connected to the $i$-th intersection. Switch in the $i$-th intersection is initially pointing in the direction of the first intersection listed.

## Output

The only line should contain the target minimal number. If there is no route from $a$ to $b$ the line should contain the integer $âˆ’1$.