Before revision:  For any positive integer 4\leq q\leq n, our algorithm takes q^{ 11n +o(n)} time and requires poly(n)\cdot q^{16n/q^2} memory.
After revision:  For any positive integer 4\leq q\leq n, our algorithm takes q^{ 13n +o(n)} time and requires poly(n)\cdot q^{16n/q^2} memory.