Farmer John is studying the geneology of his herd. He has M bulls (1 <= M <= 20) and F cows (1 <= F <= 20). He doesn't know, though, which bovines are potential descendants of which other bovines.
Farmer John does know the unique DNA sequence

of each and every cow and bull on his farm.

has length 25 characters and contains only upper-case letters 'A', 'C', 'G', and 'T'. He wants to determine which bovines could possibly be children of which pairs of cows and bulls.
Help Farmer John make this determination. For each pair of a cow and a bull, print how many of FJ's other bovines could possibly be their children. A bovine can be a child of a given cow and bull if
(1) it is not either of its parents (that is, a cow cannot be its own mother and a bull cannot be its own father)
(2) each position in its DNA sequence matches at least one of the characters in the same position in the two parent sequences
So for example, 'abc' could come from pair ('axx', 'xbc'), but not from the pair ('aaa', 'bbb').
Consider three bulls and two cows with these DNA sequences:
Bull 1: GTTTTTTTTTTTTTTTTTTTTTTTT
Bull 2: AATTTTTTTTTTTTTTTTTTTTTTT
Bull 3: GATTTTTTTTTTTTTTTTTTTTTTT
Cow 1: TTTTTTTTTTTTTTTTTTTTTTTTT
Cow 2: ATTTTTTTTTTTTTTTTTTTTTTTT
Bull 2 and cow 1 could be the parents of cow 2:
Bull 2: AATTTTTTTTTTTTTTTTTTTTTTT
Cow 1: TTTTTTTTTTTTTTTTTTTTTTTTT
Cow 2: ATTTTTTTTTTTTTTTTTTTTTTTT
since cow 2's first letter 'A' could be from Bull 2; cow 2's second letter 'T' could come from cow 1; the remainder of the letters could come from either parent.
Your goal is to create a matrix of the count of possible offspring of each pairing of bulls and cows.