while 1: s=raw_input().strip() if'$'