104

the idea is from the internet, using Floyd
but should separate each step using three dimension array.
A very nice idea.