for(;[a,,b]=readline();)print(("0x"+a- -("0x"+b)).toString(12).toUpperCase())