Learning to order basic components of structured complex objects