Hebi-Ichigo

Description
Hebi-Ichigo is a number placement logic puzzle where strings of numbers must be entered into a grid.

Rules
The objective is insert strings of numbers 1 to 5, subject to the following rules:


 * 1) Numbers form a sequential string of five from 1 (head) to 5 (tail) connected horizontally and/or vertically with no branches.
 * 2) Strings cannot touch other strings horizontally or vertically, diagonally is allowed.
 * 3) Strings are not allowed to appear in front of the head of another string. This being the line of sight from the side of the 1 opposite the 2, to the nearest black cell or the edge of the grid.
 * 4) The numbers in the black cell shows the value of the nearest number in the direction of the arrow which must appear before the nearest black cell. A 0 indicates there is no string in the direction of the arrow until the nearest black cell or the edge of the grid.

Example
A standard 10x10 hebi-ichago and its solution.