for([i,x]in readline(r='').match(/\S+/g))x='0x'+x,(i%=9)?r+=String.fromCharCode(y|x<<9-i):0,y=x>>i print(r)