Triangular pyramid BCDG is cut from cube ABCDEFGH. The triangular pyramid is then placed on a surface with triangle BCD as the base. Given that the side length of the cube is $12,$ find the height of the pyramid.
The answer is 6.