Ritt's Second Theorem in Arbitrary Characteristic