On the exact quantum query complexity of MOD and EXACT functions