while 1:o="";a,b=raw_input().split();exec"a,b=sorted([a,b]);o+=b[:1];b=b[1:];"*99;print o