public static String removeDuplicates(String input){
		if(input == null || input == "")
			return input;
		
		char[] inputs = input.toCharArray();
		
		if(inputs.length == 1)
			return input;
		
		int flag = 1; // Characters before index flag are all distinct
		for(int i=1; i<inputs.length && flag <inputs.length; ){
			int j = 0;
			for(; j<flag; j++){
				if(inputs[j] == inputs[i]){
					i++;
					break;
				}
			}
			if(j == flag){
				inputs[flag] = inputs[i];
				i ++;
				flag ++;
			}
			
		}
		return String.valueOf(inputs).substring(0, flag);
	}