A student is investigating the magnetic field configuration near the poles of different pairs of bar magnets. They sketch four different field line patterns to represent the interaction between the poles, as shown in the diagram below.

Which diagram correctly represents the magnetic field lines and their direction?
Diagram A
Diagram B
Diagram C
Diagram D