You are given a list of non-negative integers a_1, a_2, \ldots, a_N. Replace the list with a new one: each -th entry of the new list is the absolute value of a_k - a_{k+1}, with indices wrapping at the end (so the -th entry is |a_N - a_1|). Determine how many iterations are needed to obtain a list in which all entries are equal.
For example, for N = 4 and the list , the step-by-step iterations are:
, , , ,
Thus, in this example, iterations are needed.
The input will contain several test cases. Each case consists of two lines. The first line contains an integer (2 \leq N \leq 20), the number of elements in the list. The second line contains the list of integers separated by spaces. Input ends with N = 0.
For each case, print one line with the case number and the number of iterations in the format shown in the sample output. If the list does not reach the required form in iterations, print not attained.
Example 1