Measurement of the groomed jet mass in PbPb and pp collisions at root s(NN)=5:02 TeV