Full console code with user input