The You'reFat treadmill company has decided to enhance its treadmills so that users can run workout programs from an audio program (either online streaming audio or a CD). The program has upbeat music and encouragement from an instructor. Chirps can be inserted into the audio program to signal changes in speed and inclination. For example, when it is time to increase the treadmill speed, the music briefly stops while the treadmill reads the new speed from the chirp, and then the music resumes. The treadmill supports speeds from 0 to 7 miles per hour and inclinations from 0 to 7 degrees.
A program is a sequence of samples. Each sample ranges from 0 (the minimum value) to 9 (the maximum value). There are three samples per second. Each chirp is a sequence of bits. A 0 bit consists of two samples, each of which is 4 or 5. A 1 bit consists of two samples: the first is 0 or 1, and the second is 8 or 9. A chirp begins with the bits "01". The next three bits give the new speed, least significant bit first. These are followed by three bits for the new inclination, again least significant bit first. Note that every chirp includes both speed and inclination, even if one of them does not change. A chirp for a speed of 3 miles per hour and an inclination of 6 degrees looks like this:
| Samples | 5 | 5 | 1 | 9 | 1 | 9 | 1 | 9 | 4 | 5 | 5 | 4 | 0 | 9 | 1 | 8 |
| Bits | 0 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | ||||||||
| Meaning | Start bits | Speed: 3 mph | Inclination: 6 degrees |
The input consists of one or more programs. Each program is implicitly numbered starting at 1. The first line contains a single integer n, the number of programs that follow. Each program is a sequence of samples. Every line of a program contains exactly 30 samples, except the last line, which may contain fewer. The end of each program is marked by a sample with the value 10.
Note that:
For each audio program, first print a line "Program n", where n is the program number. Then print the time, speed, and inclination of each chirp in that audio program. Each chirp produces one line in the form "mm:ss Speed S Inclination I". Both minutes and seconds are printed with a leading zero (from "00" to "59"). The time of a chirp is the time of the first sample of its start bits, ignoring any fractional seconds. Both the speed S and the inclination I are printed as single decimal digits. There is a single space between each item in the output.