In a tournament with 8 teams, each team played against the other teams once. In the tournament, 3 referees were assigned from 4 available referees for each match, and all referees worked an equal number of matches.
Accordingly, how many matches did each referee work?
A) 14
B) 15
C) 18
D) 20
E) 21