Line 1: single integer size, the dimension of the square board.
Line 2: size space-separated integers columnMarker, the hints for each column.
Line 3: size space-separated integers rowMarker, the hints for each row.
Line 4: single integer shipsCount, the number of ships to be placed on the board.
Line 5: shipsCount space-separated integers shipLength, the length of each ship in the fleet.
Next size lines: each line contains size characters representing a row of the board. Each character can be:
. : unresolved cell^ : bow of a vertical ship (facing north)v : stern of a vertical ship (facing north)< : bow of a horizontal ship (facing west)> : stern of a horizontal ship (facing west)# : middle segment of a shipo : single-cell ship (submarine)x : water cell