
def mineral_formation(cave):
    a=[]
    b=[]
    a.append(cave[0])
    b.append(cave[-1])
    if sum(a[0])==0:
        return "stalagmites"
    elif sum(b[0])==0:
        return "stalactites"
    elif sum(a[0])>0:
        return  "both"


ba17fe0d81f6c801c6c2aafb13901687cf9e5e36
<mask token>

def mineral_formation(cave):
    a = []
    b = []
    a.append(cave[0])
    b.append(cave[-1])
    if sum(a[0]) == 0:
        return 'stalagmites'
    elif sum(b[0]) == 0:
        return 'stalactites'
    elif sum(a[0]) > 0:
        return 'both'


def mineral_formation(cave):
    a=[]
    b=[]
    a.append(cave[0])
    b.append(cave[-1])
    if sum(a[0])==0:
        return "stalagmites"
    elif sum(b[0])==0:
        return "stalactites"
    elif sum(a[0])>0:
        return  "both"

