Classes to handle input and output.