Fixed BF_GS.py and print_parents

This has been tested against test cases 1 and 2. But fails for test 3 -
gives a "Node instance has no attribute '__coerce__' " error