Make ready for STDIN and proper output, and submission ready.