Added print marginal to sum-product algorithm