I dont know how to make a DFS call

plz help me to code the DFS call after we iterate through the query

@dhirenkinha
you can refer to this code to understand