#include #include using namespace std; int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); string X, Y; cin >> X >> Y; int a = X.size(), b = Y.size(); // 条件を確認:Sの奇数位置文字数 = |X|, 偶数位置文字数 = |Y| if (!(a == b || a == b + 1)) { cout << "?"; return 0; } string S; int i = 0, j = 0; // S の長さは a + b で、0-indexでは偶数位置が奇数文字に対応する for (int pos = 0; pos < a + b; pos++){ if (pos % 2 == 0) { // 奇数文字(1-indexed): X の文字 S.push_back(X[i++]); } else { // 偶数文字(1-indexed): Y の文字 S.push_back(Y[j++]); } } cout << S; return 0; }