s=->t,r,c{c>0?t.gsub(/[A-O]{2}[a-o]/).map{|j|s[t.tr(j,j.swapcase),r+"Peg #{j[0].ord-64} jumps Peg #{j[1].ord-64} to Hole #{j[2].ord-96}.\n",c-1]}:$><