#!/opt/anaconda1anaconda2anaconda3/bin/python

import sys

header=True
for line in sys.stdin:
    if line.startswith('##'):
        if header:
            print line.strip()
        continue
    elif line.startswith('#'):
        if header:
           print line.strip()
           header=False
        continue
    print line.strip()
