def find_possible_orientations(field, coords, length):
    """
    Find possible orientations for a ship.

    ARGUMENTS:
    field - field in which to find orientations
    coords - origin coords of ship in format  [x, y]
    length - length of ship in format int(length)

    RETURNS:
    list of possible orientations(each orientation characterized by vector)
    """
    orientations = [(-1, 0), (0, -1), (1, 0), (0, 1)]
    possible = []
    # for every possible orientation
    for vctr in orientations:
        # if outside the field, skip to next orientation
        if coords[0]+(length-1)*vctr[0] > 9 or coords[1]+(length-1)*vctr[1] > 9:
            continue
        if coords[0]+(length-1)*vctr[0] < 0 or coords[1]+(length-1)*vctr[1] < 0:
            continue
        # for length of the ship
        for i in range(length):
            position = []
            position.append(coords[0]+i*vctr[0])
            position.append(coords[1]+i*vctr[1])
            # if current position occupied, skip to next orientation
            if not field[position[0]][position[1]]["content"] == "water":
                break

            # if length unnoccupied, add vector to possible orientations list
            if i == length-1:
                possible.append(vctr)
    return possible