Failing 1 test case for the problem Print all Nodes at distance K

I am unable to pass a test case for the problem Print all nodes at distance K. The code works fine for the sample input given, so I am asuuming that I have missed a case of the problem. Please help

Here is my code : https://ide.codingblocks.com/s/374047

hello @Yash5646

a)
image

u missed this case

b) also use multiset or vector in place of set becuase set will discard reperated values