In the diagram above, if the south-poles of two magnets strokes steel bar, the polarities…