def METHOD_NAME(s):
    if not ('{' in s and ',' in s and '}' in s):
        return [s]
    result = []
    right = s.find('}')
    left = s[:right].rfind('{')
    prefix, choices, suffix = s[:left], s[left + 1:right], s[right + 1:]
    for choice in choices.split(','):
        result.extend(METHOD_NAME(prefix + choice + suffix))
    return result