def seq_to_subset(seq_sol, m, n):
    """Convert sequence solution (e.g.: ['r2','c3']) into subset solution (e.g.: [[0,1],[0,0,1]])"""
    assert isinstance(seq_sol, list)
    subset_sol = [[0]*m,[0]*n]
    for e in seq_sol:
        if e[0] == 'r':
            subset_sol[0][int(e[1:])-1] = (1-subset_sol[0][int(e[1:])-1])
        elif e[0] == 'c':
            subset_sol[1][int(e[1:])-1] = (1-subset_sol[1][int(e[1:])-1])
        else:
            raise RuntimeError(f'This seq_sol is bad written: {seq_sol}')
    return subset_sol