# left to right, pre-order depth first tree search, iterative. O(n) time/space
def depthFirstSearch(root):
st = [root]
while st:
current = st.pop()
print(current)
if current.right: st.append(current.right)
if current.left: st.append(current.left)