Splits query into list, splits list into left and right lists. No recursion implemented yet.