Distortion of a short quasi-monochromatic signal in a resonantly absorbing medium