Untitled
#!/usr/bin/env raku
use v6.d;
grammar G_24_02_a {
token TOP { <report>+ }
token report { <level>+ \v? }
token level { <value> \h? }
token value { <digit>+ }
}
my $input = chomp q:to/INPUT/;
77 6 4 2 1
1 2 7 8 9
9 7 6 2 1
1 3 2 4 5
8 6 4 4 1
12 3 99
INPUT
say G_24_02_a.parse($input);
dd $inputINFO