import GHC.IO.Encoding g b=take 7$drop b$s s=[0,2,3,5,7,8,10]++map(+12)s n"♯"=1 n""=0 n _= -1 f(x:r)|b<-mod(fromEnum x-2)7=zipWith3(\x y z->cycle"ABCDEFG"!!z:["𝄫","♭","","♯","𝄪"]!!(y-x+n r+g b!!0-1))(g b)(g 2)[b..] m@main=setLocaleEncoding utf8>>getLine>>=putStrLn.unwords.f>>m