Help i will give brainalist

what was the name of the group of ottoman religious advisers that administered the legal system and schools
A.pasha
B.vizier
C.Politicos
D.ulema