Relatives
Orc names are not only expressive but also reveal family connections. Two orcs are considered first-degree relatives if their names can be made identical by removing no more than half of the letters from each name. For example, the names **orgrim** and **grom** are first-degree relatives because you can remove three out of six letters (**o**, **r**, **i**) from "orgrim" and one out of four letters (**o**) from "grom" to get the identical name **grm**.
Two orcs with names **A** and **B** are considered relatives of the (n+1)-th degree if there exists a name **C** such that orcs with names **A** and **C** are first-degree relatives, and **B** and **C** are n-th degree relatives. If two orcs are n-th degree relatives, they are also relatives in any degree m > n. However, the degree of kinship is determined by the smallest degree in which they are relatives.
Write a program to determine the degree n (n ≥ 1) of kinship between two orcs with given names.
Input
The input consists of two lines, each containing a name of an orc, composed of lowercase Latin letters. Each name has at least 1 letter and no more than 100 letters.
Output
Output the degree n of kinship between the orcs with the given names, or print the string "not related" (without quotes) if the two orcs are not related in any degree n.