Getting linked data from two different tables

Hello, I need some help getting some data in cakePhp 3.3.

I have a table events linked to a table guests and a table courses with belongsToMany relations thanks to 2 tables events_guests and courses_events.
For every Event, I have many Guests and Courses.

In a view page for my Guests, I can easily see the Events they attended to but how can I get the lists of the Courses they had? (preferably in alphabetic order).

In my view, I can loop through all the events, and get the related Courses but it seems to be a wrong way to do it.

Thanks for your help.

Just to clarify, you want to see what courses a guest attended at a specific event?

No the list of all courses he had overall. He might have had 2 or 3 time the same course.