#!/usr/bin/perl -w

use v5.16;

my @sig = split //, <>;
pop @sig;
@sig = (@sig) x 10_000;

my $off = join('', @sig[0..6]);
say "off=$off";
my @mul = qw(0 1 0 -1);
for my $step (1 .. 100) {
	for my $i (reverse ($off .. $#sig-1)) {
		$sig[$i] = ($sig[$i] + $sig[$i+1]) % 10;
	}
	say "step $step: ", @sig[$off .. $off + 7];
}
