t="" o=p=0 for i in map(ord,open('/dev/fd/0').read()): if~i&(~o&p&(o!=46)|(p==46)):i=46 t+=chr(i) o,p=p,i print t