The field due to a magnet is non-uniform. Therefore, it exerts both a net force and a torque on the nails which will translate arid also rotate the nails before striking to north pole of magnet with their induced south pole and vice-versa. Hence, option (d) is correct.