#C10072. Bakery Order Translator
Bakery Order Translator
Bakery Order Translator
You are given a string that represents a bakery order. Each character in the string corresponds to a bakery item based on a predefined menu. The mapping is as follows:
- A → Apple Pie
- B → Banana Bread
- C → Carrot Cake
- D → Doughnut
- E → Eclair
For any character that does not belong to the menu, simply ignore it. Your task is to translate the order into the corresponding bakery items. The order of the items in the output should reflect the order of the valid characters in the input string.
Note: If there are no valid characters, the output should be empty.
You can express the mapping concisely by letting \( M: \{A \to \text{Apple Pie},\, B \to \text{Banana Bread},\, C \to \text{Carrot Cake},\, D \to \text{Doughnut},\, E \to \text{Eclair} \} \).
inputFormat
The input is provided via standard input (stdin) as a single line string representing the order.
outputFormat
Output the corresponding bakery items to the standard output (stdout). Each valid bakery item should be printed on its own line, in the order they appear in the input. If there are no valid items, output nothing.
## sampleABCDE
Apple Pie
Banana Bread
Carrot Cake
Doughnut
Eclair
</p>