Wrote out the beginning of the ternary code.