Studies of the formation of thermosetting resins. XII. Computer simulation of the reactions of phenols with formaldehyde