def readline_skip_comments(f):
    """
    Read a new line while skipping comments.
    """
    l = f.readline().strip()
    while len(l) > 0 and l[0] == '#':
        l = f.readline().strip()
    return l