If you have two specific lessons in the class, which can not follow in specified order (A then B), you can use this advanced relation: