solution to 'input output'