12. (10 points) Four identical cubes are stacked to form the solid shown in the figure. The maximum number of black dots on all the surfaces (including the bottom) of the solid is $\qquad$

Translate the above text into English, please retain the original text's line breaks and format, and output the translation result directly.
【Analysis】The total number of dots on each cube is $1+2+3+4+5+6=21, 4$ cubes have a total of 84 black dots. Since we are asked to find the maximum total number of black dots, the number of dots on the hidden faces should be as few as possible. Then, based on the number of dots on adjacent sides, we can deduce the number of dots on the hidden faces of each cube, and solve the problem.

【Solution】Solution: The total number of dots on each cube is $1+2+3+4+5+6=21, 4$ cubes have a total of 84 black dots. Since we are asked to find the maximum total number of black dots, the number of dots on the hidden faces should be as few as possible.

Based on the number of dots on adjacent sides, we can deduce:
The bottom face of the top cube has 5 dots; the left face of the right cube has 6 dots; the face opposite to 5 on the middle cube is 2, so the total number of dots on the hidden faces is $21-5-2-6=8$; the right face of the left cube has 6 dots.

Therefore, the maximum total number of black dots on the surface (including the bottom) of the solid is $84-(5+6+8+6)=84-25=59$. The answer is: 59.