I am sure that there is a mathematical approach to this neat little conundrum, but I have to use a longer logical approach. Stage one is to identify the remaining entrance (we already know A and F) and exits (we already know B). As B is an exit, either C or E must be the remaining entrance, leaving D as the second exit.
E cannot be an exit as it must be followed by B or D, both of which we know to also be exits, so E must be the third entrance and therefore C the third exit.
Now someone else can line them up in the correct order if I don't get there first...!