A template is a string consisting of English letters \{a, \ldots, z, A, \ldots, Z\} and the symbols ? and *. Each ? can be replaced by any single letter, while each * can be replaced by any sequence of letters, including an empty sequence. A string that can be formed by making these replacements is said to satisfy the template.
You are given two templates. Your task is to determine the shortest string that satisfies both templates, or to indicate that no such string exists.
The input file contains the two templates, each on a separate line.
Each template has a maximum length of characters.
In the output file, print the length of the shortest string that satisfies both templates, or output "-1" if no such string exists.
Example 1