88. AB Numbers

I'm a slow walker, but I never walk backwards.

Task Description

Determine the $A$ and $B$ values for two input numbers. You will be given two numbers, each consisting of 4 different digits from 1 to 9. You should determine two values. The $A$ value is the number of digits that are the same and appear in the same locations. For example, the $A$ value of 1234 and 1253 is two, since both 1 and 2 are the same and they appear in the same locations. The $B$ value is the number of digits that are the same but appear in different locations. For example, the $B$ value of 1234 and 1253 is 1, since 3 appears in both numbers but appear in different locations.

Input Format

Two numbers in a line to determine. Both number are composed of 4 different digits without 0.

Output Format

Single string of n A m B where $n$ is the $A$ value and $m$ is the $B$ value determined for the input.

Sample Input

1234 1345

Sample Output

1A2B

Discussion