Generate Search Tree