Complete cut-to-width for modular arithmetic