The potential energy En of the parallelepiped in the different positions will be.:
E1 = 2 mgl when it lies on its smallest face;
E2 = mgl when it lies on its next largest face;
E3= 1/2 mgl when it lies on its largest face.
The most stable position, corresponding to the minimum value of the potential energy of the body, will be in the last of the above three cases.