Monte Carlo methods for structured data