class SimpleLoc:
    def __add__(self, other):
        return CompoundLoc()
    def __repr__(self):
        return 'SimpleLoc'

class CompoundLoc:
    def __add__(self, other):
        return CompoundLoc()
    def __repr__(self):
        return 'CompoundLoc'

s = sum( [SimpleLoc(), SimpleLoc(), SimpleLoc()], CompoundLoc() )
print s