Henry'sfatherwasaschoolmasterandhisfather,Henry'spaternalgrandfather,althoughhebeganlifeasashepherd,taughthimselfmathematicsandastronomyandlefthislifeonthehillstobecomeaschoolmasterinLewes.Henrylearnttoplaychessatayoungageandsoonbecameinterestedinchessproblems.

Please segment the words.
Henry's father was a schoolmaster and his father, Henry's paternal grandfather, although he began life as a shepherd, taught himself mathematics and astronomy and left his life on the hills to become a schoolmaster in Lewes. Henry learnt to play chess at a young age and soon became interested in chess problems.