#!/usr/bin/env python3

class Solution:
    def findTheDifference(self, s, t):
        """
        :type s: str
        :type t: str
        :rtype: str
        """
        sn = len(s)
        s_dict = {}
        t_dict = {}

        for i in range(sn):
            if s[i] not in s_dict.keys():
                s_dict[s[i]] = 1
            else:
                s_dict[s[i]] += 1

            if t[i] not in t_dict.keys():
                t_dict[t[i]] = 1
            else:
                t_dict[t[i]] += 1 


        if t[-1] not in t_dict.keys():
            t_dict[t[-1]] = 1
        else:
            t_dict[t[-1]] += 1


        for k in t_dict.keys():
            if k not in s_dict.keys():
                return k
            else:
                if s_dict[k] != t_dict[k]:
                    return k






       




if __name__ == '__main__':



    s = 'abcd'
    t = 'abcde'

    s = "<KEY>"

    t = "<KEY>"


    s = input()
    t = input()



    sol = Solution()
    res = sol.findTheDifference(s,t) 
    print(res)