def isTernary(string):
    """
    check if given compound is a ternary
    """
    str1 = string.split('_')[0]
    nonumber=''
    for s in str1:
        if s=='.':
            return False
        if s.isdigit():
            nonumber=nonumber+' '
        else:
            nonumber=nonumber+s

    if len(nonumber.split())==3:
        return True
    return False