MUSIC2 - A Famous Music Composer

Mr. B is a famous music composer. One of his most famous work was his set of preludes. These 24 pieces span the 24 musical keys (there are musically distinct 12 scale notes, and each may use major or minor tonality). The 12 distinct scale notes are:

A A# = BbBCC# = DbD
D# = EbEFF# = GbGG# = Ab


Five of the notes have two alternate names, as is indicated above with equals sign. Thus, there are 17 possible names of scale notes, but only 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 34 possible keys, of which 24 are musically distinct.

In naming his preludes, Mr. B used all the keys except the following 10, which were named instead by their alternate names:

Ab minorA# majorA# minorC# majorDb minor
D# majorD# minorGb majorGb minorG# major


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.

Input

Each test case is described by one line having the format note tonality, where note is one of the 17 names for the scale notes given above, and tonality is either major or minor. All notes names will be uppercase.

Output

For each case output the required answer, following the format of the sample.

Example

Input:
Ab minor
D# major
G minor

Output:
Case 1: G# minor
Case 2: Eb major
Case 3: UNIQUE

Added by:Fudan University Problem Setters
Date:2012-05-25
Time limit:0.5s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:ACM/ICPC World Finals 2012 - Dressing Rehearsal Contest, also used in FDU Local Contest 2012

hide comments
2012-10-01 15:02:02 Gaurav Srivastava
when to terminate output??????????????????????

2012-08-09 09:33:13 007: Name stolen
when to terminate the input
2012-07-31 03:40:52 Simón Murillo Gómez
Easy one! just look at the first table.
2012-06-30 00:39:43 sachin tendulkar
easy! 2nd table is given in vain
2012-06-20 08:15:52 Shubham Somani
:)

Last edit: 2012-09-19 16:34:13
2012-06-19 12:01:34 spock
very misleading problem statement..else there is nothing in this problem..
2012-06-19 11:51:17 neerajcrespo
tutorial problem.
2012-06-14 10:34:41 Shubham
2nd table has nothing to do with the problem.
2012-06-11 09:52:35 anuj kumar jain
will only the keys mentioned in the second matrix have the alternate names?
2012-06-08 07:23:31 Abhishek Sanghai
misleading problem statement
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.