<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def interpret(self):
 """ Main interpreter loop. """

        self.print_menu()
        while True:
            try:
                event = input()
                if event == 'q':
                    return
                event = int(event)
                event = self.model.events[event-1]
            except Exception:
                print('Invalid input')

            self.event(event)
            self.print_menu()