Answer:
an adverb
Step-by-step explanation:
Indeed, an adverb is one of the parts of speech in the English language. Basically, it is often used to modify verbs or groups of words in a sentence by telling us about the time, place, manner, or degree of what is been said.
So in this example, the word "long" acts as an adverb that modifies the verb "walk". In other words, it tells us the degree of walk the grandmother takes with her grandchild. Thus, the degree of the walk they used to have is expressed.