eolymp
bolt
Try our new interface for solving problems
Problems

A Famous Music Composer

A Famous Music Composer

Mr. B is a famous music composer. One of his most famous work was his set of preludes. These \textbf{24} pieces span the \textbf{24} musical keys (there are musically distinct 12 scale notes, and each may use major or minor tonality). The \textbf{12} distinct scale notes are: Five of the notes have two alternate names, as is indicated above with equals sign. Thus, there are \textbf{17} possible names of scale notes, but only \textbf{12} musically distinct notes. When using one of these as the keynote for a musical key, we can further distinguish between major and minor tonalities. This gives \textbf{34} possible keys, of which \textbf{24} are musically distinct. In naming his preludes, Mr. B used all the keys except the following \textbf{10}, which were named instead by their alternate names: Write a program that, given the name of a key, give an alternate name if it has one, or report the key name is unique. \InputFile Each test case is described by one line having the format "\textbf{note tonality}", where "\textbf{note}" is one of the \textbf{17} names for the scale notes given above, and "\textbf{tonality}" is either "\textbf{major}" or "\textbf{minor}" (quotes for clarify). \OutputFile For each case output the required answer, following the format of the sample.
Time limit 1 second
Memory limit 32 MiB
Input example #1
Ab minor
D# major
G minor
Output example #1
Case 1: G# minor
Case 2: Eb major
Case 3: UNIQUE
Source ACM ICPC Fudan Local Programming Contest 2012