First 3 segments of the body. Sometimes the 2nd and 3d segments are fused. Before pupation the thorax is swollen and the thorax, legs and wings of the adult are developing.