3 \$@sdddddddddg Zd d lTd d lZeej7Zd d lmZmZd d lmZ d d l Z d d l Z d dlmZd dlmZmZmZd dlmZyd dlmZWnek rYn Xejeyd dlm Z Wnek rYnXGddde!Z"Gddde#Z$Gddde%Z&Gddde'Z(Gddde)Z*yd dlm*Z*Wnek rTYnXdZ+dZ,dZ-d d d d!d"dZ.d#d$Z/yd d%lm/Z/Wnek rYnXGd&dde)Z0Gd'dde1Z2Gd(dde1Z3Gd)ddeZ4Gd*dde5Z6d S)+deque defaultdict namedtupleUserDictUserList UserStringCounter OrderedDictChainMap)*N) itemgettereq) iskeyword)proxy)repeatchainstarmap)recursive_repr)r)rc@seZdZddZdS)_OrderedDictKeysViewccst|jEdHdS)N)reversed_mapping)selfr,/usr/lib64/python3.6/collections/__init__.py __reversed__5sz!_OrderedDictKeysView.__reversed__N)__name__ __module__ __qualname__rrrrrr3src@seZdZddZdS)_OrderedDictItemsViewccs(x"t|jD]}||j|fVq WdS)N)rr)rkeyrrrr:sz"_OrderedDictItemsView.__reversed__N)rrrrrrrrr8src@seZdZddZdS)_OrderedDictValuesViewccs$xt|jD]}|j|Vq WdS)N)rr)rrrrrr@sz#_OrderedDictValuesView.__reversed__N)rrrrrrrrr >sr c@seZdZdZdS)_Linkprevnextr __weakref__N)r"r#rr$)rrr __slots__rrrrr!Dsr!c@seZdZddZejeefddZejfddZddZ d d Z d d Z d)ddZ d*ddZ ddZejZZddZddZddZejZeZefddZd+ddZedd Zd!d"Zd#d$Zed,d%d&Zd'd(Z dS)-rc Os|s td|^}}t|dkr0tdt|y |jWn>tk rxt|_t|j|_}||_|_i|_ YnX|j ||dS)Nz?descriptor '__init__' of 'OrderedDict' object needs an argumentz$expected at most 1 arguments, got %d) TypeErrorlen_OrderedDict__rootAttributeErrorr!_OrderedDict__hardroot_proxyr"r#_OrderedDict__map_OrderedDict__update)argskwdsrrootrrr__init__Vs    zOrderedDict.__init__c CsZ||krJ||j|<}|j}|j}||||_|_|_||_|||_||||dS)N)r-r)r"r#r) rrvalueZ dict_setitemrZLinklinkr1lastrrr __setitem__is zOrderedDict.__setitem__cCs>||||jj|}|j}|j}||_||_d|_d|_dS)N)r-popr"r#)rrZ dict_delitemr4 link_prev link_nextrrr __delitem__ws  zOrderedDict.__delitem__ccs,|j}|j}x||k r&|jV|j}qWdS)N)r)r#r)rr1currrrr__iter__s  zOrderedDict.__iter__ccs,|j}|j}x||k r&|jV|j}qWdS)N)r)r"r)rr1r;rrrrs  zOrderedDict.__reversed__cCs*|j}||_|_|jjtj|dS)N)r)r"r#r-cleardict)rr1rrrr=s  zOrderedDict.clearTcCsj|s td|j}|r0|j}|j}||_||_n|j}|j}||_||_|j}|j|=tj||}||fS)Nzdictionary is empty)KeyErrorr)r"r#rr-r>r7)rr5r1r4r8r9rr3rrrpopitems  zOrderedDict.popitemc Cst|j|}|j}|j}|j}||_||_|j}|rR|j}||_||_||_||_n|j}||_||_||_||_dS)N)r-r"r#r)) rrr5r4r8r9Z soft_linkr1firstrrr move_to_ends$ zOrderedDict.move_to_endcCsVtj}t|d}||j}|||jd7}|||j|7}|||j|7}|S)Nr&)_sys getsizeofr(__dict__r-r+r))rZsizeofnsizerrr __sizeof__s  zOrderedDict.__sizeof__cCst|S)N)r)rrrrkeysszOrderedDict.keyscCst|S)N)r)rrrritemsszOrderedDict.itemscCst|S)N)r )rrrrvaluesszOrderedDict.valuescCs0||kr||}||=|S||jkr,t||S)N)_OrderedDict__markerr?)rrdefaultresultrrrr7s zOrderedDict.popNcCs||kr||S|||<|S)Nr)rrrNrrr setdefaultszOrderedDict.setdefaultcCs*|sd|jjfSd|jjt|jfS)Nz%s()z%s(%r)) __class__rlistrK)rrrr__repr__szOrderedDict.__repr__cCsHt|j}xttD]}|j|dqW|jf|p8ddt|jfS)N)varscopyrr7rQiterrK)rZ inst_dictkrrr __reduce__s zOrderedDict.__reduce__cCs |j|S)N)rQ)rrrrrU szOrderedDict.copycCs |}x|D] }|||<q W|S)Nr)clsiterabler3rrrrrfromkeyss  zOrderedDict.fromkeyscCs2t|tr&tj||o$ttt||Stj||S)N) isinstancerr>__eq__allmap_eq)rotherrrrr]s zOrderedDict.__eq__)T)T)N)N)!rrrr2r>r6r,r!r:r<rr=r@rBrIMutableMappingupdater.rJrKrL__ne__objectrMr7rP_recursive_reprrSrXrU classmethodr[r]rrrrrGs.          )rafrom builtins import property as _property, tuple as _tuple from operator import itemgetter as _itemgetter from collections import OrderedDict class {typename}(tuple): '{typename}({arg_list})' __slots__ = () _fields = {field_names!r} def __new__(_cls, {arg_list}): 'Create new instance of {typename}({arg_list})' return _tuple.__new__(_cls, ({arg_list})) @classmethod def _make(cls, iterable, new=tuple.__new__, len=len): 'Make a new {typename} object from a sequence or iterable' result = new(cls, iterable) if len(result) != {num_fields:d}: raise TypeError('Expected {num_fields:d} arguments, got %d' % len(result)) return result def _replace(_self, **kwds): 'Return a new {typename} object replacing specified fields with new values' result = _self._make(map(kwds.pop, {field_names!r}, _self)) if kwds: raise ValueError('Got unexpected field names: %r' % list(kwds)) return result def __repr__(self): 'Return a nicely formatted representation string' return self.__class__.__name__ + '({repr_fmt})' % self def _asdict(self): 'Return a new OrderedDict which maps field names to their values.' return OrderedDict(zip(self._fields, self)) def __getnewargs__(self): 'Return self as a plain tuple. Used by copy and pickle.' return tuple(self) {field_defs} z {name}=%rzW {name} = _property(_itemgetter({index:d}), doc='Alias for field number {index:d}') F)verboserenamemodulec Cst|tr|jddj}ttt|}t|}|rt}xNt|D]B\}}|j spt |sp|j dsp||kr|d|||<|j |qDWxN|g|D]@}t |tk rt d|jstd|t |rtd|qWt}xJ|D]B}|j do| rtd|||krtd ||j |qWtj|t|t|tt|jd d d dd jdd|Ddjddt|Dd}td|d} t|| | |} || _|rt| j|dkrytjd jjdd}Wnttfk rYnX|dk r || _| S)N, _z_%dz*Type names and field names must be stringsz8Type names and field names must be valid identifiers: %rz2Type names and field names cannot be a keyword: %rz/Field names cannot start with an underscore: %rz$Encountered duplicate field name: %r'r&z, css|]}tj|dVqdS))nameN)_repr_templateformat).0rprrr sznamedtuple.. css |]\}}tj||dVqdS))indexrpN)_field_templaterr)rsrvrprrrrts)typename field_names num_fieldsarg_listrepr_fmt field_defsz namedtuple_%s)rr__main__)r\strreplacesplitrRr_set enumerate isidentifier _iskeyword startswithaddtyper' ValueError_class_templaterrtupler(reprjoinr>exec_sourceprintrD _getframe f_globalsgetr*r) rxryrhrirjseenrvrpclass_definition namespacerOrrrresj               cCs*|j}x|D]}||dd||<q WdS)Nr r&)r)mappingrZZ mapping_getelemrrr_count_elementss r)rcseZdZfddZddZd.ddZdd Zed/d d Zfd d Z ddZ ddZ ddZ fddZ ddZddZddZddZddZd d!Zd"d#Zd$d%Zd&d'Zd(d)Zd*d+Zd,d-ZZS)0rcsN|s td|^}}t|dkr0tdt|tt|j|j||dS)Nz;descriptor '__init__' of 'Counter' object needs an argumentr&z$expected at most 1 arguments, got %d)r'r(superrr2rc)r/r0r)rQrrr2s  zCounter.__init__cCsdS)Nr r)rrrrr __missing__szCounter.__missing__NcCs6|dkrt|jtdddStj||jtddS)Nr&T)rreverse)r)sortedrK _itemgetter_heapqnlargest)rrGrrr most_commons zCounter.most_commoncCstjtt|jS)N)_chain from_iterable_starmap_repeatrK)rrrrelements+szCounter.elementscCs tddS)Nz@Counter.fromkeys() is undefined. Use Counter(iterable) instead.)NotImplementedError)rYrZvrrrr[CszCounter.fromkeyscs|s td|^}}t|dkr0tdt||r<|dnd}|dk rt|tr|r|j}x8|jD]\}}|||d||<qfWqtt|j|n t |||r|j|dS)Nz9descriptor 'update' of 'Counter' object needs an argumentr&z$expected at most 1 arguments, got %dr ) r'r(r\MappingrrKrrrcr)r/r0rrZself_getrcount)rQrrrcJs    zCounter.updatecOs|s td|^}}t|dkr0tdt||r<|dnd}|dk r|j}t|trxH|jD]\}}||d|||<qbWn x|D]}||dd||<qW|r|j|dS)Nz;descriptor 'subtract' of 'Counter' object needs an argumentr&z$expected at most 1 arguments, got %dr )r'r(rr\rrKsubtract)r/r0rrZrrrrrrrrs   zCounter.subtractcCs |j|S)N)rQ)rrrrrUsz Counter.copycCs|jt|ffS)N)rQr>)rrrrrXszCounter.__reduce__cs||krtj|dS)N)rr:)rr)rQrrr:szCounter.__delitem__c Cs`|sd|jjSy&djtdj|j}d|jj|fStk rZdj|jjt|SXdS)Nz%s()z, z%r: %rz%s({%s})z {0}({1!r})) rQrrr___mod__rr'rrr>)rrKrrrrSs zCounter.__repr__cCsxt|tstSt}x0|jD]$\}}|||}|dkr|||<qWx,|jD] \}}||krP|dkrP|||<qPW|S)Nr )r\rNotImplementedrK)rrarOrrnewcountrrr__add__s    zCounter.__add__cCs|t|tstSt}x0|jD]$\}}|||}|dkr|||<qWx0|jD]$\}}||krP|dkrPd|||<qPW|S)Nr )r\rrrK)rrarOrrrrrr__sub__s   zCounter.__sub__cCst|tstSt}x<|jD]0\}}||}||kr:|n|}|dkr|||<qWx,|jD] \}}||kr\|dkr\|||<q\W|S)Nr )r\rrrK)rrarOrr other_countrrrr__or__s   zCounter.__or__cCsVt|tstSt}x<|jD]0\}}||}||kr:|n|}|dkr|||<qW|S)Nr )r\rrrK)rrarOrrrrrrr__and__s  zCounter.__and__cCs0t}x$|jD]\}}|dkr|||<qW|S)Nr )rrK)rrOrrrrr__pos__s  zCounter.__pos__cCs4t}x(|jD]\}}|dkrd|||<qW|S)Nr )rrK)rrOrrrrr__neg__s zCounter.__neg__cCs*dd|jD}x|D] }||=qW|S)NcSsg|]\}}|dks|qS)r r)rsrrrrr sz*Counter._keep_positive..)rK)r nonpositiverrrr_keep_positives  zCounter._keep_positivecCs.x$|jD]\}}|||7<q W|jS)N)rKr)rrarrrrr__iadd__s zCounter.__iadd__cCs.x$|jD]\}}|||8<q W|jS)N)rKr)rrarrrrr__isub__%s zCounter.__isub__cCs6x,|jD] \}}||}||kr |||<q W|jS)N)rKr)rrarrrrrr__ior__2s  zCounter.__ior__cCs6x,|jD] \}}||}||kr |||<q W|jS)N)rKr)rrarrrrrr__iand__As  zCounter.__iand__)N)N)rrrr2rrrrgr[rcrrUrXr:rSrrrrrrrrrrr __classcell__rr)rQrrs.3    ("    c@seZdZddZddZddZd&dd Zd d Zd d ZddZ ddZ e ddZ e ddZddZeZd'ddZeddZddZddZd d!Zd"d#Zd$d%ZdS)(r cGst|p ig|_dS)N)rRmaps)rrrrrr2cszChainMap.__init__cCs t|dS)N)r?)rrrrrrjszChainMap.__missing__c Cs8x,|jD]"}y||Stk r(YqXqW|j|S)N)rr?r)rrrrrr __getitem__ms   zChainMap.__getitem__NcCs||kr||S|S)Nr)rrrNrrrrusz ChainMap.getcCsttj|jS)N)r(runionr)rrrr__len__xszChainMap.__len__cCsttj|jS)N)rVrrr)rrrrr<{szChainMap.__iter__cstfdd|jDS)Nc3s|]}|kVqdS)Nr)rsm)rrrrtsz(ChainMap.__contains__..)anyr)rrr)rr __contains__~szChainMap.__contains__cCs t|jS)N)rr)rrrr__bool__szChainMap.__bool__cCsdj|djtt|jS)Nz{0.__class__.__name__}({1})z, )rrrr_rr)rrrrrSszChainMap.__repr__cGs|tj|f|S)N)r>r[)rYrZr/rrrr[szChainMap.fromkeyscCs$|j|jdjf|jddS)Nr r&)rQrrU)rrrrrUsz ChainMap.copycCs|dkr i}|j|f|jS)N)rQr)rrrrr new_childszChainMap.new_childcCs|j|jddS)Nr&)rQr)rrrrparentsszChainMap.parentscCs||jd|<dS)Nr )r)rrr3rrrr6szChainMap.__setitem__c Cs8y|jd|=Wn"tk r2tdj|YnXdS)Nr z(Key not found in the first mapping: {!r})rr?rr)rrrrrr:szChainMap.__delitem__c Cs0y|jdjStk r*tdYnXdS)Nr z#No keys found in the first mapping.)rr@r?)rrrrr@szChainMap.popitemc Gs>y|jdj|f|Stk r8tdj|YnXdS)Nr z(Key not found in the first mapping: {!r})rr7r?rr)rrr/rrrr7sz ChainMap.popcCs|jdjdS)Nr )rr=)rrrrr=szChainMap.clear)N)N)rrrr2rrrrr<rrrfrSrgr[rU__copy__rpropertyrr6r:r@r7r=rrrrr Us&    c@sbeZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ e dddZ dS)rcOs|s td|^}}t|dkr0tdt||r>|d}n0d|krj|jd}ddl}|jdtddnd}i|_|dk r|j|t|r|j|dS) Nzz0Passing 'dict' as keyword argument is deprecatedrC) stacklevel)r'r(r7warningswarnDeprecationWarningdatarc)r/kwargsrr>rrrrr2s$     zUserDict.__init__cCs t|jS)N)r(r)rrrrrszUserDict.__len__cCs:||jkr|j|St|jdr.|jj||St|dS)Nr)rhasattrrQrr?)rrrrrrs    zUserDict.__getitem__cCs||j|<dS)N)r)rritemrrrr6szUserDict.__setitem__cCs |j|=dS)N)r)rrrrrr:szUserDict.__delitem__cCs t|jS)N)rVr)rrrrr<szUserDict.__iter__cCs ||jkS)N)r)rrrrrrszUserDict.__contains__cCs t|jS)N)rr)rrrrrSszUserDict.__repr__c CsR|jtkrt|jjSddl}|j}zi|_|j|}Wd||_X|j||S)Nr )rQrrrUrc)rrUrcrrrrUs  z UserDict.copyNcCs |}x|D] }|||<q W|S)Nr)rYrZr3drrrrr[s  zUserDict.fromkeys)N)rrrr2rrr6r:r<rrSrUrgr[rrrrrs c@seZdZd=ddZddZddZdd Zd d Zd d ZddZ ddZ ddZ ddZ ddZ ddZddZddZddZd d!Zd"d#ZeZd$d%Zd&d'Zd(d)Zd?d+d,Zd-d.Zd/d0Zd1d2Zd3d4Zd5d6Zd7d8Zd9d:Zd;d<Z dS)@rNcCsbg|_|dk r^t|t|jkr0||jdd<n.t|trT|jdd|jdd<n t||_dS)N)rrr\rrR)rinitlistrrrr2s zUserList.__init__cCs t|jS)N)rr)rrrrrSszUserList.__repr__cCs|j|j|kS)N)r_UserList__cast)rrarrr__lt__szUserList.__lt__cCs|j|j|kS)N)rr)rrarrr__le__szUserList.__le__cCs|j|j|kS)N)rr)rrarrrr]szUserList.__eq__cCs|j|j|kS)N)rr)rrarrr__gt__szUserList.__gt__cCs|j|j|kS)N)rr)rrarrr__ge__szUserList.__ge__cCst|tr|jS|S)N)r\rr)rrarrr__castszUserList.__castcCs ||jkS)N)r)rrrrrrszUserList.__contains__cCs t|jS)N)r(r)rrrrrszUserList.__len__cCs |j|S)N)r)rirrrrszUserList.__getitem__cCs||j|<dS)N)r)rrrrrrr6szUserList.__setitem__cCs |j|=dS)N)r)rrrrrr:szUserList.__delitem__cCsPt|tr|j|j|jSt|t|jr<|j|j|S|j|jt|S)N)r\rrQrrrR)rrarrrrs  zUserList.__add__cCsPt|tr|j|j|jSt|t|jr<|j||jS|jt||jS)N)r\rrQrrrR)rrarrr__radd__#s  zUserList.__radd__cCsRt|tr|j|j7_n2t|t|jr<|j|7_n|jt|7_|S)N)r\rrrrR)rrarrrr)s  zUserList.__iadd__cCs|j|j|S)N)rQr)rrGrrr__mul__1szUserList.__mul__cCs|j|9_|S)N)r)rrGrrr__imul__4szUserList.__imul__cCs|jj|dS)N)rappend)rrrrrr7szUserList.appendcCs|jj||dS)N)rinsert)rrrrrrr8szUserList.insertr&cCs |jj|S)N)rr7)rrrrrr79sz UserList.popcCs|jj|dS)N)rremove)rrrrrr:szUserList.removecCs|jjdS)N)rr=)rrrrr=;szUserList.clearcCs |j|S)N)rQ)rrrrrU<sz UserList.copycCs |jj|S)N)rr)rrrrrr=szUserList.countcGs|jj|f|S)N)rrv)rrr/rrrrv>szUserList.indexcCs|jjdS)N)rr)rrrrr?szUserList.reversecOs|jj||dS)N)rsort)rr/r0rrrr@sz UserList.sortcCs*t|tr|jj|jn |jj|dS)N)r\rrextend)rrarrrrAs zUserList.extend)Nr)r)!rrrr2rSrrr]rrrrrrr6r:rrrr__rmul__rrrr7rr=rUrrvrrrrrrrrs<  c@s`eZdZddZddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZddZddZdd Zd!d"Zd#d$Zd%d&ZeZd'd(Zd)d*Zd+d,Zd-d.Zd/d0Zd1ejfd2d3Zdd5d6Zd1ejfd7d8Z dd:d;Z!d1ejfdd?Z#d@dAZ$d1ejfdBdCZ%dDdEZ&dFdGZ'dHdIZ(dJdKZ)dLdMZ*dNdOZ+dPdQZ,dRdSZ-dTdUZ.dVdWZ/dXdYZ0dZd[Z1d\d]Z2d^d_Z3dd`daZ4e5j6Z6dbdcZ7ddedfZ8d1ejfdgdhZ9d1ejfdidjZ:dkdlZ;dmdnZddsdtZ?ddvdwZ@d1ejfdxdyZAddzd{ZBd|d}ZCd~dZDddZEddZFddZGd4S)rcCs<t|tr||_n&t|tr.|jdd|_n t||_dS)N)r\rrr)rseqrrrr2Ns   zUserString.__init__cCs t|jS)N)rr)rrrr__str__UszUserString.__str__cCs t|jS)N)rr)rrrrrSVszUserString.__repr__cCs t|jS)N)intr)rrrr__int__WszUserString.__int__cCs t|jS)N)floatr)rrrr __float__XszUserString.__float__cCs t|jS)N)complexr)rrrr __complex__YszUserString.__complex__cCs t|jS)N)hashr)rrrr__hash__ZszUserString.__hash__cCs|jddfS)N)r)rrrr__getnewargs__[szUserString.__getnewargs__cCs t|tr|j|jkS|j|kS)N)r\rr)rstringrrrr]^s  zUserString.__eq__cCs t|tr|j|jkS|j|kS)N)r\rr)rrrrrrbs  zUserString.__lt__cCs t|tr|j|jkS|j|kS)N)r\rr)rrrrrrfs  zUserString.__le__cCs t|tr|j|jkS|j|kS)N)r\rr)rrrrrrjs  zUserString.__gt__cCs t|tr|j|jkS|j|kS)N)r\rr)rrrrrrns  zUserString.__ge__cCst|tr|j}||jkS)N)r\rr)rcharrrrrss zUserString.__contains__cCs t|jS)N)r(r)rrrrrxszUserString.__len__cCs|j|j|S)N)rQr)rrvrrrryszUserString.__getitem__cCsJt|tr|j|j|jSt|tr6|j|j|S|j|jt|S)N)r\rrQrr)rrarrrrzs   zUserString.__add__cCs.t|tr|j||jS|jt||jS)N)r\rrQr)rrarrrrs zUserString.__radd__cCs|j|j|S)N)rQr)rrGrrrrszUserString.__mul__cCs|j|j|S)N)rQr)rr/rrrrszUserString.__mod__cCs|j|tS)N)rQr/)rrrrrr__rmod__szUserString.__rmod__cCs|j|jjS)N)rQr capitalize)rrrrrszUserString.capitalizecCs|j|jjS)N)rQrcasefold)rrrrrszUserString.casefoldcGs|j|jj|f|S)N)rQrcenter)rwidthr/rrrrszUserString.centerr cCs t|tr|j}|jj|||S)N)r\rrr)rsubstartendrrrrs zUserString.countNcCs>|r.|r|j|jj||S|j|jj|S|j|jjS)N)rQrencode)rencodingerrorsrrrrs zUserString.encodecCs|jj|||S)N)rendswith)rsuffixrrrrrrszUserString.endswithcCs|j|jj|S)N)rQr expandtabs)rtabsizerrrrszUserString.expandtabscCs t|tr|j}|jj|||S)N)r\rrfind)rrrrrrrrs zUserString.findcOs|jj||S)N)rrr)rr/r0rrrrrszUserString.formatcCs |jj|S)N)r format_map)rrrrrrszUserString.format_mapcCs|jj|||S)N)rrv)rrrrrrrrvszUserString.indexcCs |jjS)N)risalpha)rrrrrszUserString.isalphacCs |jjS)N)risalnum)rrrrrszUserString.isalnumcCs |jjS)N)r isdecimal)rrrrrszUserString.isdecimalcCs |jjS)N)risdigit)rrrrr szUserString.isdigitcCs |jjS)N)rr)rrrrrszUserString.isidentifiercCs |jjS)N)rislower)rrrrr szUserString.islowercCs |jjS)N)r isnumeric)rrrrr szUserString.isnumericcCs |jjS)N)r isprintable)rrrrr szUserString.isprintablecCs |jjS)N)risspace)rrrrr szUserString.isspacecCs |jjS)N)ristitle)rrrrrszUserString.istitlecCs |jjS)N)risupper)rrrrrszUserString.isuppercCs |jj|S)N)rr)rrrrrrszUserString.joincGs|j|jj|f|S)N)rQrljust)rrr/rrrrszUserString.ljustcCs|j|jjS)N)rQrlower)rrrrrszUserString.lowercCs|j|jj|S)N)rQrlstrip)rcharsrrrrszUserString.lstripcCs |jj|S)N)r partition)rseprrrrszUserString.partitionr&cCs6t|tr|j}t|tr |j}|j|jj|||S)N)r\rrrQr)roldnewmaxsplitrrrrs   zUserString.replacecCs t|tr|j}|jj|||S)N)r\rrrfind)rrrrrrrrs zUserString.rfindcCs|jj|||S)N)rrindex)rrrrrrrrszUserString.rindexcGs|j|jj|f|S)N)rQrrjust)rrr/rrrrszUserString.rjustcCs |jj|S)N)r rpartition)rrrrrrszUserString.rpartitioncCs|j|jj|S)N)rQrrstrip)rrrrrrszUserString.rstripcCs|jj||S)N)rr)rrrrrrrszUserString.splitcCs|jj||S)N)rrsplit)rrrrrrrszUserString.rsplitFcCs |jj|S)N)r splitlines)rkeependsrrrrszUserString.splitlinescCs|jj|||S)N)rr)rprefixrrrrrrszUserString.startswithcCs|j|jj|S)N)rQrstrip)rrrrrr"szUserString.stripcCs|j|jjS)N)rQrswapcase)rrrrr#szUserString.swapcasecCs|j|jjS)N)rQrtitle)rrrrr$szUserString.titlecGs|j|jj|S)N)rQr translate)rr/rrrr%szUserString.translatecCs|j|jjS)N)rQrupper)rrrrr&szUserString.uppercCs|j|jj|S)N)rQrzfill)rrrrrr'szUserString.zfill)NN)r)Nr)r)Nr)Nrr)Nr)F)N)Hrrrr2rrSrrrrrr]rrrrrrrrrrrrrrrrrDmaxsizerrrrrrrrrvrrrr rr r r r rrrrrrr maketransrrrrrrrrrrrr"r#r$r%r&r'rrrrrMs         )7__all___collections_abcoperatorr rr r`keywordrrsysrDheapqr_weakrefrr, itertoolsrrrrrrreprlibrrf _collectionsr ImportErrorMutableSequenceregisterrKeysViewr ItemsViewr ValuesViewr rer!r>rrrqrwrrrrbr rrSequencerrrrrs^       `3blCI