What is solenoid when the solenoid behave as a magnet draw the pattern of a magnetic field produced inside it showing the direction of a magnetic field lines

sai's image