#include<iostream>
#include<cstring>
#include<unordered_map>
#include<climits>
using namespace std;


char nonRepeatingCharacter(string str){
  
  //Write your code here
    int idx = 0;
    int arr[256] = {};
  	for(int i=0;i<str.length();i++){
    	arr[str[i]]++;  
  	}
    for(int i = 0; i<256 ; i++){
        if(arr[str[i]]==1){
            int idx = min(idx,i);
            return str[idx];
        }
    }
        
    return str[0];
}