Implemented basic input function and tested for the three test cases