Pretty printing optimized version