However, this time, there is a restriction. B can only be performed after A. In other words, A must be performed before B can, and ACB is also accepted.
Your task is to find a general formula for X number of events, and Y number of restrictions.
None of the events is mentioned in more than one restriction.