407113: GYM102697 084 Fine Tuned

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

084. Fine Tunedtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

On a regular acoustic guitar, the open (regular) strings are tuned with these notes, starting from lowest to highest:

E-A-D-G-B-E

You can change these values into different notes using the tuning pegs on the top of the guitar, twisting it forwards or backwards to change the pitch of the strings. One full rotation of the peg would be equivalent changing the pitch by one semitone, or a half step in pitch. For instance, using the piano keys up above, F would move up to F#, or if moved down a semitone, would be moved down to an E.

When given certain note values, your job is to tune the song based on how many semitones you are given. This is known as transposing.

Input

The first line will contain an integer n which will denote the semitone value you are to transpose the piece to. The second line will contain a space-separated line of strings ranging from the notes A-G#.

Output

Output a new line of the transposed piece, with each note being space-separated.

ExamplesInput
-3
E A D G B E
Output
C# F# B E G# C#
Input
3
E A D G B E
Output
G C F A# D G

加入题单

上一题 下一题 算法标签: