bcdef
abbbc
 z
y
 reddit
abcdef
 abc
aaa
 y
z
 cbxz
aaaa

bccdb
 z
 dfdeed
 aab
 y
 abac

  var judge = true;
  Array.prototype.lower_bound = function(x) {
    var arr = this;
    if(arr.length === 0) { return 0; }
    var lb = function(l, r, x) {
      if(l < 0) { return 0; }
      if(l >= r ) {
        if(x <= arr[l]) { return l; }
        return l + 1;
      }
      var m = (l + r) / 2 | 0;
      if(x > arr[m]) {
        return lb(m + 1, r, x);
      } else {
        return lb(l, m, x);
      }
    }
    return lb(0, this.length - 1, x);
  };

  Array.prototype.insert = function (val) {
    var idx = this.lower_bound(val);
    this.splice(idx, 0, val);
    return this;
  };

  Array.prototype.remove = function (val) {
    var idx = this.lower_bound(val);
    this.splice(idx, 1);
    return this;
  };

  var s0 = readline().split('').sort();
  var s1 = readline().split('').sort();
  var len = s0.length;
  s0 = s0.slice(0, ((len / 2) | 0) + (len % 2 === 0 ? 0 : 1));
  s1 = s1.slice(len - (len / 2 | 0));
  judge||console.log(s0);
  judge||console.log(s1);
  judge||console.log();
  var res = [];
  var turn = true;
  var l = 0;
  var r = len - 1;
  for(var i = 0; i < len; i += 1) {
    if(turn) {
      var c = s0.shift();
      if(s1.lower_bound(c) === s1.length) {
        s0.push(c);
        c = [s0.pop()];
        res[r] = c;
        r -= 1;
      } else {
        res[l] = c;
        l += 1;
      }
    } else {
      var c = s1.pop();
      if(s0.lower_bound(c) === 0) {
        s1.push(c);
        c = [s1.shift()];
        res[r] = c;
        r -= 1;
      } else {
        res[l] = c;
        l += 1;
      }
    }
    turn = !turn;
    judge||console.log(s0);
    judge||console.log(s1);
    judge||console.log(res);
    judge||console.log();
  }
  print(res.join(''));