X-ray lasing in thick foil irradiation geometry