He was so deep in thought, thinking of the problem _________he knocked into the tree without noticing it.