<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def merge_stylesheets(Class, fn, *cssfns):

 """merge the given CSS files, in order, into a single stylesheet. First listed takes priority.
 """

        stylesheet = Class(fn=fn)
        for cssfn in cssfns:
            css = Class(fn=cssfn)
            for sel in sorted(css.styles.keys()):
                if sel not in stylesheet.styles:
                    stylesheet.styles[sel] = css.styles[sel]
                else: 
                    for prop in [prop for prop in css.styles[sel] if prop not in stylesheet.styles[sel]]:
                        stylesheet.styles[sel][prop] = css.styles[sel][prop]
        return stylesheet