public static int dfs(char map[][], int x, int y, int proff, int antX,
			int antY) {
		
		Queue<node> pila = new LinkedList<node>();
		pila.add(new node(x, y, map, proff, antX, antY));
		
		w:while(!pila.isEmpty()){
			node actual = pila.poll();
			x = actual.x;
			y = actual.y;
			if(actual.proff<=10){
				if (ok(actual.map, x, y)) {
					if (max >actual.proff) {
						max = actual.proff;
						break w;
					}
				}
				for (int i = 0; i < dX.length; i++) {
					tempX = dX[i] + x;
					tempY = dY[i] + y;
					if (validate(tempX, tempY) && (actual.antX != tempX || actual.antY != tempY)) {

						char actually[][] = copy(actual.map);
						actually[x][y] = actual.map[tempX][tempY];
						actually[tempX][tempY] = ' ';
						pila.add(new node(tempX, tempY, actually, actual.proff+1, actual.x, actual.y));
					}
				}
			}
		}
		

		return -1;

	}