Word Problem for Noncontracting Grammars