Biologists from the Northern European Mutational Project (NEMP) have recently embarked on new research to demonstrate that humans are closely related to mammoths. To support this unusual hypothesis, scientists plan to compare the DNA of humans and mammoths.
For this comparison, DNA is divided into fragments of length , which are then compared in sequence. Given the possibility of mutations in humans and mammoths over time, the following method for comparing fragments has been proposed.
Consider the string . We say that mutates into if can be expressed as for some (possibly empty) strings , , and , and is xy^Rz, where y^R is the string reversed (for example, ""^R becomes ""). We define strings and as similar if can be transformed into with no more than mutations.
Given two DNA fragments, your task is to determine if they are similar.
The input consists of two strings made up of the characters A, D, G, and T. Both strings are of the same length, which does not exceed .
Print Similar if the strings are similar, and Different if they are not.
Example 1