public void separate(Set<String> set, String s, int[] nums, int pos, int start) {
		if(pos == 4) {
			if(start != s.length()) return; // bug3: make sure every digit is used!
			StringBuilder sb = new StringBuilder();
			sb.append(nums[0]);
			for(int i = 1; i < 4; i++) sb.append("." + nums[i]);
			set.add(sb.toString());
			return;
		}
		for(int i = 1; i < 4; i++) {
			if(start + i <= s.length() - 3 + pos) { // bug1: so stupid here! need (3 - pos)
				String str = s.substring(start, start + i);
				int temp = Integer.parseInt(str);
				if(temp < 256 && (i == 1 || s.charAt(start) != '0')) { // bug2: "01" is illegal!
					nums[pos] = temp;
					separate(set, s, nums, pos+1, start + i);
				}
			}
		}
	}