class Solution {
Map<Character,Integer> map=new LinkedHashMap();
//Insert one char from stringstream
public void insert(char ch){
map.put(ch,map.getOrDefault(ch,0)+1);
}
//return the first appearence once char in current stringstream
public char firstAppearingOnce(){
for(Map.Entry<Character,Integer> entry:map.entrySet()){
if(entry.getValue()==1){
return entry.getKey();
}
}
return '#';
}
}