We have developed an efficient implementation of the multireference Brillouin-Wigner coupled cluster method with full iterative treatment of connected singles, doubles, and triples. Its computational costs are too high for applications to larger molecules; however, it can be used as a useful tool for benchmarking approximate methods. Performance of the method has been tested on the ground and low-lying excited states of the oxygen molecule and on the singlet-triplet gap in methylene; the results are in good agreement with experimental data.