implemented TracebackMap, a backtracing function to get the MAP assignments of variables when given intermediate factors and elimination ordering