Loopy BP done (all test cases passed)