Theory of Superexchange Interaction. I. KMnF3