```
'''
"Bulls" is a special kind of "Cows"...
'''
class Solution(object):
def getHint(self, secret, guess):
"""
:type secret: str
:type guess: str
:rtype: str
"""
n = len(secret)
s, g = [0] * 10, [0] * 10
bulls, cows = 0, 0
for i in xrange(n):
if secret[i] == guess[i]:
bulls += 1
s[int(secret[i])] += 1
g[int(guess[i])] += 1
cows = sum([min(s[i], g[i]) for i in xrange(10)]) - bulls
return str(bulls) + "A" + str(cows) + "B"
```