Add a method to write input.