O=[] while 1:O+=input(),;print(*map(max,zip(*O)),sep='')