When we touch relatives of a dead person before janaza what will be the ehkam in sharia in" ghusle mase mayyat". Is ghusle mase mayyat wajib in that case or not when we touch the surrounding people of mayyat

Ghusl is wajib if you touch the dead body, not if you touched someone who touched it.