Implement input prompt.
Implemented break conditions and printing.