':type secret: str
:type guess: str
:rtype: str'

def getHint(self, secret, guess):

    A = sum(imap(operator.eq, secret, guess))
    B = (sum((Counter(secret) & Counter(guess)).values()) - A)
    return ('%dA%dB' % (A, B))
