def check_ship_direction(head, tile):
    """
    Return whether ship is placed horizontally ("H") or vertically ("V")
    """
    h_c, h_r = head[0], head[1]
    t_c, t_r = tile[0], tile[1]

    if h_r == t_r:
        return "H"
    elif h_c == t_c:
        return "V"
    else:
        raise ValueError(
            "You can only place your ship horizontally or vertically.")