Implement a robust shell CLI | Amazon Interview Question