Anyone up for some linear algebra? We could probably have an alg to solve each piece independently, and then concat and canonicalize.