We studied the versatile shaping of a petawatt laser pulse using its relativistic transparency in a thin overdense plasma slab. The novel concept here is to use the nonuniformity of the plasma slab in its density or thickness in the transverse direction to control the pulse shaping in both the longitudinal and transverse directions. From 2-dimensional particle-in-cell simulations, we succeeded in fabricating a front shape concave to the propagation direction, an extreme case of transverse shaping. A 1-dimensional analytic formula was then applied to predict the transverse shape, which showed good agreement with the simulations.