Pairing Graph PROBLEM

1 test case is not passing.plz help .My code link is https://ide.codingblocks.com/s/110686