public static void helper(String dataSegment, int level, String temp,
			ArrayList<String> result) {
		if (level == 4) {
			if (dataSegment.length() == 0)
				result.add(temp.substring(1));
			return;
		}
		int possi = dataSegment.length() >= 3 ? 3 : dataSegment.length();
		for (int i = 1; i <= possi; i++) {
			String newOne = dataSegment.substring(0, i);
			if (isValidSegment(newOne)) {
				temp += "." + newOne;
				helper(dataSegment.substring(i), level + 1, temp, result);
				temp = temp.substring(0, temp.lastIndexOf("."));
			}
		}
	}