Output optimal trill fingerings Note: all array references in this post are zero-indexed.

When playing the piano, two notes on the same key must be pressed with two different fingers. You could use the same finger, but it doesn't sound as good. At least, according to my piano teacher. I can't hear any difference.

The challenge is to take a space-separated list of 3 integers: Starting finger, ending finger, and length of repeating notes, and output the optimal sequence of finger numbers to match the input.

All piano jargon aside, output a string of numbers based on the input, where each number is +1/-1 the one before it, all numbers are between 1 and 5, the sequence is args[2] digits long, starting with args[0] and ending with args[1], and is formatted as below.

The input can be command line arguments, values on the stack (for >&lt;> users), STDIN, or any other conventional method.

Output will be a list of numbers, with these being valid outputs.


[1, 2, 3, 4, 5]
(1 2 3 4 5)
"12345"
12345*
1-2-3-4-5**
1 2 3 4 5**


For each asterisk on the style above, compute the following to calculate your score:

final-score = code.length * (1.00 - (asterisks * 0.05));


You can assume the first two params will be between 1 and 5, but if it handles at least 0-9, multiply your code by 95%. 

If the last digit is less than 2, or the input parameters are impossible, error however you like, or just exit.



Finger numbers on the piano work like this, however this is not integral to the challenge.

1 | Thumb
2 | Index finger
3 | Middle finger
4 | Ring finger
5 | Pinky (finger)




Sample input and output:

Input: 1 2 2
Output: 1 2

Input: 1 4 8
Output: 1 2 3 2 3 2 3 4

Input: 2 3 10
Output: 2 3 2 3 2 3 2 3 2 3

Input: 5 2 1
Output: Error

Input: 1 2 5
Output: Error

Input: 5 1 5
Output: 5 4 3 2 1

Input: 1 1 1
Output: 1



These do not have to be handled correctly.

Input: 1 6 6
Output: 1 2 3 4 5 6

Input: 0 9 8
Output: Error
Pyth, 36 * .95 * .90 = 30.78

jd+JrFAQ&lt;*vz,H.xeJhH?&amp;%K-vzlJ2&gt;K0K.q


Test suite

Outputs space separated integers and can handle arbitrary integer inputs, so it qualifies for both bonuses.

Input format:

length
starting finger, ending finger


The output is constructed by starting with a range from the starting finger to the ending finger, then repeating the end of that range and the ending finger the necessary number of times. Exiting is done via explicit checks for the length of the second step being odd and positive, or else .q, Pyth's exit function is called.