Problem C
Preludes
Frederic Chopin was a Polish music composer who lived from
1810–1849. One of his most famous works was his set of
preludes. These
Five of the notes have two alternate names, as is indicated
above with the equals sign (e.g.
In naming his preludes, Chopin used all the keys except for
the following
Write a program that, given the name of a key, will give an alternate name (if it has an alternate) or report that the key name is unique.
Input
Each input line contains one test case. There are at least
one and at most five cases, and the end of input is at the end
of file. Each line has the format “note
tonality”, where note is one of the
Output
For each case, output ‘Case X:’ (where
X is the case number starting at
Sample Input 1 | Sample Output 1 |
---|---|
Ab minor D# major G minor |
Case 1: G# minor Case 2: Eb major Case 3: UNIQUE |