The mechanism of formation of ammonia synthesis catalyst