Removing the letters#1079

Removing the letters

1 second
128 megabytes
Very easy (≈850)

You are given two words (each word consists of upper-case English letters). Delete some letters from each word so that the resulting words become equal.

Find the maximum possible length of the resulting word.

Input

Each test case consists of a single line containing two words separated by a space. The length of each word is between and . There are no more than test cases.

Output

For each test case, output the maximum length of a resulting word (the length of the longest word that can be created from both words by removing some letters).

If it's impossible to obtain identical words, output .

Examples

Example 1

Loading
Loading