public String simulate(String s) {
		char[] charArray = s.toCharArray();
		for (int i = 0; i < charArray.length - 1; i++) {
			if (charArray[i] == 0)
				continue;
			for (int j = i + 1; j < charArray.length; j++) {
				if (charArray[j] == 0)
					continue;
				if (charArray[i] == charArray[j]) {
					charArray[i] = charArray[j] = 0;
					i = -1;
				}
				break;
			}
		}
		String ret = "";
		for (char c : charArray) {
			if (c > 0)
				ret += String.valueOf(c);
		}
		return ret;
	}