#include <iostream>
#include <cmath>
#include <vector>
#include <algorithm>
#include <iterator>
#include <numeric>
#include <string>
#include <cstring>
#include <ctime>
#include <set>
#include <list>
#include <sstream>
#include <iomanip>
#include <map>
#include <stack>
#include <unordered_map>
#include <queue>
#include <deque>
#include <chrono>
#include <fstream>
#include <sstream>
#include <ostream>
#include <assert.h>
#include <cstdint>
#define ll long long
#define sync ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0)
#define PI 3.14159265358979323846 
#define all(c) (c).begin(), (c).end()
using namespace std;

void solve() {
	string a, b;
	cin >> a >> b;
	string ans;

	if (b.length() > a.length()) a = string((int)b.length() - a.length(), 47) + a;
	else if (a.length() > b.length()) b = string((int)a.length() - b.length(), 47) + b;

	for (int i = 0; i < a.length(); i++) {
		if (a[i] > b[i]) ans += a[i];
		else if (a[i] == b[i]) ans += string(2, a[i]);
		else ans += b[i];
	}
	cout << ans << '\n';
}

int main() {
	sync;
	int t = 1;
	//cin >> t;
	while (t--) {
		solve();
	}
}