# Sequences -- Problem H (15 points)

An arithmetic sequence is a list of numbers with the property that the difference between consecutive numbers is constant, eg 2,4,6,8,10,.......

A geometric sequence is a list of numbers with the property that the ratio between consecutive numbers is constant, eg 2,4,8,16,32,.........

A Lucas sequence is a list of numbers with the property that each number, after the second, is the sum of the previous two eg 2,4,6,10,16,.......

The input file for this problem is called PROBLEMH.DAT and consists of several sets of 4 to 6 numbers, one number per line. Each number will be a non-negative integer of no more than 9 digits. Consecutive lines can be regarded as forming a sequence, with each sequence having at least four numbers in it. Each sequence is terminated by a 0, which will not be part of any sequence. The file will be terminated by a 0 following immediately after the 0 which terminates a sequence.

Output, which must be written to standard output (the screen), must be one number for each sequence in the input. For each input sequence you must print out the next number in the sequence, leftjustified on the line. The number you are to print will be a non-negative integer with no more than 9 digits. If the sequence is not one of the three types above described above print out the word "Unknown".

```2
4
6
8
0
2
4
6
10
0
16
8
4
2
0
999999999
999999999
999999999
999999998
0
0
```

```10
16
1
Unknown
```