Write a function to connect all the adjacent nodes at the same level in a binary tree.