Matching strategies of teachers and schools in general equilibrium