Gift
Time limit1sMemory limit1024 MB
Reads three uppercase letters and three digits, then prints the password with letters in ascending order and digits in descending order, alternating letter and digit.
- Level
Easy2 of 10
- Topics
- Sorting, Implementation
- Solved
- No attempts yet
Problem
On the first day of school, Svetla received a backpack as a gift. It has a secret lock, and she must enter the correct password to open it. The password has 6 characters: 3 digits and 3 uppercase Latin letters. The second, fourth, and sixth characters are digits, and the first, third, and fifth characters are uppercase Latin letters. The digits in the password are arranged from largest to smallest, and the letters are in the order they appear in the Latin alphabet.
Input
The first line of standard input contains, in order, three distinct uppercase Latin letters and three distinct digits.
Output
The program must print the six characters of the correct password.