def METHOD_NAME(s):
    x,y,z = 0,0,0
    mult = 1
    for c,c1 in zip(s,s[1:]+' '):
        #print 'c,c1',c,c1
        if c.isdigit():
            continue
        if c1.isdigit():
            mult = int(c1)
        if c == 'X':
            x += mult
        elif c == 'Y':
            y += mult
        elif c == 'Z':
             z += mult
        mult = 1
        if not c.isdigit() and c not in ['S','X','Y','Z']:
             print 'Error, unknown character',c
    return x,y,z