In a medium saucepan, stir together the sugar, cocoa and cornstarch. Gradually whisk in milk and egg. Stirring constantly, bring to a boil over medium heat, and cook until thickened. Remove from heat, and quickly stir in the vanilla and almond extracts. Garnish as desired, and serve warm.