Let terminal A be the N pole and the end near the solenoid be the S pole, then the left side of the solenoid should be the N pole, which can be obtained by the right-hand spiral law. The current flows in from the right side, so the right side of the power supply is the positive pole;
Let terminal B be the S pole and the end near the solenoid be the N pole, then the left side of the solenoid should be the S pole and the right side should be the N pole, which can be obtained by the right-hand spiral rule. The current flows in from the left side, so the left side of the power supply is the positive pole.
So the answer is: s (n); Negative (positive).