import re
import sys

pats = {
    "theme.get_options()": "Options",
    "area.T": "area",
    "bar_plot.T": "bar_plot",
    "line_plot.T": "line_plot",
    "range_plot.T": "range_plot",
    "pie_plot.T": "pie_plot",
    "color\\.": "color",
    "line_style\\.": "line_style",
    "fill_style\\.": "fill_style",
    "tick_mark\\.": "tick_mark",
    "coord\\.T": "coord",
    "error_bar\\.": "error_bar",
    "text_box\\.T": "text_box",
    "arrow\\.T": "arrow",
    "axis\\.": "axis",
    "chart_data\\.": "chart_data",
    "legend\\.": "legend",
    "theme\\.": "Options",
    "canvas\\.": "canvas",
    }


in_example = 0
for l in sys.stdin.readlines():
    if re.search("<pre>", l):
        in_example = 1
    if re.search("</pre>", l):
        in_example = 0
    if not in_example:
        print l,
        continue
    
    for str, ref in pats.items():
        l = re.sub("(" + str + ")", "<a href=\"%s.html\">\\1</a>" % ref, l)
    print l,
    
        

        
        
