Also accept 'q' as a quit input. Print a message if invalid input is entered.