Question
The Tricolour Signal Untangle
A smart traffic system uses three signal states: 0 (red — stop), 1 (yellow — caution), and 2 (green — go). A log of
Input
The first line contains KaTeX can only parse string typed expression. The second line contains KaTeX can only parse string typed expression space-separated integers, each KaTeX can only parse string typed expression, KaTeX can only parse string typed expression, or KaTeX can only parse string typed expression.
Output
KaTeX can only parse string typed expression space-separated integers — the sorted sequence.
Example
Example 1:
Input
Example 2:
Input
Input
6
2 0 2 1 1 0Output0 0 1 1 2 2Example 2:
Input
3
0 0 0Output0 0 0