public static void dfs(int i, int value) {

		if (fin || dp[i][value + MAX] == true)
			return;

		dp[i][value + MAX] = true;

		if (i == p + 1) {

			if (value == arr[p + 1]) {
				for (int j = 1; j < arr.length - 1; j++) {
					if (j != arr.length - 2)
						out.append(arr[j] + "" + ops[j]);
					else
						out.append("" + arr[j]);
				}
				out.append("=" + arr[p + 1] + "\n");
				fin = true;
			}
			return;
		}

		for (int j = 0; j < 4; j++) {
			int res = ok(j, value, arr[i]);
			// 5 + 3
			if (res != 999999) {
				ops[i - 1] = OP[j];
				dfs(i + 1, res);
			}
		}

	}