x=':' while 1: t=input() u=x>t if u:x=t print(u+0)