#include <stdio.h>
const int N = 100;
int k[101]; /* N+1 */

int main() {
     int n = 9973, i, j, y, c, K, P;
     int f = 0, g = 1, h = 1;
     int M, I, p, q, t, r;

     i = 1;
L1:  if (i > N) goto L2;
     n = (n*15551) % 19993;
     k[i] = n;
     i++;
     goto L1;
L2:  i = 2;
L3:  if (i > N) goto L16;
     y = k[i];
     K = k[i]; P = i-1;
L4:  if (h - 1 >= P) goto L5;
     f = g;
     g = h;
     h = f + g;
     goto L4;
L5:  M = h - 1 - P;
     I = g - M;
     p = f;
     q = g - f;
L6:  if ( I > 0 && K <= k[I]) goto L8;
     if (p != 1) goto L7;
     r = -I;
     goto L12;
L7:  I = I + q;
     p = p - q;
     q = q - p;
     goto L6;
L8:  if (K != k[I]) goto L9;
     r = I;
     goto L12;
L9:  if (K >= k[I]) goto L11;
     if (q != 0) goto L10;
     r = -(I - 1);
     goto L12;
L10: I = I - q;
     t = p;
     p = q;
     q = t - q;
     goto L6;
L11: goto L6;
L12: c = r;
     if (c >= 0) goto L13;
     c = -c;
L13: j = i - 1;
L14: if (j < c + 1) goto L15;
     k[j+1] = k[j];
     j--;
     goto L14;
L15: k[c+1] = y;
     i++;
     goto L3;
L16: P = N;
     printf("  ");
     i = 1;
L17: if (i > 10) goto L18;
     printf("%i\t", i);
     i++;
     goto L17;
L18: printf("\n +");
     i = 1;
L19: if (i > 9) goto L20;
     printf("--------");
     i++;
     goto L19;
L20: printf("\n");
     i = 1;
L21: if (i > P) goto L24;
     if (i%10 != 1) goto L22;
     printf("%i|", i/10);
L22: printf("%i\t", k[i]);
     if (i%10 != 0) goto L23;
     printf("\n");
L23: i++;
     goto L21;
L24: printf("\n\n");
     return 0;
}

