/* package whatever; // don't place package name! */

import java.util.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
	public static void main (String[] args) throws java.lang.Exception
	{
		String s1 = "transaction";
        System.out.println(firstUniqueChar(s1));

        String s2 = "reverse";
        System.out.println(firstUniqueChar(s2));
	}
	
	public static char firstUniqueChar(String s) {
        char temp;
        for (int i = 0; i < s.length(); i++) {
            temp = s.charAt(i);
            if (countChars(s, temp) == 1) {
                return temp;
            }
        }
        return ' ';
    }
    
    public static int countChars(String s, char c) {
        char[] chars = s.toCharArray();
        int result = 0;
        for (int i = 0; i < chars.length; i++) {
            if (chars[i] == c) {
                result++;
            }
        }
        return result;
    }
}