Implement INPUT instruction, with test cases