while(d=readline(p=parseInt))print((p(d[0],12)+p(d[2],12)).toString(12).toUpperCase())