def get_basis(a): basis = [] for e in a: for b in basis: if e > e^b: e = e^b if e: basis.append(e) return basis def normalize(v,basis,top): for e,l in zip(basis,top): if v&(1<