$<.map{|s|*a=0;s.bytes{|c|a=[a,t=[a.reduce(c&1,"+*"[c&1])],a[60/c..-c/60],t,a.flat_map{|e|[e-1,e+1]}][c/29]};p a}