Write main.