private  void dfs(int x,int y){
        if(dist<0) return;
        grid[y][x] = 1;
        for (int i=-dist;i<=dist;i++){
            for(int j=Math.abs(i)-dist;j<=dist-Math.abs(i);j++){
                int newx = x+i;
                int newy = y+j;
                if(newx>=0&&newx<width&&newy>=0&&newy<height&&field[newy].charAt(newx)=='v'&&grid[newy][newx]==0){
                    dfs(newx,newy);
                }
            }
        }
    }