#include<iostream>#include<algorithm>usingnamespace std;chargetChar(int x){if(x <10){return x +'0';}else{return x -10+'a';}}intgetInt(char c){if('0'<= c && c <='9'){return c -'0';}else{return c -'a'+10;}}
string add36Strings(string num1, string num2){int i = num1.size()-1, j = num2.size()-1;int x, y, flag =0, sum =0;
string res;while(i >=0|| j >=0|| flag){
x = i >=0?getInt(num1[i]):0;
y = j >=0?getInt(num2[j]):0;
sum = x + y + flag;
res +=getChar(sum %36);
flag = sum /36;
i--;j--;}reverse(res.begin(), res.end());return res;}intmain(){
string num1, num2, res;
cin>>num1>>num2;
res =add36Strings(num1, num2);
cout<<res;return0;}