def write(solution, filename):
    filename = 'output/' + filename
    with open(filename, 'w') as fo:
        fo.write(str(len(solution)) + '\n')
        for elt in solution:
            fo.write(str(len(elt)) + ' ' + str(elt).strip('[]').replace(',',
                ''))
            fo.write('\n')
        fo.close

2646195c109f46718faefee2b45f3032ad8e17d9
<mask token>

def write(solution, filename):
    filename = 'output/' + filename
    with open(filename, 'w') as fo:
        fo.write(str(len(solution)) + '\n')
        for elt in solution:
            fo.write(str(len(elt)) + ' ' + str(elt).strip('[]').replace(',',
                ''))
            fo.write('\n')
        fo.close
