<Tr> <Th> Alma mater </Th> <Td> Allahabad University </Td> </Tr> <P> Narayan Datt Tiwari (born 18 October 1925) is an Indian politician . He was formerly in Praja Socialist Party and later joined Indian National Congress . </P> <P> He was thrice Chief Minister of Uttar Pradesh (1976--77, 1984--85, 1988--89) and once Chief Minister of Uttarakhand (2002--2007). In 1986--1987, he served in Prime Minister Rajiv Gandhi's cabinet as Minister for External Affairs . He was serving as Governor of Andhra Pradesh from 2007 until 2009 . He's the only Indian to have served as Chief Minister of 2 states . </P> <P> Narayan Datt Tiwari was born in 1925, in the village of Baluti, Nainital district . His father Poornanand Tiwari was an officer in the forest department, and who later resigned and joined the Non-cooperation movement . Tiwari received his education at various schools including, M.B. School, Haldwani, E.M. High School, Bareilly and C.R.S.T. High School, Nainital . </P>

Who is the only person to have served as the chief minister of both uttar pradesh and uttarakhand
find me the text answering this question