#!/usr/bin/env python
# -*- coding: utf-8 -*-

import re
import sys

RE_COMMENTS = re.compile(r'^\s*--.*?\n|--.*?(?:--|$)|/\*.*?\*/[\t ]*\n?', re.MULTILINE|re.DOTALL)

def remove_comments(content):
    return RE_COMMENTS.sub('\n', content)

def main():
    content = open(sys.argv[1], mode="r", encoding='latin-1').read()
    print(remove_comments(content))

if __name__ == '__main__':
    main()
