Eb Alto Saxophone Player I have a Eb Alto Saxophone. My fingers move A LOT when playing some music, and I'm quite interested in how many times each finger PRESSES its button. Assume that the music is composed of only 8 kinds of note. They are: C D E F G A B in one octave and C D E F G A B in a higher octave. We use c,d,e,f,g,a,b,C,D,E,F,G,A,B to represent them. The fingers I use for each note are: c: fingers 2-4, 7-10 d: fingers 2-4, 7-9 e: fingers 2-4, 7, 8 f: fingers 2-4, 7 g: fingers 2-4 a: fingers 2, 3 b: finger 2 C: finger 3 D: fingers 1-4, 7-9 E: fingers 1-4, 7, 8 F: fingers 1-4, 7 G: fingers 1-4 A: fingers 1-3 B: fingers 1, 2 (Note that every finger is controlling a specified button, different fingers are controlling different buttons.) Write a program to help the number of times each finger presses its button. A finger presses the button if the button is needed for a note, but not needed for the previous note. Also, if it is the first note, every finger required presses its button. Input The first line of the input is a single integer t (1 <= t <= 1000), indicating the number of test cases. For each case, there is only one line containing the song. The only allowed characters are {'c','d','e','f','g','a','b','C','D','E','F','G','A','B'}. There are at most 200 notes in each song, and a song may be empty. Output For each test case, print 10 numbers indicating the number of presses for each finger. Numbers are separated by a single space. Sample Input ------------ 3 cdefgab BAGFEDC CbCaDCbCbCCbCbabCCbCbabae Sample Output ------------- 0 1 1 1 0 0 1 1 1 1 1 1 1 1 0 0 1 1 1 0 1 8 10 2 0 0 2 2 1 0 (This problem was modified from http://acm.uva.es/p/v104/10415.html. Original Author: Rujia Liu)