diff --git a/README.md b/README.md index 4785989..14b2bf3 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ [![publish status](https://github.com/yvesgurcan/web-midi-player/workflows/Publish/badge.svg)](https://github.com/yvesgurcan/web-midi-player/actions?query=workflow%3APublish) [![](https://data.jsdelivr.com/v1/package/npm/web-midi-player/badge?style=rounded)](https://www.jsdelivr.com/package/npm/web-midi-player) -Event-driven JavaScript library to enable MIDI playback in the browser. +Event-driven JavaScript library that enables MIDI playback in the browser. - Check out examples [with React](https://midi.yvesgurcan.com/example/react/) and [with vanilla JavaScript](https://midi.yvesgurcan.com/example/javascript/). - See the [NPM package](https://npmjs.com/package/web-midi-player) and the [GPR package](https://github.com/yvesgurcan/web-midi-player/packages/92236). diff --git a/doc/index.html b/doc/index.html index d7dcebc..5abce4d 100644 --- a/doc/index.html +++ b/doc/index.html @@ -8,7 +8,7 @@ Documentation - + @@ -64,6 +64,14 @@

#stop + + #getVolume + + + + #setVolume + + #emitEvent @@ -354,6 +362,20 @@

+ + configuration.volume + + number + + (default 80) + + + Set playback volume when initializing the player. + + + + + @@ -367,18 +389,6 @@

description - - playerId - - string - - - : ID of this instance of Midi Player. - - - - - context @@ -392,36 +402,36 @@

- sampleRate + eventLogger - number + function - : The sample rate of the AudioContext. + : The function that is called to emit events. - eventLogger + logging - function + boolean - : The function that is called to emit events. + : Whether console logging is ON or OFF. - logging + isFirstInstance boolean - : Whether console logging is ON or OFF. + : Whether this is the first instance of the Midi Player or @@ -463,6 +473,30 @@

+ + playerId + + string + + + : ID of this instance of Midi Player. + + + + + + + sampleRate + + number + + + : The sample rate of the AudioContext. + + + + + source @@ -500,24 +534,25 @@

- waveBuffer + volume - any + number - : The buffer with the MIDI data converted to WAV. + : Playback volume. - isFirstInstance + waveBuffer - boolean + any - : Whether this is the first instance of the Midi Player or not. + : The buffer with the MIDI data converted to WAV. +not. @@ -1101,6 +1136,150 @@

Examples

+ + +
+ +
+ + +
+ +

+ + + getVolume() + + +

+ +

Gets the current volume of the playback.

+ + + + + + + + + + + + + + + + +

Returns

+ number + : + The current volume. + + + + + + + + +

Examples

+ + +
const volume = midiPlayer.getVolume();
+ + + + + + + + + + +
+ +
+ +
+ + +
+ +

+ + + setVolume(input) + + +

+ +

Sets the current volume of the playback.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
parametertypedescription
input + object + +
input.volume + number + + The new value for the volume (also known as gain). Typically, a whole number between 0 and 100 but can actually be negative, greater, or even a decimal number. +
+ + + + + + + + + +

Examples

+ + +
midiPlayer.setVolume({ volume: 80 });
+ + + + + + + + + +
diff --git a/example/javascript/package.json b/example/javascript/package.json index aa99ef5..6a84f2d 100644 --- a/example/javascript/package.json +++ b/example/javascript/package.json @@ -4,7 +4,7 @@ "scripts": { "start": "serve -l 8081 --symlinks", "lint": "prettier --write **/*.js", - "link:make": "ln -s ../../../index.js ./src/web-midi-player.js", + "link:make": "npm run link:delete && ln -s ../../../index.js ./src/web-midi-player.js", "link:delete": "rm ./src/web-midi-player.js" }, "devDependencies": { diff --git a/example/javascript/src/player-handler.js b/example/javascript/src/player-handler.js index 4eb2809..81dc9fb 100644 --- a/example/javascript/src/player-handler.js +++ b/example/javascript/src/player-handler.js @@ -6,11 +6,7 @@ const MIDI_ERROR = 'MIDI_ERROR'; let midiPlayer = null; -const eventLogger = payload => { - console[event === MIDI_ERROR ? 'error' : 'log'](payload); -}; - -midiPlayer = new MidiPlayer({ eventLogger, patchUrl: 'patches/' }); +midiPlayer = new MidiPlayer({ logging: true, patchUrl: 'patches/' }); const songElements = document.getElementsByClassName('Player__Song'); diff --git a/example/react/index.html b/example/react/index.html index 397871a..82fe2a2 100644 --- a/example/react/index.html +++ b/example/react/index.html @@ -5,5 +5,5 @@
- + diff --git a/example/react/main.d81c0edb59847e81a452.js b/example/react/main.d81c0edb59847e81a452.js new file mode 100644 index 0000000..c077192 --- /dev/null +++ b/example/react/main.d81c0edb59847e81a452.js @@ -0,0 +1,53 @@ +!function(g){var I={};function A(C){if(I[C])return I[C].exports;var e=I[C]={i:C,l:!1,exports:{}};return g[C].call(e.exports,e,e.exports,A),e.l=!0,e.exports}A.m=g,A.c=I,A.d=function(g,I,C){A.o(g,I)||Object.defineProperty(g,I,{enumerable:!0,get:C})},A.r=function(g){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(g,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(g,"__esModule",{value:!0})},A.t=function(g,I){if(1&I&&(g=A(g)),8&I)return g;if(4&I&&"object"==typeof g&&g&&g.__esModule)return g;var C=Object.create(null);if(A.r(C),Object.defineProperty(C,"default",{enumerable:!0,value:g}),2&I&&"string"!=typeof g)for(var e in g)A.d(C,e,function(I){return g[I]}.bind(null,e));return C},A.n=function(g){var I=g&&g.__esModule?function(){return g.default}:function(){return g};return A.d(I,"a",I),I},A.o=function(g,I){return Object.prototype.hasOwnProperty.call(g,I)},A.p="",A(A.s=32)}([function(g,I,A){"use strict";g.exports=A(20)},function(g,I,A){"use strict";(function(g){var C=A(6),e=A.n(C),i=A(12),t=A.n(i),c=A(0),n=A.n(c),u=A(13),r=A(3),b=A(7),a=(A(2),A(17)),l=A(18),G=function(g,I){for(var A=[g[0]],C=0,e=I.length;C=0||Object.prototype.hasOwnProperty.call(g,C)&&(A[C]=g[C]);return A},X=function(g,I){if(!g)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!I||"object"!=typeof I&&"function"!=typeof I?g:I},y=function(g){return"object"===(void 0===g?"undefined":o(g))&&g.constructor===Object},S=Object.freeze([]),M=Object.freeze({});function p(g){return"function"==typeof g}function f(g){return g.displayName||g.name||"Component"}function m(g){return g&&"string"==typeof g.styledComponentId}var h=void 0!==g&&(g.env.REACT_APP_SC_ATTR||g.env.SC_ATTR)||"data-styled",w="undefined"!=typeof window&&"HTMLElement"in window,Z="boolean"==typeof SC_DISABLE_SPEEDY&&SC_DISABLE_SPEEDY||void 0!==g&&(g.env.REACT_APP_SC_DISABLE_SPEEDY||g.env.SC_DISABLE_SPEEDY)||!1;var F=function(g){function I(A){s(this,I);for(var C=arguments.length,e=Array(C>1?C-1:0),i=1;i0?" Additional arguments: "+e.join(", "):"")));return X(t)}return B(I,g),I}(Error),N=/^[^\S\n]*?\/\* sc-component-id:\s*(\S+)\s+\*\//gm,k=function(g){var I=""+(g||""),A=[];return I.replace(N,(function(g,I,C){return A.push({componentId:I,matchIndex:C}),g})),A.map((function(g,C){var e=g.componentId,i=g.matchIndex,t=A[C+1];return{componentId:e,cssFromDOM:t?I.slice(i,t.matchIndex):I.slice(i)}}))},T=/^\s*\/\/.*$/gm,H=new e.a({global:!1,cascade:!0,keyframe:!1,prefix:!1,compress:!1,semicolon:!0}),Y=new e.a({global:!1,cascade:!0,keyframe:!1,prefix:!0,compress:!1,semicolon:!1}),E=[],K=function(g){if(-2===g){var I=E;return E=[],I}},W=t()((function(g){E.push(g)})),V=void 0,L=void 0,O=void 0,R=function(g,I,A){return I>0&&-1!==A.slice(0,I).indexOf(L)&&A.slice(I-L.length,I)!==L?"."+V:g};Y.use([function(g,I,A){2===g&&A.length&&A[0].lastIndexOf(L)>0&&(A[0]=A[0].replace(O,R))},W,K]),H.use([W,K]);var v=function(g){return H("",g)};function Q(g,I,A){var C=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"&",e=g.join("").replace(T,""),i=I&&A?A+" "+I+" { "+e+" }":e;return V=C,L=I,O=new RegExp("\\"+L+"\\b","g"),Y(A||!I?"":I,i)}var U=function(){return A.nc},P=function(g,I,A){A&&((g[I]||(g[I]=Object.create(null)))[A]=!0)},j=function(g,I){g[I]=Object.create(null)},J=function(g){return function(I,A){return void 0!==g[I]&&g[I][A]}},z=function(g){var I="";for(var A in g)I+=Object.keys(g[A]).join(" ")+" ";return I.trim()},_=function(g){if(g.sheet)return g.sheet;for(var I=g.ownerDocument.styleSheets.length,A=0;A"+g()+""}},Ag=function(g,I){return function(){var A,C=((A={})[h]=z(I),A["data-styled-version"]="4.4.1",A),e=U();return e&&(C.nonce=e),n.a.createElement("style",d({},C,{dangerouslySetInnerHTML:{__html:g()}}))}},Cg=function(g){return function(){return Object.keys(g)}},eg=function(g,I){return g.createTextNode($(I))},ig=function g(I,A){var C=void 0===I?Object.create(null):I,e=void 0===A?Object.create(null):A,i=function(g){var I=e[g];return void 0!==I?I:e[g]=[""]},t=function(){var g="";for(var I in e){var A=e[I][0];A&&(g+=$(I)+A)}return g};return{clone:function(){var I=function(g){var I=Object.create(null);for(var A in g)I[A]=d({},g[A]);return I}(C),A=Object.create(null);for(var i in e)A[i]=[e[i][0]];return g(I,A)},css:t,getIds:Cg(e),hasNameForId:J(C),insertMarker:i,insertRules:function(g,I,A){i(g)[0]+=I.join(" "),P(C,g,A)},removeRules:function(g){var I=e[g];void 0!==I&&(I[0]="",j(C,g))},sealed:!1,styleTag:null,toElement:Ag(t,C),toHTML:Ig(t,C)}},tg=function(g,I,A,C,e){if(w&&!A){var i=function(g,I,A){var C=document;g?C=g.ownerDocument:I&&(C=I.ownerDocument);var e=C.createElement("style");e.setAttribute(h,""),e.setAttribute("data-styled-version","4.4.1");var i=U();if(i&&e.setAttribute("nonce",i),e.appendChild(C.createTextNode("")),g&&!I)g.appendChild(e);else{if(!I||!g||!I.parentNode)throw new F(6);I.parentNode.insertBefore(e,A?I:I.nextSibling)}return e}(g,I,C);return Z?function(g,I){var A=Object.create(null),C=Object.create(null),e=void 0!==I,i=!1,t=function(I){var e=C[I];return void 0!==e?e:(C[I]=eg(g.ownerDocument,I),g.appendChild(C[I]),A[I]=Object.create(null),C[I])},c=function(){var g="";for(var I in C)g+=C[I].data;return g};return{clone:function(){throw new F(5)},css:c,getIds:Cg(C),hasNameForId:J(A),insertMarker:t,insertRules:function(g,C,c){for(var n=t(g),u=[],r=C.length,b=0;b0&&(i=!0,I().insertRules(g+"-import",u))},removeRules:function(t){var c=C[t];if(void 0!==c){var n=eg(g.ownerDocument,t);g.replaceChild(n,c),C[t]=n,j(A,t),e&&i&&I().removeRules(t+"-import")}},sealed:!1,styleTag:g,toElement:Ag(c,A),toHTML:Ig(c,A)}}(i,e):function(g,I){var A=Object.create(null),C=Object.create(null),e=[],i=void 0!==I,t=!1,c=function(g){var I=C[g];return void 0!==I?I:(C[g]=e.length,e.push(0),j(A,g),C[g])},n=function(){var I=_(g).cssRules,A="";for(var i in C){A+=$(i);for(var t=C[i],c=gg(e,t),n=c-e[t];n0&&(t=!0,I().insertRules(C+"-import",G)),e[r]+=l,P(A,C,u)},removeRules:function(c){var n=C[c];if(void 0!==n&&!1!==g.isConnected){var u=e[n];!function(g,I,A){for(var C=I-A,e=I;e>C;e-=1)g.deleteRule(e)}(_(g),gg(e,n)-1,u),e[n]=0,j(A,c),i&&t&&I().removeRules(c+"-import")}},sealed:!1,styleTag:g,toElement:Ag(n,A),toHTML:Ig(n,A)}}(i,e)}return ig()},cg=/\s+/,ng=void 0;ng=w?Z?40:1e3:-1;var ug=0,rg=void 0,bg=function(){function g(){var I=this,A=arguments.length>0&&void 0!==arguments[0]?arguments[0]:w?document.head:null,C=arguments.length>1&&void 0!==arguments[1]&&arguments[1];s(this,g),this.getImportRuleTag=function(){var g=I.importRuleTag;if(void 0!==g)return g;var A=I.tags[0];return I.importRuleTag=tg(I.target,A?A.styleTag:null,I.forceServer,!0)},ug+=1,this.id=ug,this.forceServer=C,this.target=C?null:A,this.tagMap={},this.deferred={},this.rehydratedNames={},this.ignoreRehydratedNames={},this.tags=[],this.capacity=1,this.clones=[]}return g.prototype.rehydrate=function(){if(!w||this.forceServer)return this;var g=[],I=[],A=!1,C=document.querySelectorAll("style["+h+'][data-styled-version="4.4.1"]'),e=C.length;if(!e)return this;for(var i=0;i0&&void 0!==arguments[0]&&arguments[0];rg=new g(void 0,I).rehydrate()},g.prototype.clone=function(){var I=new g(this.target,this.forceServer);return this.clones.push(I),I.tags=this.tags.map((function(g){for(var A=g.getIds(),C=g.clone(),e=0;e1?I-1:0),C=1;C=4;)I=1540483477*(65535&(I=255&g.charCodeAt(e)|(255&g.charCodeAt(++e))<<8|(255&g.charCodeAt(++e))<<16|(255&g.charCodeAt(++e))<<24))+((1540483477*(I>>>16)&65535)<<16),C=1540483477*(65535&C)+((1540483477*(C>>>16)&65535)<<16)^(I=1540483477*(65535&(I^=I>>>24))+((1540483477*(I>>>16)&65535)<<16)),A-=4,++e;switch(A){case 3:C^=(255&g.charCodeAt(e+2))<<16;case 2:C^=(255&g.charCodeAt(e+1))<<8;case 1:C=1540483477*(65535&(C^=255&g.charCodeAt(e)))+((1540483477*(C>>>16)&65535)<<16)}return((C=1540483477*(65535&(C^=C>>>13))+((1540483477*(C>>>16)&65535)<<16))^C>>>15)>>>0}var Xg=52,yg=function(g){return String.fromCharCode(g+(g>25?39:97))};function Sg(g){var I="",A=void 0;for(A=g;A>Xg;A=Math.floor(A/Xg))I=yg(A%Xg)+I;return yg(A%Xg)+I}function Mg(g,I){for(var A=0;A2&&void 0!==arguments[2]?arguments[2]:M,C=!!A&&g.theme===A.theme,e=g.theme&&!C?g.theme:I||A.theme;return e},wg=/[[\].#*$><+~=|^:(),"'`-]+/g,Zg=/(^-|-$)/g;function Fg(g){return g.replace(wg,"-").replace(Zg,"")}function Ng(g){return"string"==typeof g&&!0}var kg={childContextTypes:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDerivedStateFromProps:!0,propTypes:!0,type:!0},Tg={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Hg=((pg={})[r.ForwardRef]={$$typeof:!0,render:!0},pg),Yg=Object.defineProperty,Eg=Object.getOwnPropertyNames,Kg=Object.getOwnPropertySymbols,Wg=void 0===Kg?function(){return[]}:Kg,Vg=Object.getOwnPropertyDescriptor,Lg=Object.getPrototypeOf,Og=Object.prototype,Rg=Array.prototype;function vg(g,I,A){if("string"!=typeof I){var C=Lg(I);C&&C!==Og&&vg(g,C,A);for(var e=Rg.concat(Eg(I),Wg(I)),i=Hg[g.$$typeof]||kg,t=Hg[I.$$typeof]||kg,c=e.length,n=void 0,u=void 0;c--;)if(u=e[c],!(Tg[u]||A&&A[u]||t&&t[u]||i&&i[u])&&(n=Vg(I,u)))try{Yg(g,u,n)}catch(g){}return g}return g}var Qg=Object(c.createContext)(),Ug=Qg.Consumer,Pg=(function(g){function I(A){s(this,I);var C=X(this,g.call(this,A));return C.getContext=Object(b.a)(C.getContext.bind(C)),C.renderInner=C.renderInner.bind(C),C}B(I,g),I.prototype.render=function(){return this.props.children?n.a.createElement(Qg.Consumer,null,this.renderInner):null},I.prototype.renderInner=function(g){var I=this.getContext(this.props.theme,g);return n.a.createElement(Qg.Provider,{value:I},this.props.children)},I.prototype.getTheme=function(g,I){if(p(g))return g(I);if(null===g||Array.isArray(g)||"object"!==(void 0===g?"undefined":o(g)))throw new F(8);return d({},I,g)},I.prototype.getContext=function(g,I){return this.getTheme(g,I)}}(c.Component),function(){function g(){s(this,g),this.masterSheet=bg.master,this.instance=this.masterSheet.clone(),this.sealed=!1}g.prototype.seal=function(){if(!this.sealed){var g=this.masterSheet.clones.indexOf(this.instance);this.masterSheet.clones.splice(g,1),this.sealed=!0}},g.prototype.collectStyles=function(g){if(this.sealed)throw new F(2);return n.a.createElement(Jg,{sheet:this.instance},g)},g.prototype.getStyleTags=function(){return this.seal(),this.instance.toHTML()},g.prototype.getStyleElement=function(){return this.seal(),this.instance.toReactElements()},g.prototype.interleaveWithNodeStream=function(g){throw new F(3)}}(),Object(c.createContext)()),jg=Pg.Consumer,Jg=function(g){function I(A){s(this,I);var C=X(this,g.call(this,A));return C.getContext=Object(b.a)(C.getContext),C}return B(I,g),I.prototype.getContext=function(g,I){if(g)return g;if(I)return new bg(I);throw new F(4)},I.prototype.render=function(){var g=this.props,I=g.children,A=g.sheet,C=g.target;return n.a.createElement(Pg.Provider,{value:this.getContext(A,C)},I)},I}(c.Component),zg={};var _g=function(g){function I(){s(this,I);var A=X(this,g.call(this));return A.attrs={},A.renderOuter=A.renderOuter.bind(A),A.renderInner=A.renderInner.bind(A),A}return B(I,g),I.prototype.render=function(){return n.a.createElement(jg,null,this.renderOuter)},I.prototype.renderOuter=function(){var g=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bg.master;return this.styleSheet=g,this.props.forwardedComponent.componentStyle.isStatic?this.renderInner():n.a.createElement(Ug,null,this.renderInner)},I.prototype.renderInner=function(g){var I=this.props.forwardedComponent,A=I.componentStyle,C=I.defaultProps,e=(I.displayName,I.foldedComponentIds),i=I.styledComponentId,t=I.target,n=void 0;n=A.isStatic?this.generateAndInjectStyles(M,this.props):this.generateAndInjectStyles(hg(this.props,g,C)||M,this.props);var u=this.props.as||this.attrs.as||t,r=Ng(u),b={},l=d({},this.props,this.attrs),G=void 0;for(G in l)"forwardedComponent"!==G&&"as"!==G&&("forwardedRef"===G?b.ref=l[G]:"forwardedAs"===G?b.as=l[G]:r&&!Object(a.a)(G)||(b[G]=l[G]));return this.props.style&&this.attrs.style&&(b.style=d({},this.attrs.style,this.props.style)),b.className=Array.prototype.concat(e,i,n!==i?n:null,this.props.className,this.attrs.className).filter(Boolean).join(" "),Object(c.createElement)(u,b)},I.prototype.buildExecutionContext=function(g,I,A){var C=this,e=d({},I,{theme:g});return A.length?(this.attrs={},A.forEach((function(g){var I,A=g,i=!1,t=void 0,c=void 0;for(c in p(A)&&(A=A(e),i=!0),A)t=A[c],i||!p(t)||(I=t)&&I.prototype&&I.prototype.isReactComponent||m(t)||(t=t(e)),C.attrs[c]=t,e[c]=t})),e):e},I.prototype.generateAndInjectStyles=function(g,I){var A=I.forwardedComponent,C=A.attrs,e=A.componentStyle;A.warnTooManyClasses;return e.isStatic&&!C.length?e.generateAndInjectStyles(M,this.styleSheet):e.generateAndInjectStyles(this.buildExecutionContext(g,I,C),this.styleSheet)},I}(c.Component);function qg(g,I,A){var C=m(g),e=!Ng(g),i=I.displayName,t=void 0===i?function(g){return Ng(g)?"styled."+g:"Styled("+f(g)+")"}(g):i,c=I.componentId,u=void 0===c?function(g,I,A){var C="string"!=typeof I?"sc":Fg(I),e=(zg[C]||0)+1;zg[C]=e;var i=C+"-"+g.generateName(C+e);return A?A+"-"+i:i}(mg,I.displayName,I.parentComponentId):c,r=I.ParentComponent,b=void 0===r?_g:r,a=I.attrs,G=void 0===a?S:a,o=I.displayName&&I.componentId?Fg(I.displayName)+"-"+I.componentId:I.componentId||u,s=C&&g.attrs?Array.prototype.concat(g.attrs,G).filter(Boolean):G,x=new mg(C?g.componentStyle.rules.concat(A):A,s,o),B=void 0,X=function(g,I){return n.a.createElement(b,d({},g,{forwardedComponent:B,forwardedRef:I}))};return X.displayName=t,(B=n.a.forwardRef(X)).displayName=t,B.attrs=s,B.componentStyle=x,B.foldedComponentIds=C?Array.prototype.concat(g.foldedComponentIds,g.styledComponentId):S,B.styledComponentId=o,B.target=C?g.target:g,B.withComponent=function(g){var C=I.componentId,e=D(I,["componentId"]),i=C&&C+"-"+(Ng(g)?g:Fg(f(g)));return qg(g,d({},e,{attrs:s,componentId:i,ParentComponent:b}),A)},Object.defineProperty(B,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(I){this._foldedDefaultProps=C?Object(l.a)(g.defaultProps,I):I}}),B.toString=function(){return"."+B.styledComponentId},e&&vg(B,g,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,styledComponentId:!0,target:!0,withComponent:!0}),B}var $g=function(g){return function g(I,A){var C=arguments.length>2&&void 0!==arguments[2]?arguments[2]:M;if(!Object(r.isValidElementType)(A))throw new F(1,String(A));var e=function(){return I(A,C,Bg.apply(void 0,arguments))};return e.withConfig=function(e){return g(I,A,d({},C,e))},e.attrs=function(e){return g(I,A,d({},C,{attrs:Array.prototype.concat(C.attrs,e).filter(Boolean)}))},e}(qg,g)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(g){$g[g]=$g(g)}));!function(){function g(I,A){s(this,g),this.rules=I,this.componentId=A,this.isStatic=Mg(I,S),bg.master.hasId(A)||bg.master.deferredInject(A,[])}g.prototype.createStyles=function(g,I){var A=Q(dg(this.rules,g,I),"");I.inject(this.componentId,A)},g.prototype.removeStyles=function(g){var I=this.componentId;g.hasId(I)&&g.remove(I)},g.prototype.renderStyles=function(g,I){this.removeStyles(I),this.createStyles(g,I)}}();w&&(window.scCGSHMRCache={});I.a=$g}).call(this,A(24))},function(g,I,A){g.exports=A(26)()},function(g,I,A){"use strict";g.exports=A(25)},function(g,I,A){"use strict";!function g(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(g)}catch(g){console.error(g)}}}(),g.exports=A(21)},,function(g,I,A){g.exports=function g(I){"use strict";var A=/^\0+/g,C=/[\0\r\f]/g,e=/: */g,i=/zoo|gra/,t=/([,: ])(transform)/g,c=/,+\s*(?![^(]*[)])/g,n=/ +\s*(?![^(]*[)])/g,u=/ *[\0] */g,r=/,\r+?/g,b=/([\t\r\n ])*\f?&/g,a=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,l=/\W+/g,G=/@(k\w+)\s*(\S*)\s*/,o=/::(place)/g,s=/:(read-only)/g,x=/\s+(?=[{\];=:>])/g,d=/([[}=:>])\s+/g,B=/(\{[^{]+?);(?=\})/g,D=/\s{2,}/g,X=/([^\(])(:+) */g,y=/[svh]\w+-[tblr]{2}/,S=/\(\s*(.*)\s*\)/g,M=/([\s\S]*?);/g,p=/-self|flex-/g,f=/[^]*?(:[rp][el]a[\w-]+)[^]*/,m=/stretch|:\s*\w+\-(?:conte|avail)/,h=/([^-])(image-set\()/,w="-webkit-",Z="-moz-",F="-ms-",N=59,k=125,T=123,H=40,Y=41,E=91,K=93,W=10,V=13,L=9,O=64,R=32,v=38,Q=45,U=95,P=42,j=44,J=58,z=39,_=34,q=47,$=62,gg=43,Ig=126,Ag=0,Cg=12,eg=11,ig=107,tg=109,cg=115,ng=112,ug=111,rg=105,bg=99,ag=100,lg=112,Gg=1,og=1,sg=0,xg=1,dg=1,Bg=1,Dg=0,Xg=0,yg=0,Sg=[],Mg=[],pg=0,fg=null,mg=-2,hg=-1,wg=0,Zg=1,Fg=2,Ng=3,kg=0,Tg=1,Hg="",Yg="",Eg="";function Kg(g,I,e,i,t){for(var c,n,r=0,b=0,a=0,l=0,x=0,d=0,B=0,D=0,y=0,M=0,p=0,f=0,m=0,h=0,U=0,Dg=0,Mg=0,fg=0,mg=0,hg=e.length,Vg=hg-1,Ug="",Pg="",jg="",Jg="",zg="",_g="";U0&&(Pg=Pg.replace(C,"")),Pg.trim().length>0)){switch(B){case R:case L:case N:case V:case W:break;default:Pg+=e.charAt(U)}B=N}if(1===Mg)switch(B){case T:case k:case N:case _:case z:case H:case Y:case j:Mg=0;case L:case V:case W:case R:break;default:for(Mg=0,mg=U,x=B,U--,B=N;mg0&&(++U,B=x);case T:mg=hg}}switch(B){case T:for(x=(Pg=Pg.trim()).charCodeAt(0),p=1,mg=++U;U0&&(Pg=Pg.replace(C,"")),d=Pg.charCodeAt(1)){case ag:case tg:case cg:case Q:c=I;break;default:c=Sg}if(mg=(jg=Kg(I,c,jg,d,t+1)).length,yg>0&&0===mg&&(mg=Pg.length),pg>0&&(c=Wg(Sg,Pg,fg),n=vg(Ng,jg,c,I,og,Gg,mg,d,t,i),Pg=c.join(""),void 0!==n&&0===(mg=(jg=n.trim()).length)&&(d=0,jg="")),mg>0)switch(d){case cg:Pg=Pg.replace(S,Rg);case ag:case tg:case Q:jg=Pg+"{"+jg+"}";break;case ig:jg=(Pg=Pg.replace(G,"$1 $2"+(Tg>0?Hg:"")))+"{"+jg+"}",jg=1===dg||2===dg&&Og("@"+jg,3)?"@"+w+jg+"@"+jg:"@"+jg;break;default:jg=Pg+jg,i===lg&&(Jg+=jg,jg="")}else jg="";break;default:jg=Kg(I,Wg(I,Pg,fg),jg,i,t+1)}zg+=jg,f=0,Mg=0,h=0,Dg=0,fg=0,m=0,Pg="",jg="",B=e.charCodeAt(++U);break;case k:case N:if((mg=(Pg=(Dg>0?Pg.replace(C,""):Pg).trim()).length)>1)switch(0===h&&((x=Pg.charCodeAt(0))===Q||x>96&&x<123)&&(mg=(Pg=Pg.replace(" ",":")).length),pg>0&&void 0!==(n=vg(Zg,Pg,I,g,og,Gg,Jg.length,i,t,i))&&0===(mg=(Pg=n.trim()).length)&&(Pg="\0\0"),x=Pg.charCodeAt(0),d=Pg.charCodeAt(1),x){case Ag:break;case O:if(d===rg||d===bg){_g+=Pg+e.charAt(U);break}default:if(Pg.charCodeAt(mg-1)===J)break;Jg+=Lg(Pg,x,d,Pg.charCodeAt(2))}f=0,Mg=0,h=0,Dg=0,fg=0,Pg="",B=e.charCodeAt(++U)}}switch(B){case V:case W:if(b+l+a+r+Xg===0)switch(M){case Y:case z:case _:case O:case Ig:case $:case P:case gg:case q:case Q:case J:case j:case N:case T:case k:break;default:h>0&&(Mg=1)}b===q?b=0:xg+f===0&&i!==ig&&Pg.length>0&&(Dg=1,Pg+="\0"),pg*kg>0&&vg(wg,Pg,I,g,og,Gg,Jg.length,i,t,i),Gg=1,og++;break;case N:case k:if(b+l+a+r===0){Gg++;break}default:switch(Gg++,Ug=e.charAt(U),B){case L:case R:if(l+r+b===0)switch(D){case j:case J:case L:case R:Ug="";break;default:B!==R&&(Ug=" ")}break;case Ag:Ug="\\0";break;case Cg:Ug="\\f";break;case eg:Ug="\\v";break;case v:l+b+r===0&&xg>0&&(fg=1,Dg=1,Ug="\f"+Ug);break;case 108:if(l+b+r+sg===0&&h>0)switch(U-h){case 2:D===ng&&e.charCodeAt(U-3)===J&&(sg=D);case 8:y===ug&&(sg=y)}break;case J:l+b+r===0&&(h=U);break;case j:b+a+l+r===0&&(Dg=1,Ug+="\r");break;case _:case z:0===b&&(l=l===B?0:0===l?B:l);break;case E:l+b+a===0&&r++;break;case K:l+b+a===0&&r--;break;case Y:l+b+r===0&&a--;break;case H:if(l+b+r===0){if(0===f)switch(2*D+3*y){case 533:break;default:p=0,f=1}a++}break;case O:b+a+l+r+h+m===0&&(m=1);break;case P:case q:if(l+r+a>0)break;switch(b){case 0:switch(2*B+3*e.charCodeAt(U+1)){case 235:b=q;break;case 220:mg=U,b=P}break;case P:B===q&&D===P&&mg+2!==U&&(33===e.charCodeAt(mg+2)&&(Jg+=e.substring(mg,U+1)),Ug="",b=0)}}if(0===b){if(xg+l+r+m===0&&i!==ig&&B!==N)switch(B){case j:case Ig:case $:case gg:case Y:case H:if(0===f){switch(D){case L:case R:case W:case V:Ug+="\0";break;default:Ug="\0"+Ug+(B===j?"":"\0")}Dg=1}else switch(B){case H:h+7===U&&108===D&&(h=0),f=++p;break;case Y:0==(f=--p)&&(Dg=1,Ug+="\0")}break;case L:case R:switch(D){case Ag:case T:case k:case N:case j:case Cg:case L:case R:case W:case V:break;default:0===f&&(Dg=1,Ug+="\0")}}Pg+=Ug,B!==R&&B!==L&&(M=B)}}y=D,D=B,U++}if(mg=Jg.length,yg>0&&0===mg&&0===zg.length&&0===I[0].length==0&&(i!==tg||1===I.length&&(xg>0?Yg:Eg)===I[0])&&(mg=I.join(",").length+2),mg>0){if(c=0===xg&&i!==ig?function(g){for(var I,A,e=0,i=g.length,t=Array(i);e1)){if(a=n.charCodeAt(n.length-1),l=A.charCodeAt(0),I="",0!==r)switch(a){case P:case Ig:case $:case gg:case R:case H:break;default:I=" "}switch(l){case v:A=I+Yg;case Ig:case $:case gg:case R:case Y:case H:break;case E:A=I+A+Yg;break;case J:switch(2*A.charCodeAt(1)+3*A.charCodeAt(2)){case 530:if(Bg>0){A=I+A.substring(8,b-1);break}default:(r<1||c[r-1].length<1)&&(A=I+Yg+A)}break;case j:I="";default:A=b>1&&A.indexOf(":")>0?I+A.replace(X,"$1"+Yg+"$2"):I+A+Yg}n+=A}t[e]=n.replace(C,"").trim()}return t}(I):I,pg>0&&void 0!==(n=vg(Fg,Jg,c,g,og,Gg,mg,i,t,i))&&0===(Jg=n).length)return _g+Jg+zg;if(Jg=c.join(",")+"{"+Jg+"}",dg*sg!=0){switch(2!==dg||Og(Jg,2)||(sg=0),sg){case ug:Jg=Jg.replace(s,":"+Z+"$1")+Jg;break;case ng:Jg=Jg.replace(o,"::"+w+"input-$1")+Jg.replace(o,"::"+Z+"$1")+Jg.replace(o,":"+F+"input-$1")+Jg}sg=0}}return _g+Jg+zg}function Wg(g,I,A){var C=I.trim().split(r),e=C,i=C.length,t=g.length;switch(t){case 0:case 1:for(var c=0,n=0===t?"":g[0]+" ";c0&&xg>0)return e.replace(a,"$1").replace(b,"$1"+Eg);break;default:return g.trim()+e.replace(b,"$1"+g.trim())}default:if(A*xg>0&&e.indexOf("\f")>0)return e.replace(b,(g.charCodeAt(0)===J?"":"$1")+g.trim())}return g+e}function Lg(g,I,A,C){var u,r=0,b=g+";",a=2*I+3*A+4*C;if(944===a)return function(g){var I=g.length,A=g.indexOf(":",9)+1,C=g.substring(0,A).trim(),e=g.substring(A,I-1).trim();switch(g.charCodeAt(9)*Tg){case 0:break;case Q:if(110!==g.charCodeAt(10))break;default:var i=e.split((e="",c)),t=0;for(A=0,I=i.length;tO&&b<90||b>96&&b<123||b===U||b===Q&&u.charCodeAt(1)!==Q))switch(isNaN(parseFloat(u))+(-1!==u.indexOf("("))){case 1:switch(u){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:u+=Hg}}r[A++]=u}e+=(0===t?"":",")+r.join(" ")}}return e=C+e+";",1===dg||2===dg&&Og(e,1)?w+e+e:e}(b);if(0===dg||2===dg&&!Og(b,1))return b;switch(a){case 1015:return 97===b.charCodeAt(10)?w+b+b:b;case 951:return 116===b.charCodeAt(3)?w+b+b:b;case 963:return 110===b.charCodeAt(5)?w+b+b:b;case 1009:if(100!==b.charCodeAt(4))break;case 969:case 942:return w+b+b;case 978:return w+b+Z+b+b;case 1019:case 983:return w+b+Z+b+F+b+b;case 883:return b.charCodeAt(8)===Q?w+b+b:b.indexOf("image-set(",11)>0?b.replace(h,"$1"+w+"$2")+b:b;case 932:if(b.charCodeAt(4)===Q)switch(b.charCodeAt(5)){case 103:return w+"box-"+b.replace("-grow","")+w+b+F+b.replace("grow","positive")+b;case 115:return w+b+F+b.replace("shrink","negative")+b;case 98:return w+b+F+b.replace("basis","preferred-size")+b}return w+b+F+b+b;case 964:return w+b+F+"flex-"+b+b;case 1023:if(99!==b.charCodeAt(8))break;return u=b.substring(b.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),w+"box-pack"+u+w+b+F+"flex-pack"+u+b;case 1005:return i.test(b)?b.replace(e,":"+w)+b.replace(e,":"+Z)+b:b;case 1e3:switch(r=(u=b.substring(13).trim()).indexOf("-")+1,u.charCodeAt(0)+u.charCodeAt(r)){case 226:u=b.replace(y,"tb");break;case 232:u=b.replace(y,"tb-rl");break;case 220:u=b.replace(y,"lr");break;default:return b}return w+b+F+u+b;case 1017:if(-1===b.indexOf("sticky",9))return b;case 975:switch(r=(b=g).length-10,a=(u=(33===b.charCodeAt(r)?b.substring(0,r):b).substring(g.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|u.charCodeAt(7))){case 203:if(u.charCodeAt(8)<111)break;case 115:b=b.replace(u,w+u)+";"+b;break;case 207:case 102:b=b.replace(u,w+(a>102?"inline-":"")+"box")+";"+b.replace(u,w+u)+";"+b.replace(u,F+u+"box")+";"+b}return b+";";case 938:if(b.charCodeAt(5)===Q)switch(b.charCodeAt(6)){case 105:return u=b.replace("-items",""),w+b+w+"box-"+u+F+"flex-"+u+b;case 115:return w+b+F+"flex-item-"+b.replace(p,"")+b;default:return w+b+F+"flex-line-pack"+b.replace("align-content","").replace(p,"")+b}break;case 973:case 989:if(b.charCodeAt(3)!==Q||122===b.charCodeAt(4))break;case 931:case 953:if(!0===m.test(g))return 115===(u=g.substring(g.indexOf(":")+1)).charCodeAt(0)?Lg(g.replace("stretch","fill-available"),I,A,C).replace(":fill-available",":stretch"):b.replace(u,w+u)+b.replace(u,Z+u.replace("fill-",""))+b;break;case 962:if(b=w+b+(102===b.charCodeAt(5)?F+b:"")+b,A+C===211&&105===b.charCodeAt(13)&&b.indexOf("transform",10)>0)return b.substring(0,b.indexOf(";",27)+1).replace(t,"$1"+w+"$2")+b}return b}function Og(g,I){var A=g.indexOf(1===I?":":"{"),C=g.substring(0,3!==I?A:10),e=g.substring(A+1,g.length-1);return fg(2!==I?C:C.replace(f,"$1"),e,I)}function Rg(g,I){var A=Lg(I,I.charCodeAt(0),I.charCodeAt(1),I.charCodeAt(2));return A!==I+";"?A.replace(M," or ($1)").substring(4):"("+I+")"}function vg(g,I,A,C,e,i,t,c,n,u){for(var r,b=0,a=I;b0&&(Hg=e.replace(l,i===E?"":"-")),i=1,1===xg?Eg=e:Yg=e;var t,c=[Eg];pg>0&&void 0!==(t=vg(hg,A,c,c,og,Gg,0,0,0,0))&&"string"==typeof t&&(A=t);var n=Kg(Sg,c,A,0,0);return pg>0&&void 0!==(t=vg(mg,n,c,c,og,Gg,n.length,0,0,0))&&"string"!=typeof(n=t)&&(i=0),Hg="",Eg="",Yg="",sg=0,og=1,Gg=1,Dg*i==0?n:n.replace(C,"").replace(x,"").replace(d,"$1").replace(B,"$1").replace(D," ")}return Pg.use=function g(I){switch(I){case void 0:case null:pg=Mg.length=0;break;default:if("function"==typeof I)Mg[pg++]=I;else if("object"==typeof I)for(var A=0,C=I.length;A result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke("throw", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new Promise(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList) {\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList)\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error("Generator is already running");\n }\n\n if (state === GenStateCompleted) {\n if (method === "throw") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === "next") {\n // Setting context._sent for legacy support of Babel\'s\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === "throw") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === "return") {\n context.abrupt("return", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === "normal") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === "throw") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = "throw";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === "throw") {\n // Note: ["return"] must be used for ES3 parsing compatibility.\n if (delegate.iterator["return"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = "return";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === "throw") {\n // If maybeInvokeDelegate(context) changed context.method from\n // "return" to "throw", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = "throw";\n context.arg = new TypeError(\n "The iterator does not provide a \'throw\' method");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === "throw") {\n context.method = "throw";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = "throw";\n context.arg = new TypeError("iterator result is not an object");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was "throw" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was "next", forget context.arg since it has been\n // "consumed" by the delegate iterator. If context.method was\n // "return", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== "return") {\n context.method = "next";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = "Generator";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers\' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn\'t happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return "[object Generator]";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = "normal";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: "root" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === "function") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel\'s\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = "next";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === "t" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === "throw") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = "throw";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = "next";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === "root") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle("end");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, "catchLoc");\n var hasFinally = hasOwn.call(entry, "finallyLoc");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error("try statement without catch or finally");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, "finallyLoc") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === "break" ||\n type === "continue") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = "next";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === "throw") {\n throw record.arg;\n }\n\n if (record.type === "break" ||\n record.type === "continue") {\n this.next = record.arg;\n } else if (record.type === "return") {\n this.rval = this.arg = record.arg;\n this.method = "return";\n this.next = "end";\n } else if (record.type === "normal" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n "catch": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === "throw") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error("illegal catch attempt");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === "next") {\n // Deliberately forget the last sent value so that we don\'t\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n true ? module.exports : undefined\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you\'ve misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you\'re not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function("r", "regeneratorRuntime = r")(runtime);\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiNy5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL3dlYi1taWRpLXBsYXllci8uL25vZGVfbW9kdWxlcy9yZWdlbmVyYXRvci1ydW50aW1lL3J1bnRpbWUuanM/OTZjZiJdLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIENvcHlyaWdodCAoYykgMjAxNC1wcmVzZW50LCBGYWNlYm9vaywgSW5jLlxuICpcbiAqIFRoaXMgc291cmNlIGNvZGUgaXMgbGljZW5zZWQgdW5kZXIgdGhlIE1JVCBsaWNlbnNlIGZvdW5kIGluIHRoZVxuICogTElDRU5TRSBmaWxlIGluIHRoZSByb290IGRpcmVjdG9yeSBvZiB0aGlzIHNvdXJjZSB0cmVlLlxuICovXG5cbnZhciBydW50aW1lID0gKGZ1bmN0aW9uIChleHBvcnRzKSB7XG4gIFwidXNlIHN0cmljdFwiO1xuXG4gIHZhciBPcCA9IE9iamVjdC5wcm90b3R5cGU7XG4gIHZhciBoYXNPd24gPSBPcC5oYXNPd25Qcm9wZXJ0eTtcbiAgdmFyIHVuZGVmaW5lZDsgLy8gTW9yZSBjb21wcmVzc2libGUgdGhhbiB2b2lkIDAuXG4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gICB9IGVsc2UgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInRocm93XCIpIHtcbiAgICAgICAgICBpZiAoc3RhdGUgPT09IEdlblN0YXRlU3VzcGVuZGVkU3RhcnQpIHtcbiAgICAgICAgICAgIHN0YXRlID0gR2VuU3RhdGVDb21wbGV0ZWQ7XG4gICAgICAgICAgICB0aHJvdyBjb250ZXh0LmFyZztcbiAgICAgICAgICB9XG5cbiAgICAgICAgICBjb250ZXh0LmRpc3BhdGNoRXhjZXB0aW9uKGNvbnRleHQuYXJnKTtcblxuICAgICAgICB9IGVsc2UgaWYgKGNvbnRleHQubWV0aG9kID09PSBcInJldHVyblwiKSB7XG4gICAgICAgICAgY29udGV4dC5hYnJ1cHQoXCJyZXR1cm5cIiwgY29udGV4dC5hcmcpO1xuICAgICAgICB9XG5cbiAgICAgICAgc3RhdGUgPSBHZW5TdGF0ZUV4ZWN1dGluZztcblxuICAgICAgICB2YXIgcmVjb3JkID0gdHJ5Q2F0Y2goaW5uZXJGbiwgc2VsZiwgY29udGV4dCk7XG4gICAgICAgIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIikge1xuICAgICAgICAgIC8vIElmIGFuIGV4Y2VwdGlvbiBpcyB0aHJvd24gZnJvbSBpbm5lckZuLCB3ZSBsZWF2ZSBzdGF0ZSA9PT1cbiAgICAgICAgICAvLyBHZW5TdGF0ZUV4ZWN1dGluZyBhbmQgbG9vcCBiYWNrIGZvciBhbm90aGVyIGludm9jYXRpb24uXG4gICAgICAgICAgc3RhdGUgPSBjb250ZXh0LmRvbmVcbiAgICAgICAgICAgID8gR2VuU3RhdGVDb21wbGV0ZWRcbiAgICAgICAgICAgIDogR2VuU3RhdGVTdXNwZW5kZWRZaWVsZDtcblxuICAgICAgICAgIGlmIChyZWNvcmQuYXJnID09PSBDb250aW51ZVNlbnRpbmVsKSB7XG4gICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICB9XG5cbiAgICAgICAgICByZXR1cm4ge1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gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0NhdGNoKSB7XG4gICAgICAgICAgICBpZiAodGhpcy5wcmV2IDwgZW50cnkuY2F0Y2hMb2MpIHtcbiAgICAgICAgICAgICAgcmV0dXJuIGhhbmRsZShlbnRyeS5jYXRjaExvYywgdHJ1ZSk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2UgaWYgKGhhc0ZpbmFsbHkpIHtcbiAgICAgICAgICAgIGlmICh0aGlzLnByZXYgPCBlbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgICAgICAgIHJldHVybiBoYW5kbGUoZW50cnkuZmluYWxseUxvYyk7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFwidHJ5IHN0YXRlbWVudCB3aXRob3V0IGNhdGNoIG9yIGZpbmFsbHlcIik7XG4gICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICB9XG4gICAgfSxcblxuICAgIGFicnVwdDogZnVuY3Rpb24odHlwZSwgYXJnKSB7XG4gICAgICBmb3IgKHZhciBpID0gdGhpcy50cnlFbnRyaWVzLmxlbmd0aCAtIDE7IGkgPj0gMDsgLS1pKSB7XG4gICAgICAgIHZhciBlbnRyeSA9IHRoaXMudHJ5RW50cmllc1tpXTtcbiAgICAgICAgaWYgKGVudHJ5LnRyeUxvYyA8PSB0aGlzLnByZXYgJiZcbiAgICAgICAgICAgIGhhc093bi5jYWxsKGVudHJ5LCBcImZpbmFsbHlMb2NcIikgJiZcbiAgICAgICAgICAgIHRoaXMucHJldiA8IGVudHJ5LmZpbmFsbHlMb2MpIHtcbiAgICAgICAgICB2YXIgZmluYWxseUVudHJ5ID0gZW50cnk7XG4gICAgICAgICAgYnJlYWs7XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgaWYgKGZpbmFsbHlFbnRyeSAmJlxuICAgICAgICAgICh0eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICAgdHlwZSA9PT0gXCJjb250aW51ZVwiKSAmJlxuICAgICAgICAgIGZpbmFsbHlFbnRyeS50cnlMb2MgPD0gYXJnICYmXG4gICAgICAgICAgYXJnIDw9IGZpbmFsbHlFbnRyeS5maW5hbGx5TG9jKSB7XG4gICAgICAgIC8vIElnbm9yZSB0aGUgZmluYWxseSBlbnRyeSBpZiBjb250cm9sIGlzIG5vdCBqdW1waW5nIHRvIGFcbiAgICAgICAgLy8gbG9jYXRpb24gb3V0c2lkZSB0aGUgdHJ5L2NhdGNoIGJsb2NrLlxuICAgICAgICBmaW5hbGx5RW50cnkgPSBudWxsO1xuICAgICAgfVxuXG4gICAgICB2YXIgcmVjb3JkID0gZmluYWxseUVudHJ5ID8gZmluYWxseUVudHJ5LmNvbXBsZXRpb24gOiB7fTtcbiAgICAgIHJlY29yZC50eXBlID0gdHlwZTtcbiAgICAgIHJlY29yZC5hcmcgPSBhcmc7XG5cbiAgICAgIGlmIChmaW5hbGx5RW50cnkpIHtcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcIm5leHRcIjtcbiAgICAgICAgdGhpcy5uZXh0ID0gZmluYWxseUVudHJ5LmZpbmFsbHlMb2M7XG4gICAgICAgIHJldHVybiBDb250aW51ZVNlbnRpbmVsO1xuICAgICAgfVxuXG4gICAgICByZXR1cm4gdGhpcy5jb21wbGV0ZShyZWNvcmQpO1xuICAgIH0sXG5cbiAgICBjb21wbGV0ZTogZnVuY3Rpb24ocmVjb3JkLCBhZnRlckxvYykge1xuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcInRocm93XCIpIHtcbiAgICAgICAgdGhyb3cgcmVjb3JkLmFyZztcbiAgICAgIH1cblxuICAgICAgaWYgKHJlY29yZC50eXBlID09PSBcImJyZWFrXCIgfHxcbiAgICAgICAgICByZWNvcmQudHlwZSA9PT0gXCJjb250aW51ZVwiKSB7XG4gICAgICAgIHRoaXMubmV4dCA9IHJlY29yZC5hcmc7XG4gICAgICB9IGVsc2UgaWYgKHJlY29yZC50eXBlID09PSBcInJldHVyblwiKSB7XG4gICAgICAgIHRoaXMucnZhbCA9IHRoaXMuYXJnID0gcmVjb3JkLmFyZztcbiAgICAgICAgdGhpcy5tZXRob2QgPSBcInJldHVyblwiO1xuICAgICAgICB0aGlzLm5leHQgPSBcImVuZFwiO1xuICAgICAgfSBlbHNlIGlmIChyZWNvcmQudHlwZSA9PT0gXCJub3JtYWxcIiAmJiBhZnRlckxvYykge1xuICAgICAgICB0aGlzLm5leHQgPSBhZnRlckxvYztcbiAgICAgIH1cblxuICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgfSxcblxuICAgIGZpbmlzaDogZnVuY3Rpb24oZmluYWxseUxvYykge1xuICAgICAgZm9yICh2YXIgaSA9IHRoaXMudHJ5RW50cmllcy5sZW5ndGggLSAxOyBpID49IDA7IC0taSkge1xuICAgICAgICB2YXIgZW50cnkgPSB0aGlzLnRyeUVudHJpZXNbaV07XG4gICAgICAgIGlmIChlbnRyeS5maW5hbGx5TG9jID09PSBmaW5hbGx5TG9jKSB7XG4gICAgICAgICAgdGhpcy5jb21wbGV0ZShlbnRyeS5jb21wbGV0aW9uLCBlbnRyeS5hZnRlckxvYyk7XG4gICAgICAgICAgcmVzZXRUcnlFbnRyeShlbnRyeSk7XG4gICAgICAgICAgcmV0dXJuIENvbnRpbnVlU2VudGluZWw7XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICB9LFxuXG4gICAgXCJjYXRjaFwiOiBmdW5jdGlvbih0cnlMb2MpIHtcbiAgICAgIGZvciAodmFyIGkgPSB0aGlzLnRyeUVudHJpZXMubGVuZ3RoIC0gMTsgaSA+PSAwOyAtLWkpIHtcbiAgICAgICAgdmFyIGVudHJ5ID0gdGhpcy50cnlFbnRyaWVzW2ldO1xuICAgICAgICBpZiAoZW50cnkudHJ5TG9jID09PSB0cnlMb2MpIHtcbiAgICAgICAgICB2YXIgcmVjb3JkID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FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///7\n')},function(module,exports){eval("// Unique ID creation requires a high quality random # generator. In the\n// browser this is a little complicated due to unknown quality of Math.random()\n// and inconsistent support for the `crypto` API. We do the best we can via\n// feature-detection\n\n// getRandomValues needs to be invoked in a context where \"this\" is a Crypto\n// implementation. Also, find the complete implementation of crypto on IE11.\nvar getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||\n (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));\n\nif (getRandomValues) {\n // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto\n var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef\n\n module.exports = function whatwgRNG() {\n getRandomValues(rnds8);\n return rnds8;\n };\n} else {\n // Math.random()-based (RNG)\n //\n // If all else fails, use Math.random(). It's fast, but is of unspecified\n // quality.\n var rnds = new Array(16);\n\n module.exports = function mathRNG() {\n for (var i = 0, r; i < 16; i++) {\n if ((i & 0x03) === 0) r = Math.random() * 0x100000000;\n rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;\n }\n\n return rnds;\n };\n}\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOC5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL3dlYi1taWRpLXBsYXllci8uL25vZGVfbW9kdWxlcy91dWlkL2xpYi9ybmctYnJvd3Nlci5qcz9lMWY0Il0sInNvdXJjZXNDb250ZW50IjpbIi8vIFVuaXF1ZSBJRCBjcmVhdGlvbiByZXF1aXJlcyBhIGhpZ2ggcXVhbGl0eSByYW5kb20gIyBnZW5lcmF0b3IuICBJbiB0aGVcbi8vIGJyb3dzZXIgdGhpcyBpcyBhIGxpdHRsZSBjb21wbGljYXRlZCBkdWUgdG8gdW5rbm93biBxdWFsaXR5IG9mIE1hdGgucmFuZG9tKClcbi8vIGFuZCBpbmNvbnNpc3RlbnQgc3VwcG9ydCBmb3IgdGhlIGBjcnlwdG9gIEFQSS4gIFdlIGRvIHRoZSBiZXN0IHdlIGNhbiB2aWFcbi8vIGZlYXR1cmUtZGV0ZWN0aW9uXG5cbi8vIGdldFJhbmRvbVZhbHVlcyBuZWVkc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XG4gIHZhciBybmRzID0gbmV3IEFycmF5KDE2KTtcblxuICBtb2R1bGUuZXhwb3J0cyA9IGZ1bmN0aW9uIG1hdGhSTkcoKSB7XG4gICAgZm9yICh2YXIgaSA9IDAsIHI7IGkgPCAxNjsgaSsrKSB7XG4gICAgICBpZiAoKGkgJiAweDAzKSA9PT0gMCkgciA9IE1hdGgucmFuZG9tKCkgKiAweDEwMDAwMDAwMDtcbiAgICAgIHJuZHNbaV0gPSByID4+PiAoKGkgJiAweDAzKSA8PCAzKSAmIDB4ZmY7XG4gICAgfVxuXG4gICAgcmV0dXJuIHJuZHM7XG4gIH07XG59XG4iXSwibWFwcGluZ3MiOiJBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOyIsInNvdXJjZVJvb3QiOiIifQ==\n//# sourceURL=webpack-internal:///8\n")},function(module,exports){eval("/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\nvar byteToHex = [];\nfor (var i = 0; i < 256; ++i) {\n byteToHex[i] = (i + 0x100).toString(16).substr(1);\n}\n\nfunction bytesToUuid(buf, offset) {\n var i = offset || 0;\n var bth = byteToHex;\n // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4\n return ([\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]], '-',\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]],\n bth[buf[i++]], bth[buf[i++]]\n ]).join('');\n}\n\nmodule.exports = bytesToUuid;\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOS5qcyIsInNvdXJjZXMiOlsid2VicGFjazovL3dlYi1taWRpLXBsYXllci8uL25vZGVfbW9kdWxlcy91dWlkL2xpYi9ieXRlc1RvVXVpZC5qcz8yMzY2Il0sInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogQ29udmVydCBhcnJheSBvZiAxNiBieXRlIHZhbHVlcyB0byBVVUlEIHN0cmluZyBmb3JtYXQgb2YgdGhlIGZvcm06XG4gKiBYWFhYWFhYWC1YWFhYLVhYWFgtWFhYWC1YWFhYWFhYWFhYWFhcbiAqL1xudmFyIGJ5dGVUb0hleCA9IFtdO1xuZm9yICh2YXIgaSA9IDA7IGkgPCAyNTY7ICsraSkge1xuICBieXRlVG9IZXhbaV0gPSAoaSArIDB4MTAwKS50b1N0cmluZygxNikuc3Vic3RyKDEpO1xufVxuXG5mdW5jdGlvbiBieXRlc1RvVXVpZChidWYsIG9mZnNldCkge1xuICB2YXIgaSA9IG9mZnNldCB8fCAwO1xuICB2YXIgYnRoID0gYnl0ZVRvSGV4O1xuICAvLyBqb2luIHVzZWQgdG8gZml4IG1lbW9yeSBpc3N1ZSBjYXVzZWQgYnkgY29uY2F0ZW5hdGlvbjogaHR0cHM6Ly9idWdzLmNocm9taXVtLm9yZy9wL3Y4L2lzc3Vlcy9kZXRhaWw/aWQ9MzE3NSNjNFxuICByZXR1cm4gKFtcbiAgICBidGhbYnVmW2krK11dLCBidGhbYnVmW2krK11dLFxuICAgIGJ0aFtidWZbaSsrXV0sIGJ0aFtidWZbaSsrXV0sICctJyxcbiAgICBidGhbYnVmW2krK11dLCBidGhbYnVmW2krK11dLCAnLScsXG4gICAgYnRoW2J1ZltpKytdXSwgYnRoW2J1ZltpKytdXSwgJy0nLFxuICAgIGJ0aFtidWZbaSsrXV0sIGJ0aFtidWZbaSsrXV0sICctJyxcbiAgICBidGhbYnVmW2krK11dLCBidGhbYnVmW2krK11dLFxuICAgIGJ0aFtidWZbaSsrXV0sIGJ0aFtidWZbaSsrXV0sXG4gICAgYnRoW2J1ZltpKytdXSwgYnRoW2J1ZltpKytdXVxuICBdKS5qb2luKCcnKTtcbn1cblxubW9kdWxlLmV4cG9ydHMgPSBieXRlc1RvVXVpZDtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///9\n")},function(module,exports,__webpack_require__){"use strict";eval("\n\nmodule.exports = function() {\n throw new Error(\n 'ws does not work in the browser. Browser clients must use the native ' +\n 'WebSocket object'\n );\n};\n//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMTAuanMiLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly93ZWItbWlkaS1wbGF5ZXIvLi9ub2RlX21vZHVsZXMvd3MvYnJvd3Nlci5qcz83ZjczIl0sInNvdXJjZXNDb250ZW50IjpbIid1c2Ugc3RyaWN0JztcblxubW9kdWxlLmV4cG9ydHMgPSBmdW5jdGlvbigpIHtcbiAgdGhyb3cgbmV3IEVycm9yKFxuICAgICd3cyBkb2VzIG5vdCB3b3JrIGluIHRoZSBicm93c2VyLiBCcm93c2VyIGNsaWVudHMgbXVzdCB1c2UgdGhlIG5hdGl2ZSAnICtcbiAgICAgICdXZWJTb2NrZXQgb2JqZWN0J1xuICApO1xufTtcbiJdLCJtYXBwaW5ncyI6IkFBQUE7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTsiLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///10\n")},function(module,__webpack_exports__,__webpack_require__){"use strict";eval("__webpack_require__.r(__webpack_exports__);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js\nvar regenerator = __webpack_require__(1);\nvar regenerator_default = /*#__PURE__*/__webpack_require__.n(regenerator);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/asyncToGenerator.js\nvar asyncToGenerator = __webpack_require__(2);\nvar asyncToGenerator_default = /*#__PURE__*/__webpack_require__.n(asyncToGenerator);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/classCallCheck.js\nvar classCallCheck = __webpack_require__(3);\nvar classCallCheck_default = /*#__PURE__*/__webpack_require__.n(classCallCheck);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/createClass.js\nvar createClass = __webpack_require__(4);\nvar createClass_default = /*#__PURE__*/__webpack_require__.n(createClass);\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/defineProperty.js\nvar defineProperty = __webpack_require__(0);\nvar defineProperty_default = /*#__PURE__*/__webpack_require__.n(defineProperty);\n\n// EXTERNAL MODULE: ./node_modules/uuid/v4.js\nvar v4 = __webpack_require__(6);\nvar v4_default = /*#__PURE__*/__webpack_require__.n(v4);\n\n// CONCATENATED MODULE: ./src/constants.js\nvar MAX_I16 = Math.pow(2, 15);\nvar MIDI_AUDIO_BUFFER_SIZE = 8192;\nvar MIDI_AUDIO_S16LSB = 0x8010;\nvar MIDI_DEFAULT_PATCH_URL = 'https://cdn.jsdelivr.net/npm/midi-instrument-patches@latest/';\nvar MIDI_PLAYER_MESSAGE_PREFIX = 'Midi player:';\nvar LIBTIMIDITY_PATCH_DIRECTORY = 'pat';\nvar LIBTIMIDITY_PATCH_DRUM_DIRECTORY = 'MT32Drums';\nvar LIBTIMIDITY_CONFIG_FILE = 'timidity.cfg';\nvar LIBTIMIDITY_ERROR_CODES = {\n EPERM: 1,\n ENOENT: 2,\n ESRCH: 3,\n EINTR: 4,\n EIO: 5,\n ENXIO: 6,\n E2BIG: 7,\n ENOEXEC: 8,\n EBADF: 9,\n ECHILD: 10,\n EAGAIN: 11,\n EWOULDBLOCK: 11,\n ENOMEM: 12,\n EACCES: 13,\n EFAULT: 14,\n ENOTBLK: 15,\n EBUSY: 16,\n EEXIST: 17,\n EXDEV: 18,\n ENODEV: 19,\n ENOTDIR: 20,\n EISDIR: 21,\n EINVAL: 22,\n ENFILE: 23,\n EMFILE: 24,\n ENOTTY: 25,\n ETXTBSY: 26,\n EFBIG: 27,\n ENOSPC: 28,\n ESPIPE: 29,\n EROFS: 30,\n EMLINK: 31,\n EPIPE: 32,\n EDOM: 33,\n ERANGE: 34,\n ENOMSG: 42,\n EIDRM: 43,\n ECHRNG: 44,\n EL2NSYNC: 45,\n EL3HLT: 46,\n EL3RST: 47,\n ELNRNG: 48,\n EUNATCH: 49,\n ENOCSI: 50,\n EL2HLT: 51,\n EDEADLK: 35,\n ENOLCK: 37,\n EBADE: 52,\n EBADR: 53,\n EXFULL: 54,\n ENOANO: 55,\n EBADRQC: 56,\n EBADSLT: 57,\n EDEADLOCK: 35,\n EBFONT: 59,\n ENOSTR: 60,\n ENODATA: 61,\n ETIME: 62,\n ENOSR: 63,\n ENONET: 64,\n ENOPKG: 65,\n EREMOTE: 66,\n ENOLINK: 67,\n EADV: 68,\n ESRMNT: 69,\n ECOMM: 70,\n EPROTO: 71,\n EMULTIHOP: 72,\n EDOTDOT: 73,\n EBADMSG: 74,\n ENOTUNIQ: 76,\n EBADFD: 77,\n EREMCHG: 78,\n ELIBACC: 79,\n ELIBBAD: 80,\n ELIBSCN: 81,\n ELIBMAX: 82,\n ELIBEXEC: 83,\n ENOSYS: 38,\n ENOTEMPTY: 39,\n ENAMETOOLONG: 36,\n ELOOP: 40,\n EOPNOTSUPP: 95,\n EPFNOSUPPORT: 96,\n ECONNRESET: 104,\n ENOBUFS: 105,\n EAFNOSUPPORT: 97,\n EPROTOTYPE: 91,\n ENOTSOCK: 88,\n ENOPROTOOPT: 92,\n ESHUTDOWN: 108,\n ECONNREFUSED: 111,\n EADDRINUSE: 98,\n ECONNABORTED: 103,\n ENETUNREACH: 101,\n ENETDOWN: 100,\n ETIMEDOUT: 110,\n EHOSTDOWN: 112,\n EHOSTUNREACH: 113,\n EINPROGRESS: 115,\n EALREADY: 114,\n EDESTADDRREQ: 89,\n EMSGSIZE: 90,\n EPROTONOSUPPORT: 93,\n ESOCKTNOSUPPORT: 94,\n EADDRNOTAVAIL: 99,\n ENETRESET: 102,\n EISCONN: 106,\n ENOTCONN: 107,\n ETOOMANYREFS: 109,\n EUSERS: 87,\n EDQUOT: 122,\n ESTALE: 116,\n ENOTSUP: 95,\n ENOMEDIUM: 123,\n EILSEQ: 84,\n EOVERFLOW: 75,\n ECANCELED: 125,\n ENOTRECOVERABLE: 131,\n EOWNERDEAD: 130,\n ESTRPIPE: 86\n};\nvar LIBTIMIDITY_ERROR_MESSAGES = {\n 0: 'Success',\n 1: 'Not super-user',\n 2: 'No such file or directory',\n 3: 'No such process',\n 4: 'Interrupted system call',\n 5: 'I/O error',\n 6: 'No such device or address',\n 7: 'Arg list too long',\n 8: 'Exec format error',\n 9: 'Bad file number',\n 10: 'No children',\n 11: 'No more processes',\n 12: 'Not enough core',\n 13: 'Permission denied',\n 14: 'Bad address',\n 15: 'Block device required',\n 16: 'Mount device busy',\n 17: 'File exists',\n 18: 'Cross-device link',\n 19: 'No such device',\n 20: 'Not a directory',\n 21: 'Is a directory',\n 22: 'Invalid argument',\n 23: 'Too many open files in system',\n 24: 'Too many open files',\n 25: 'Not a typewriter',\n 26: 'Text file busy',\n 27: 'File too large',\n 28: 'No space left on device',\n 29: 'Illegal seek',\n 30: 'Read only file system',\n 31: 'Too many links',\n 32: 'Broken pipe',\n 33: 'Math arg out of domain of func',\n 34: 'Math result not representable',\n 35: 'File locking deadlock error',\n 36: 'File or path name too long',\n 37: 'No record locks available',\n 38: 'Function not implemented',\n 39: 'Directory not empty',\n 40: 'Too many symbolic links',\n 42: 'No message of desired type',\n 43: 'Identifier removed',\n 44: 'Channel number out of range',\n 45: 'Level 2 not synchronized',\n 46: 'Level 3 halted',\n 47: 'Level 3 reset',\n 48: 'Link number out of range',\n 49: 'Protocol driver not attached',\n 50: 'No CSI structure available',\n 51: 'Level 2 halted',\n 52: 'Invalid exchange',\n 53: 'Invalid request descriptor',\n 54: 'Exchange full',\n 55: 'No anode',\n 56: 'Invalid request code',\n 57: 'Invalid slot',\n 59: 'Bad font file fmt',\n 60: 'Device not a stream',\n 61: 'No data (for no delay io)',\n 62: 'Timer expired',\n 63: 'Out of streams resources',\n 64: 'Machine is not on the network',\n 65: 'Package not installed',\n 66: 'The object is remote',\n 67: 'The link has been severed',\n 68: 'Advertise error',\n 69: 'Srmount error',\n 70: 'Communication error on send',\n 71: 'Protocol error',\n 72: 'Multihop attempted',\n 73: 'Cross mount point (not really error)',\n 74: 'Trying to read unreadable message',\n 75: 'Value too large for defined data type',\n 76: 'Given log. name not unique',\n 77: 'f.d. invalid for this operation',\n 78: 'Remote address changed',\n 79: 'Can access a needed shared lib',\n 80: 'Accessing a corrupted shared lib',\n 81: '.lib section in a.out corrupted',\n 82: 'Attempting to link in too many libs',\n 83: 'Attempting to exec a shared library',\n 84: 'Illegal byte sequence',\n 86: 'Streams pipe error',\n 87: 'Too many users',\n 88: 'Socket operation on non-socket',\n 89: 'Destination address required',\n 90: 'Message too long',\n 91: 'Protocol wrong type for socket',\n 92: 'Protocol not available',\n 93: 'Unknown protocol',\n 94: 'Socket type not supported',\n 95: 'Not supported',\n 96: 'Protocol family not supported',\n 97: 'Address family not supported by protocol family',\n 98: 'Address already in use',\n 99: 'Address not available',\n 100: 'Network interface is not configured',\n 101: 'Network is unreachable',\n 102: 'Connection reset by network',\n 103: 'Connection aborted',\n 104: 'Connection reset by peer',\n 105: 'No buffer space available',\n 106: 'Socket is already connected',\n 107: 'Socket is not connected',\n 108: \"Can't send after socket shutdown\",\n 109: 'Too many references',\n 110: 'Connection timed out',\n 111: 'Connection refused',\n 112: 'Host is down',\n 113: 'Host is unreachable',\n 114: 'Socket already connected',\n 115: 'Connection already in progress',\n 116: 'Stale file handle',\n 122: 'Quota exceeded',\n 123: 'No medium (in tape drive)',\n 125: 'Operation canceled',\n 130: 'Previous owner died',\n 131: 'State not recoverable'\n}; // prettier-ignore\n\nvar LIBTIMIDITY_CONFIG_DATA = [100, 105, 114, 32, 46, 47, 112, 97, 116, 10, 10, 100, 114, 117, 109, 115, 101, 116, 32, 48, 10, 10, 32, 51, 53, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 48, 46, 112, 97, 116, 10, 32, 51, 54, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 49, 46, 112, 97, 116, 10, 32, 51, 55, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 50, 46, 112, 97, 116, 10, 32, 51, 56, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 51, 46, 112, 97, 116, 10, 32, 51, 57, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 52, 46, 112, 97, 116, 10, 32, 52, 48, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 53, 46, 112, 97, 116, 10, 32, 52, 49, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 54, 46, 112, 97, 116, 10, 32, 52, 50, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 55, 46, 112, 97, 116, 10, 32, 52, 51, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 56, 46, 112, 97, 116, 10, 32, 52, 52, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 57, 46, 112, 97, 116, 10, 32, 52, 53, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 49, 48, 46, 112, 97, 116, 10, 32, 52, 54, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 49, 49, 46, 112, 97, 116, 10, 32, 52, 55, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 49, 50, 46, 112, 97, 116, 10, 32, 52, 56, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 49, 51, 46, 112, 97, 116, 10, 32, 52, 57, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 49, 52, 46, 112, 97, 116, 10, 32, 53, 48, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 49, 53, 46, 112, 97, 116, 10, 32, 53, 49, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 49, 54, 46, 112, 97, 116, 10, 32, 53, 50, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 49, 55, 46, 112, 97, 116, 10, 32, 53, 51, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 49, 56, 46, 112, 97, 116, 10, 32, 53, 52, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 49, 57, 46, 112, 97, 116, 10, 32, 53, 53, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 50, 48, 46, 112, 97, 116, 10, 32, 53, 54, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 50, 49, 46, 112, 97, 116, 10, 32, 53, 55, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 50, 50, 46, 112, 97, 116, 10, 32, 53, 56, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 50, 51, 46, 112, 97, 116, 10, 32, 53, 57, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 50, 52, 46, 112, 97, 116, 10, 32, 54, 48, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 50, 53, 46, 112, 97, 116, 10, 32, 54, 49, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 50, 54, 46, 112, 97, 116, 10, 32, 54, 50, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 50, 55, 46, 112, 97, 116, 10, 32, 54, 51, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 50, 56, 46, 112, 97, 116, 10, 32, 54, 52, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 50, 57, 46, 112, 97, 116, 10, 32, 54, 53, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 51, 48, 46, 112, 97, 116, 10, 32, 54, 54, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 51, 49, 46, 112, 97, 116, 10, 32, 54, 55, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 51, 50, 46, 112, 97, 116, 10, 32, 54, 56, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 51, 51, 46, 112, 97, 116, 10, 32, 54, 57, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 51, 52, 46, 112, 97, 116, 10, 32, 55, 48, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 51, 53, 46, 112, 97, 116, 10, 32, 55, 49, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 51, 54, 46, 112, 97, 116, 10, 32, 55, 50, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 51, 55, 46, 112, 97, 116, 10, 32, 55, 51, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 51, 56, 46, 112, 97, 116, 10, 32, 55, 52, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 51, 57, 46, 112, 97, 116, 10, 32, 55, 53, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 52, 48, 46, 112, 97, 116, 10, 32, 55, 54, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 52, 49, 46, 112, 97, 116, 10, 32, 55, 55, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 52, 50, 46, 112, 97, 116, 10, 32, 55, 56, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 52, 51, 46, 112, 97, 116, 10, 32, 55, 57, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 52, 52, 46, 112, 97, 116, 10, 32, 56, 48, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 52, 53, 46, 112, 97, 116, 10, 32, 56, 49, 9, 32, 77, 84, 51, 50, 68, 114, 117, 109, 115, 47, 109, 116, 51, 50, 100, 114, 117, 109, 45, 52, 54, 46, 112, 97, 116, 10, 10, 98, 97, 110, 107, 32, 48, 10, 10, 32, 48, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 50, 55, 46, 112, 97, 116, 10, 32, 49, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 50, 54, 46, 112, 97, 116, 10, 32, 50, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 50, 53, 46, 112, 97, 116, 10, 32, 51, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 50, 52, 46, 112, 97, 116, 10, 32, 52, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 50, 51, 46, 112, 97, 116, 10, 32, 53, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 50, 50, 46, 112, 97, 116, 10, 32, 54, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 50, 49, 46, 112, 97, 116, 10, 32, 55, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 50, 48, 46, 112, 97, 116, 10, 32, 56, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 49, 57, 46, 112, 97, 116, 10, 32, 57, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 49, 56, 46, 112, 97, 116, 10, 32, 49, 48, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 49, 55, 46, 112, 97, 116, 10, 32, 49, 49, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 49, 54, 46, 112, 97, 116, 10, 32, 49, 50, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 49, 53, 46, 112, 97, 116, 10, 32, 49, 51, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 49, 52, 46, 112, 97, 116, 10, 32, 49, 52, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 49, 51, 46, 112, 97, 116, 10, 32, 49, 53, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 49, 50, 46, 112, 97, 116, 10, 32, 49, 54, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 49, 49, 46, 112, 97, 116, 10, 32, 49, 55, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 49, 48, 46, 112, 97, 116, 10, 32, 49, 56, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 48, 57, 46, 112, 97, 116, 10, 32, 49, 57, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 48, 56, 46, 112, 97, 116, 10, 32, 50, 48, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 48, 55, 46, 112, 97, 116, 10, 32, 50, 49, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 48, 54, 46, 112, 97, 116, 10, 32, 50, 50, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 48, 53, 46, 112, 97, 116, 10, 32, 50, 51, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 48, 52, 46, 112, 97, 116, 10, 32, 50, 52, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 48, 51, 46, 112, 97, 116, 10, 32, 50, 53, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 48, 50, 46, 112, 97, 116, 10, 32, 50, 54, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 48, 49, 46, 112, 97, 116, 10, 32, 50, 55, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 48, 48, 46, 112, 97, 116, 10, 32, 50, 56, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 57, 57, 46, 112, 97, 116, 10, 32, 50, 57, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 57, 56, 46, 112, 97, 116, 10, 32, 51, 48, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 57, 55, 46, 112, 97, 116, 10, 32, 51, 49, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 57, 54, 46, 112, 97, 116, 10, 32, 51, 50, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 57, 53, 46, 112, 97, 116, 10, 32, 51, 51, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 57, 52, 46, 112, 97, 116, 10, 32, 51, 52, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 57, 51, 46, 112, 97, 116, 10, 32, 51, 53, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 57, 50, 46, 112, 97, 116, 10, 32, 51, 54, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 57, 49, 46, 112, 97, 116, 10, 32, 51, 55, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 57, 48, 46, 112, 97, 116, 10, 32, 51, 56, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 56, 57, 46, 112, 97, 116, 10, 32, 51, 57, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 56, 56, 46, 112, 97, 116, 10, 32, 52, 48, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 56, 55, 46, 112, 97, 116, 10, 32, 52, 49, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 56, 54, 46, 112, 97, 116, 10, 32, 52, 50, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 56, 53, 46, 112, 97, 116, 10, 32, 52, 51, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 56, 52, 46, 112, 97, 116, 10, 32, 52, 52, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 56, 51, 46, 112, 97, 116, 10, 32, 52, 53, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 56, 50, 46, 112, 97, 116, 10, 32, 52, 54, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 56, 49, 46, 112, 97, 116, 10, 32, 52, 55, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 56, 48, 46, 112, 97, 116, 10, 32, 52, 56, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 55, 57, 46, 112, 97, 116, 10, 32, 52, 57, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 55, 56, 46, 112, 97, 116, 10, 32, 53, 48, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 55, 55, 46, 112, 97, 116, 10, 32, 53, 49, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 55, 54, 46, 112, 97, 116, 10, 32, 53, 50, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 55, 53, 46, 112, 97, 116, 10, 32, 53, 51, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 55, 52, 46, 112, 97, 116, 10, 32, 53, 52, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 55, 51, 46, 112, 97, 116, 10, 32, 53, 53, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 55, 50, 46, 112, 97, 116, 10, 32, 53, 54, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 55, 49, 46, 112, 97, 116, 10, 32, 53, 55, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 55, 48, 46, 112, 97, 116, 10, 32, 53, 56, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 54, 57, 46, 112, 97, 116, 10, 32, 53, 57, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 54, 56, 46, 112, 97, 116, 10, 32, 54, 48, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 54, 55, 46, 112, 97, 116, 10, 32, 54, 49, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 54, 54, 46, 112, 97, 116, 10, 32, 54, 50, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 54, 53, 46, 112, 97, 116, 10, 32, 54, 51, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 54, 52, 46, 112, 97, 116, 10, 32, 54, 52, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 54, 51, 46, 112, 97, 116, 10, 32, 54, 53, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 54, 50, 46, 112, 97, 116, 10, 32, 54, 54, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 54, 49, 46, 112, 97, 116, 10, 32, 54, 55, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 54, 48, 46, 112, 97, 116, 10, 32, 54, 56, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 53, 57, 46, 112, 97, 116, 10, 32, 54, 57, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 53, 56, 46, 112, 97, 116, 10, 32, 55, 48, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 53, 55, 46, 112, 97, 116, 10, 32, 55, 49, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 53, 54, 46, 112, 97, 116, 10, 32, 55, 50, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 53, 53, 46, 112, 97, 116, 10, 32, 55, 51, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 53, 52, 46, 112, 97, 116, 10, 32, 55, 52, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 53, 51, 46, 112, 97, 116, 10, 32, 55, 53, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 53, 50, 46, 112, 97, 116, 10, 32, 55, 54, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 53, 49, 46, 112, 97, 116, 10, 32, 55, 55, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 53, 48, 46, 112, 97, 116, 10, 32, 55, 56, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 52, 57, 46, 112, 97, 116, 10, 32, 55, 57, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 52, 56, 46, 112, 97, 116, 10, 32, 56, 48, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 52, 55, 46, 112, 97, 116, 10, 32, 56, 49, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 52, 54, 46, 112, 97, 116, 10, 32, 56, 50, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 52, 53, 46, 112, 97, 116, 10, 32, 56, 51, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 52, 52, 46, 112, 97, 116, 10, 32, 56, 52, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 52, 51, 46, 112, 97, 116, 10, 32, 56, 53, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 52, 50, 46, 112, 97, 116, 10, 32, 56, 54, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 52, 49, 46, 112, 97, 116, 10, 32, 56, 55, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 52, 48, 46, 112, 97, 116, 10, 32, 56, 56, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 51, 57, 46, 112, 97, 116, 10, 32, 56, 57, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 51, 56, 46, 112, 97, 116, 10, 32, 57, 48, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 51, 55, 46, 112, 97, 116, 10, 32, 57, 49, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 51, 54, 46, 112, 97, 116, 10, 32, 57, 50, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 51, 53, 46, 112, 97, 116, 10, 32, 57, 51, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 51, 52, 46, 112, 97, 116, 10, 32, 57, 52, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 51, 51, 46, 112, 97, 116, 10, 32, 57, 53, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 51, 50, 46, 112, 97, 116, 10, 32, 57, 54, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 51, 49, 46, 112, 97, 116, 10, 32, 57, 55, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 51, 48, 46, 112, 97, 116, 10, 32, 57, 56, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 50, 57, 46, 112, 97, 116, 10, 32, 57, 57, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 50, 56, 46, 112, 97, 116, 10, 32, 49, 48, 48, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 50, 55, 46, 112, 97, 116, 10, 32, 49, 48, 49, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 50, 54, 46, 112, 97, 116, 10, 32, 49, 48, 50, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 50, 53, 46, 112, 97, 116, 10, 32, 49, 48, 51, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 50, 52, 46, 112, 97, 116, 10, 32, 49, 48, 52, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 50, 51, 46, 112, 97, 116, 10, 32, 49, 48, 53, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 50, 50, 46, 112, 97, 116, 10, 32, 49, 48, 54, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 50, 49, 46, 112, 97, 116, 10, 32, 49, 48, 55, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 50, 48, 46, 112, 97, 116, 10, 32, 49, 48, 56, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 57, 46, 112, 97, 116, 10, 32, 49, 48, 57, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 56, 46, 112, 97, 116, 10, 32, 49, 49, 48, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 55, 46, 112, 97, 116, 10, 32, 49, 49, 49, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 54, 46, 112, 97, 116, 10, 32, 49, 49, 50, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 53, 46, 112, 97, 116, 10, 32, 49, 49, 51, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 52, 46, 112, 97, 116, 10, 32, 49, 49, 52, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 51, 46, 112, 97, 116, 10, 32, 49, 49, 53, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 50, 46, 112, 97, 116, 10, 32, 49, 49, 54, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 49, 46, 112, 97, 116, 10, 32, 49, 49, 55, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 48, 46, 112, 97, 116, 10, 32, 49, 49, 56, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 57, 46, 112, 97, 116, 10, 32, 49, 49, 57, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 56, 46, 112, 97, 116, 10, 32, 49, 50, 48, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 55, 46, 112, 97, 116, 10, 32, 49, 50, 49, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 54, 46, 112, 97, 116, 10, 32, 49, 50, 50, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 53, 46, 112, 97, 116, 10, 32, 49, 50, 51, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 52, 46, 112, 97, 116, 10, 32, 49, 50, 52, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 51, 46, 112, 97, 116, 10, 32, 49, 50, 53, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 50, 46, 112, 97, 116, 10, 32, 49, 50, 54, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 49, 46, 112, 97, 116, 10, 32, 49, 50, 55, 9, 32, 97, 114, 97, 99, 104, 110, 111, 45, 48, 46, 112, 97, 116, 10];\nvar MEMORY_ALLOCATION = [0, 0, 0, 0, 0, 0, 144, 63, 75, 191, 53, 65, 90, 136, 144, 63, 241, 46, 189, 130, 62, 21, 145, 63, 249, 198, 51, 115, 211, 166, 145, 63, 194, 109, 221, 10, 65, 61, 146, 63, 61, 194, 157, 150, 176, 216, 146, 63, 232, 234, 78, 195, 76, 121, 147, 63, 204, 6, 121, 169, 65, 31, 148, 63, 172, 119, 109, 217, 188, 202, 148, 63, 136, 88, 201, 103, 237, 123, 149, 63, 154, 143, 98, 250, 3, 51, 150, 63, 89, 8, 163, 213, 50, 240, 150, 63, 69, 192, 85, 234, 173, 179, 151, 63, 98, 112, 233, 227, 170, 125, 152, 63, 242, 189, 44, 55, 97, 78, 153, 63, 189, 253, 135, 49, 10, 38, 154, 63, 84, 184, 184, 8, 225, 4, 155, 63, 232, 64, 19, 235, 34, 235, 155, 63, 101, 213, 78, 16, 15, 217, 156, 63, 82, 228, 224, 202, 230, 206, 157, 63, 110, 60, 236, 153, 237, 204, 158, 63, 149, 18, 201, 59, 105, 211, 159, 63, 39, 122, 149, 224, 80, 113, 160, 63, 129, 244, 116, 208, 112, 253, 160, 63, 39, 24, 58, 230, 58, 142, 161, 63, 74, 29, 119, 226, 214, 35, 162, 63, 50, 84, 131, 216, 109, 190, 162, 63, 137, 39, 194, 57, 42, 94, 163, 63, 195, 57, 74, 225, 55, 3, 164, 63, 225, 208, 239, 31, 196, 173, 164, 63, 141, 222, 181, 200, 253, 93, 165, 63, 62, 15, 169, 61, 21, 20, 166, 63, 223, 103, 40, 125, 60, 208, 166, 63, 155, 23, 159, 47, 167, 146, 167, 63, 148, 66, 179, 181, 138, 91, 168, 63, 80, 170, 237, 54, 30, 43, 169, 63, 237, 57, 222, 176, 154, 1, 170, 63, 104, 158, 193, 6, 59, 223, 170, 63, 182, 54, 172, 17, 60, 196, 171, 63, 248, 203, 62, 177, 220, 176, 172, 63, 49, 168, 233, 220, 93, 165, 173, 63, 115, 200, 194, 181, 2, 162, 174, 63, 108, 16, 244, 152, 16, 167, 175, 63, 78, 71, 99, 153, 103, 90, 176, 63, 213, 5, 40, 73, 196, 229, 176, 63, 17, 38, 228, 158, 196, 117, 177, 63, 185, 204, 197, 35, 144, 10, 178, 63, 128, 43, 232, 177, 79, 164, 178, 63, 152, 204, 138, 127, 45, 67, 179, 63, 121, 115, 168, 42, 85, 231, 179, 63, 129, 193, 240, 196, 243, 144, 180, 63, 19, 232, 39, 224, 55, 64, 181, 63, 242, 205, 239, 154, 81, 245, 181, 63, 121, 42, 254, 173, 114, 176, 182, 63, 62, 55, 195, 121, 206, 113, 183, 63, 150, 183, 132, 20, 154, 57, 184, 63, 124, 53, 241, 88, 12, 8, 185, 63, 40, 116, 47, 245, 93, 221, 185, 63, 234, 58, 110, 122, 201, 185, 186, 63, 0, 190, 248, 108, 139, 157, 187, 63, 185, 15, 212, 84, 226, 136, 188, 63, 119, 41, 234, 206, 14, 124, 189, 63, 90, 67, 199, 158, 83, 119, 190, 63, 113, 89, 238, 192, 245, 122, 191, 63, 90, 243, 228, 62, 158, 67, 192, 63, 134, 4, 159, 190, 56, 206, 192, 63, 250, 182, 112, 109, 112, 93, 193, 63, 134, 74, 113, 157, 108, 241, 193, 63, 158, 146, 207, 239, 85, 138, 194, 63, 241, 160, 249, 95, 86, 40, 195, 63, 53, 128, 35, 79, 153, 203, 195, 63, 8, 41, 48, 144, 75, 116, 196, 63, 52, 246, 255, 115, 155, 34, 197, 63, 60, 249, 39, 214, 184, 214, 197, 63, 231, 172, 21, 42, 213, 144, 198, 63, 103, 161, 162, 136, 35, 81, 199, 63, 64, 220, 27, 190, 216, 23, 200, 63, 253, 197, 192, 88, 43, 229, 200, 63, 169, 160, 189, 183, 83, 185, 201, 63, 151, 163, 165, 26, 140, 148, 202, 63, 112, 252, 112, 177, 16, 119, 203, 63, 132, 25, 3, 173, 31, 97, 204, 63, 196, 198, 61, 80, 249, 82, 205, 63, 129, 205, 165, 1, 224, 76, 206, 63, 12, 239, 157, 93, 24, 79, 207, 63, 179, 157, 158, 164, 244, 44, 208, 63, 24, 248, 226, 2, 206, 182, 208, 63, 221, 27, 97, 34, 62, 69, 209, 63, 241, 38, 102, 30, 108, 216, 209, 63, 184, 223, 131, 95, 128, 112, 210, 63, 143, 212, 168, 166, 164, 13, 211, 63, 246, 6, 151, 24, 4, 176, 211, 63, 25, 72, 188, 73, 203, 87, 212, 63, 38, 135, 111, 74, 40, 5, 213, 63, 234, 109, 150, 179, 74, 184, 213, 63, 94, 196, 182, 179, 99, 113, 214, 63, 191, 49, 119, 28, 166, 48, 215, 63, 64, 16, 147, 112, 70, 246, 215, 63, 245, 39, 69, 242, 122, 194, 216, 63, 68, 70, 45, 178, 123, 149, 217, 63, 234, 200, 180, 158, 130, 111, 218, 63, 100, 86, 246, 147, 203, 80, 219, 63, 204, 33, 45, 108, 148, 57, 220, 63, 17, 61, 176, 16, 29, 42, 221, 63, 59, 163, 126, 139, 167, 34, 222, 63, 13, 204, 96, 25, 120, 35, 223, 63, 161, 97, 82, 158, 106, 22, 224, 63, 42, 244, 60, 232, 131, 159, 224, 63, 162, 211, 120, 142, 45, 45, 225, 63, 38, 84, 213, 117, 142, 191, 225, 63, 187, 17, 150, 206, 206, 86, 226, 63, 84, 154, 123, 31, 24, 243, 226, 63, 218, 31, 42, 81, 149, 148, 227, 63, 89, 83, 241, 185, 114, 59, 228, 63, 111, 165, 248, 41, 222, 231, 228, 63, 145, 67, 211, 247, 6, 154, 229, 63, 32, 70, 127, 13, 30, 82, 230, 63, 216, 160, 211, 245, 85, 16, 231, 63, 137, 133, 96, 234, 226, 212, 231, 63, 76, 8, 198, 225, 250, 159, 232, 63, 27, 245, 132, 158, 213, 113, 233, 63, 9, 232, 77, 190, 172, 74, 234, 63, 44, 220, 210, 201, 187, 42, 235, 63, 254, 136, 31, 69, 64, 18, 236, 63, 11, 11, 125, 192, 121, 1, 237, 63, 244, 122, 229, 233, 169, 248, 237, 63, 130, 61, 12, 159, 20, 248, 238, 63, 0, 0, 0, 0, 0, 0, 240, 63, 0, 0, 128, 63, 0, 0, 0, 0, 0, 0, 220, 67, 0, 0, 0, 0, 168, 25, 0, 0, 0, 0, 0, 0, 240, 31, 0, 0, 214, 33, 0, 0, 217, 35, 0, 0, 251, 37, 0, 0, 61, 40, 0, 0, 161, 42, 0, 0, 42, 45, 0, 0, 218, 47, 0, 0, 178, 50, 0, 0, 182, 53, 0, 0, 232, 56, 0, 0, 74, 60, 0, 0, 224, 63, 0, 0, 172, 67, 0, 0, 178, 71, 0, 0, 245, 75, 0, 0, 122, 80, 0, 0, 67, 85, 0, 0, 85, 90, 0, 0, 180, 95, 0, 0, 101, 101, 0, 0, 108, 107, 0, 0, 207, 113, 0, 0, 148, 120, 0, 0, 191, 127, 0, 0, 88, 135, 0, 0, 100, 143, 0, 0, 235, 151, 0, 0, 243, 160, 0, 0, 134, 170, 0, 0, 169, 180, 0, 0, 103, 191, 0, 0, 201, 202, 0, 0, 216, 214, 0, 0, 158, 227, 0, 0, 39, 241, 0, 0, 126, 255, 0, 0, 176, 14, 1, 0, 200, 30, 1, 0, 214, 47, 1, 0, 231, 65, 1, 0, 11, 85, 1, 0, 83, 105, 1, 0, 207, 126, 1, 0, 146, 149, 1, 0, 176, 173, 1, 0, 61, 199, 1, 0, 79, 226, 1, 0, 253, 254, 1, 0, 95, 29, 2, 0, 144, 61, 2, 0, 171, 95, 2, 0, 206, 131, 2, 0, 22, 170, 2, 0, 165, 210, 2, 0, 158, 253, 2, 0, 36, 43, 3, 0, 96, 91, 3, 0, 122, 142, 3, 0, 158, 196, 3, 0, 250, 253, 3, 0, 191, 58, 4, 0, 33, 123, 4, 0, 87, 191, 4, 0, 156, 7, 5, 0, 44, 84, 5, 0, 74, 165, 5, 0, 59, 251, 5, 0, 73, 86, 6, 0, 192, 182, 6, 0, 244, 28, 7, 0, 59, 137, 7, 0, 243, 251, 7, 0, 125, 117, 8, 0, 66, 246, 8, 0, 174, 126, 9, 0, 55, 15, 10, 0, 88, 168, 10, 0, 149, 74, 11, 0, 119, 246, 11, 0, 145, 172, 12, 0, 128, 109, 13, 0, 232, 57, 14, 0, 119, 18, 15, 0, 230, 247, 15, 0, 251, 234, 16, 0, 131, 236, 17, 0, 92, 253, 18, 0, 110, 30, 20, 0, 177, 80, 21, 0, 42, 149, 22, 0, 238, 236, 23, 0, 35, 89, 25, 0, 0, 219, 26, 0, 207, 115, 28, 0, 237, 36, 30, 0, 205, 239, 31, 0, 245, 213, 33, 0, 6, 217, 35, 0, 184, 250, 37, 0, 220, 60, 40, 0, 98, 161, 42, 0, 83, 42, 45, 0, 219, 217, 47, 0, 70, 178, 50, 0, 0, 182, 53, 0, 158, 231, 56, 0, 218, 73, 60, 0, 153, 223, 63, 0, 234, 171, 67, 0, 12, 178, 71, 0, 112, 245, 75, 0, 185, 121, 80, 0, 196, 66, 85, 0, 167, 84, 90, 0, 183, 179, 95, 0, 139, 100, 101, 0, 0, 108, 107, 0, 60, 207, 113, 0, 181, 147, 120, 0, 50, 191, 127, 0, 212, 87, 135, 0, 25, 100, 143, 0, 223, 234, 151, 0, 114, 243, 160, 0, 135, 133, 170, 0, 78, 169, 180, 0, 110, 103, 191, 0, 32, 161, 7, 0, 0, 0, 0, 0, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 0, 0, 128, 63, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 0, 0, 0, 0, 0, 0, 240, 63, 113, 93, 245, 158, 236, 0, 240, 63, 84, 18, 150, 75, 217, 1, 240, 63, 207, 232, 226, 5, 198, 2, 240, 63, 21, 171, 220, 205, 178, 3, 240, 63, 102, 35, 132, 163, 159, 4, 240, 63, 10, 28, 218, 134, 140, 5, 240, 63, 88, 95, 223, 119, 121, 6, 240, 63, 177, 183, 148, 118, 102, 7, 240, 63, 131, 239, 250, 130, 83, 8, 240, 63, 70, 209, 18, 157, 64, 9, 240, 63, 127, 39, 221, 196, 45, 10, 240, 63, 191, 188, 90, 250, 26, 11, 240, 63, 160, 91, 140, 61, 8, 12, 240, 63, 204, 206, 114, 142, 245, 12, 240, 63, 245, 224, 14, 237, 226, 13, 240, 63, 218, 92, 97, 89, 208, 14, 240, 63, 71, 13, 107, 211, 189, 15, 240, 63, 17, 189, 44, 91, 171, 16, 240, 63, 28, 55, 167, 240, 152, 17, 240, 63, 85, 70, 219, 147, 134, 18, 240, 63, 181, 181, 201, 68, 116, 19, 240, 63, 66, 80, 115, 3, 98, 20, 240, 63, 14, 225, 216, 207, 79, 21, 240, 63, 53, 51, 251, 169, 61, 22, 240, 63, 224, 17, 219, 145, 43, 23, 240, 63, 68, 72, 121, 135, 25, 24, 240, 63, 159, 161, 214, 138, 7, 25, 240, 63, 63, 233, 243, 155, 245, 25, 240, 63, 122, 234, 209, 186, 227, 26, 240, 63, 180, 112, 113, 231, 209, 27, 240, 63, 93, 71, 211, 33, 192, 28, 240, 63, 238, 57, 248, 105, 174, 29, 240, 63, 239, 19, 225, 191, 156, 30, 240, 63, 242, 160, 142, 35, 139, 31, 240, 63, 148, 172, 1, 149, 121, 32, 240, 63, 129, 2, 59, 20, 104, 33, 240, 63, 109, 110, 59, 161, 86, 34, 240, 63, 26, 188, 3, 60, 69, 35, 240, 63, 85, 183, 148, 228, 51, 36, 240, 63, 247, 43, 239, 154, 34, 37, 240, 63, 228, 229, 19, 95, 17, 38, 240, 63, 14, 177, 3, 49, 0, 39, 240, 63, 112, 89, 191, 16, 239, 39, 240, 63, 19, 171, 71, 254, 221, 40, 240, 63, 10, 114, 157, 249, 204, 41, 240, 63, 117, 122, 193, 2, 188, 42, 240, 63, 128, 144, 180, 25, 171, 43, 240, 63, 97, 128, 119, 62, 154, 44, 240, 63, 92, 22, 11, 113, 137, 45, 240, 63, 191, 30, 112, 177, 120, 46, 240, 63, 230, 101, 167, 255, 103, 47, 240, 63, 54, 184, 177, 91, 87, 48, 240, 63, 34, 226, 143, 197, 70, 49, 240, 63, 39, 176, 66, 61, 54, 50, 240, 63, 209, 238, 202, 194, 37, 51, 240, 63, 180, 106, 41, 86, 21, 52, 240, 63, 113, 240, 94, 247, 4, 53, 240, 63, 183, 76, 108, 166, 244, 53, 240, 63, 63, 76, 82, 99, 228, 54, 240, 63, 204, 187, 17, 46, 212, 55, 240, 63, 49, 104, 171, 6, 196, 56, 240, 63, 73, 30, 32, 237, 179, 57, 240, 63, 254, 170, 112, 225, 163, 58, 240, 63, 67, 219, 157, 227, 147, 59, 240, 63, 24, 124, 168, 243, 131, 60, 240, 63, 138, 90, 145, 17, 116, 61, 240, 63, 177, 67, 89, 61, 100, 62, 240, 63, 176, 4, 1, 119, 84, 63, 240, 63, 182, 106, 137, 190, 68, 64, 240, 63, 0, 67, 243, 19, 53, 65, 240, 63, 212, 90, 63, 119, 37, 66, 240, 63, 133, 127, 110, 232, 21, 67, 240, 63, 114, 126, 129, 103, 6, 68, 240, 63, 7, 37, 121, 244, 246, 68, 240, 63, 185, 64, 86, 143, 231, 69, 240, 63, 12, 159, 25, 56, 216, 70, 240, 63, 141, 13, 196, 238, 200, 71, 240, 63, 216, 89, 86, 179, 185, 72, 240, 63, 146, 81, 209, 133, 170, 73, 240, 63, 109, 194, 53, 102, 155, 74, 240, 63, 40, 122, 132, 84, 140, 75, 240, 63, 140, 70, 190, 80, 125, 76, 240, 63, 110, 245, 227, 90, 110, 77, 240, 63, 177, 84, 246, 114, 95, 78, 240, 63, 66, 50, 246, 152, 80, 79, 240, 63, 26, 92, 228, 204, 65, 80, 240, 63, 63, 160, 193, 14, 51, 81, 240, 63, 194, 204, 142, 94, 36, 82, 240, 63, 192, 175, 76, 188, 21, 83, 240, 63, 98, 23, 252, 39, 7, 84, 240, 63, 220, 209, 157, 161, 248, 84, 240, 63, 112, 173, 50, 41, 234, 85, 240, 63, 107, 120, 187, 190, 219, 86, 240, 63, 37, 1, 57, 98, 205, 87, 240, 63, 2, 22, 172, 19, 191, 88, 240, 63, 116, 133, 21, 211, 176, 89, 240, 63, 247, 29, 118, 160, 162, 90, 240, 63, 18, 174, 206, 123, 148, 91, 240, 63, 91, 4, 32, 101, 134, 92, 240, 63, 113, 239, 106, 92, 120, 93, 240, 63, 1, 62, 176, 97, 106, 94, 240, 63, 194, 190, 240, 116, 92, 95, 240, 63, 122, 64, 45, 150, 78, 96, 240, 63, 247, 145, 102, 197, 64, 97, 240, 63, 22, 130, 157, 2, 51, 98, 240, 63, 191, 223, 210, 77, 37, 99, 240, 63, 229, 121, 7, 167, 23, 100, 240, 63, 137, 31, 60, 14, 10, 101, 240, 63, 181, 159, 113, 131, 252, 101, 240, 63, 130, 201, 168, 6, 239, 102, 240, 63, 20, 108, 226, 151, 225, 103, 240, 63, 154, 86, 31, 55, 212, 104, 240, 63, 79, 88, 96, 228, 198, 105, 240, 63, 124, 64, 166, 159, 185, 106, 240, 63, 115, 222, 241, 104, 172, 107, 240, 63, 149, 1, 68, 64, 159, 108, 240, 63, 77, 121, 157, 37, 146, 109, 240, 63, 18, 21, 255, 24, 133, 110, 240, 63, 104, 164, 105, 26, 120, 111, 240, 63, 222, 246, 221, 41, 107, 112, 240, 63, 16, 220, 92, 71, 94, 113, 240, 63, 165, 35, 231, 114, 81, 114, 240, 63, 81, 157, 125, 172, 68, 115, 240, 63, 211, 24, 33, 244, 55, 116, 240, 63, 246, 101, 210, 73, 43, 117, 240, 63, 147, 84, 146, 173, 30, 118, 240, 63, 140, 180, 97, 31, 18, 119, 240, 63, 209, 85, 65, 159, 5, 120, 240, 63, 93, 8, 50, 45, 249, 120, 240, 63, 57, 156, 52, 201, 236, 121, 240, 63, 118, 225, 73, 115, 224, 122, 240, 63, 54, 168, 114, 43, 212, 123, 240, 63, 163, 192, 175, 241, 199, 124, 240, 63, 246, 250, 1, 198, 187, 125, 240, 63, 113, 39, 106, 168, 175, 126, 240, 63, 101, 22, 233, 152, 163, 127, 240, 63, 44, 152, 127, 151, 151, 128, 240, 63, 48, 125, 46, 164, 139, 129, 240, 63, 226, 149, 246, 190, 127, 130, 240, 63, 197, 178, 216, 231, 115, 131, 240, 63, 98, 164, 213, 30, 104, 132, 240, 63, 82, 59, 238, 99, 92, 133, 240, 63, 58, 72, 35, 183, 80, 134, 240, 63, 200, 155, 117, 24, 69, 135, 240, 63, 185, 6, 230, 135, 57, 136, 240, 63, 214, 89, 117, 5, 46, 137, 240, 63, 242, 101, 36, 145, 34, 138, 240, 63, 237, 251, 243, 42, 23, 139, 240, 63, 180, 236, 228, 210, 11, 140, 240, 63, 63, 9, 248, 136, 0, 141, 240, 63, 147, 34, 46, 77, 245, 141, 240, 63, 192, 9, 136, 31, 234, 142, 240, 63, 226, 143, 6, 0, 223, 143, 240, 63, 35, 134, 170, 238, 211, 144, 240, 63, 184, 189, 116, 235, 200, 145, 240, 63, 224, 7, 102, 246, 189, 146, 240, 63, 233, 53, 127, 15, 179, 147, 240, 63, 44, 25, 193, 54, 168, 148, 240, 63, 13, 131, 44, 108, 157, 149, 240, 63, 0, 69, 194, 175, 146, 150, 240, 63, 127, 48, 131, 1, 136, 151, 240, 63, 22, 23, 112, 97, 125, 152, 240, 63, 89, 202, 137, 207, 114, 153, 240, 63, 234, 27, 209, 75, 104, 154, 240, 63, 119, 221, 70, 214, 93, 155, 240, 63, 185, 224, 235, 110, 83, 156, 240, 63, 119, 247, 192, 21, 73, 157, 240, 63, 131, 243, 198, 202, 62, 158, 240, 63, 187, 166, 254, 141, 52, 159, 240, 63, 9, 227, 104, 95, 42, 160, 240, 63, 99, 122, 6, 63, 32, 161, 240, 63, 205, 62, 216, 44, 22, 162, 240, 63, 85, 2, 223, 40, 12, 163, 240, 63, 21, 151, 27, 51, 2, 164, 240, 63, 53, 207, 142, 75, 248, 164, 240, 63, 233, 124, 57, 114, 238, 165, 240, 63, 110, 114, 28, 167, 228, 166, 240, 63, 17, 130, 56, 234, 218, 167, 240, 63, 40, 126, 142, 59, 209, 168, 240, 63, 25, 57, 31, 155, 199, 169, 240, 63, 83, 133, 235, 8, 190, 170, 240, 63, 81, 53, 244, 132, 180, 171, 240, 63, 156, 27, 58, 15, 171, 172, 240, 63, 200, 10, 190, 167, 161, 173, 240, 63, 118, 213, 128, 78, 152, 174, 240, 63, 82, 78, 131, 3, 143, 175, 240, 63, 22, 72, 198, 198, 133, 176, 240, 63, 134, 149, 74, 152, 124, 177, 240, 63, 116, 9, 17, 120, 115, 178, 240, 63, 188, 118, 26, 102, 106, 179, 240, 63, 73, 176, 103, 98, 97, 180, 240, 63, 15, 137, 249, 108, 88, 181, 240, 63, 18, 212, 208, 133, 79, 182, 240, 63, 95, 100, 238, 172, 70, 183, 240, 63, 17, 13, 83, 226, 61, 184, 240, 63, 78, 161, 255, 37, 53, 185, 240, 63, 72, 244, 244, 119, 44, 186, 240, 63, 63, 217, 51, 216, 35, 187, 240, 63, 125, 35, 189, 70, 27, 188, 240, 63, 91, 166, 145, 195, 18, 189, 240, 63, 59, 53, 178, 78, 10, 190, 240, 63, 142, 163, 31, 232, 1, 191, 240, 63, 206, 196, 218, 143, 249, 191, 240, 63, 133, 108, 228, 69, 241, 192, 240, 63, 71, 110, 61, 10, 233, 193, 240, 63, 180, 157, 230, 220, 224, 194, 240, 63, 122, 206, 224, 189, 216, 195, 240, 63, 80, 212, 44, 173, 208, 196, 240, 63, 253, 130, 203, 170, 200, 197, 240, 63, 83, 174, 189, 182, 192, 198, 240, 63, 46, 42, 4, 209, 184, 199, 240, 63, 121, 202, 159, 249, 176, 200, 240, 63, 42, 99, 145, 48, 169, 201, 240, 63, 67, 200, 217, 117, 161, 202, 240, 63, 212, 205, 121, 201, 153, 203, 240, 63, 247, 71, 114, 43, 146, 204, 240, 63, 212, 10, 196, 155, 138, 205, 240, 63, 158, 234, 111, 26, 131, 206, 240, 63, 148, 187, 118, 167, 123, 207, 240, 63, 3, 82, 217, 66, 116, 208, 240, 63, 68, 130, 152, 236, 108, 209, 240, 63, 186, 32, 181, 164, 101, 210, 240, 63, 214, 1, 48, 107, 94, 211, 240, 63, 22, 250, 9, 64, 87, 212, 240, 63, 2, 222, 67, 35, 80, 213, 240, 63, 50, 130, 222, 20, 73, 214, 240, 63, 69, 187, 218, 20, 66, 215, 240, 63, 236, 93, 57, 35, 59, 216, 240, 63, 223, 62, 251, 63, 52, 217, 240, 63, 230, 50, 33, 107, 45, 218, 240, 63, 213, 14, 172, 164, 38, 219, 240, 63, 137, 167, 156, 236, 31, 220, 240, 63, 240, 209, 243, 66, 25, 221, 240, 63, 0, 99, 178, 167, 18, 222, 240, 63, 191, 47, 217, 26, 12, 223, 240, 63, 61, 13, 105, 156, 5, 224, 240, 63, 150, 208, 98, 44, 255, 224, 240, 63, 245, 78, 199, 202, 248, 225, 240, 63, 141, 93, 151, 119, 242, 226, 240, 63, 162, 209, 211, 50, 236, 227, 240, 63, 129, 128, 125, 252, 229, 228, 240, 63, 133, 63, 149, 212, 223, 229, 240, 63, 21, 228, 27, 187, 217, 230, 240, 63, 163, 67, 18, 176, 211, 231, 240, 63, 176, 51, 121, 179, 205, 232, 240, 63, 198, 137, 81, 197, 199, 233, 240, 63, 127, 27, 156, 229, 193, 234, 240, 63, 126, 190, 89, 20, 188, 235, 240, 63, 116, 72, 139, 81, 182, 236, 240, 63, 31, 143, 49, 157, 176, 237, 240, 63, 72, 104, 77, 247, 170, 238, 240, 63, 197, 169, 223, 95, 165, 239, 240, 63, 119, 41, 233, 214, 159, 240, 240, 63, 79, 189, 106, 92, 154, 241, 240, 63, 69, 59, 101, 240, 148, 242, 240, 63, 0, 0, 0, 0, 0, 0, 240, 63, 99, 121, 217, 146, 143, 243, 240, 63, 192, 214, 199, 195, 154, 245, 241, 63, 21, 183, 49, 10, 254, 6, 243, 63, 139, 114, 141, 249, 162, 40, 244, 63, 94, 236, 240, 8, 129, 91, 245, 63, 205, 59, 127, 102, 158, 160, 246, 63, 176, 207, 104, 215, 16, 249, 247, 63, 60, 110, 61, 165, 254, 101, 249, 63, 173, 211, 90, 153, 159, 232, 250, 63, 41, 193, 78, 7, 62, 130, 252, 63, 67, 19, 16, 231, 55, 52, 254, 63, 0, 0, 0, 0, 0, 0, 0, 64, 99, 121, 217, 146, 143, 243, 0, 64, 192, 214, 199, 195, 154, 245, 1, 64, 21, 183, 49, 10, 254, 6, 3, 64, 139, 114, 141, 249, 162, 40, 4, 64, 94, 236, 240, 8, 129, 91, 5, 64, 205, 59, 127, 102, 158, 160, 6, 64, 176, 207, 104, 215, 16, 249, 7, 64, 61, 110, 61, 165, 254, 101, 9, 64, 173, 211, 90, 153, 159, 232, 10, 64, 41, 193, 78, 7, 62, 130, 12, 64, 68, 19, 16, 231, 55, 52, 14, 64, 0, 0, 0, 0, 0, 0, 16, 64, 99, 121, 217, 146, 143, 243, 16, 64, 191, 214, 199, 195, 154, 245, 17, 64, 21, 183, 49, 10, 254, 6, 19, 64, 139, 114, 141, 249, 162, 40, 20, 64, 93, 236, 240, 8, 129, 91, 21, 64, 205, 59, 127, 102, 158, 160, 22, 64, 177, 207, 104, 215, 16, 249, 23, 64, 60, 110, 61, 165, 254, 101, 25, 64, 173, 211, 90, 153, 159, 232, 26, 64, 42, 193, 78, 7, 62, 130, 28, 64, 67, 19, 16, 231, 55, 52, 30, 64, 0, 0, 0, 0, 0, 0, 32, 64, 99, 121, 217, 146, 143, 243, 32, 64, 191, 214, 199, 195, 154, 245, 33, 64, 21, 183, 49, 10, 254, 6, 35, 64, 139, 114, 141, 249, 162, 40, 36, 64, 93, 236, 240, 8, 129, 91, 37, 64, 205, 59, 127, 102, 158, 160, 38, 64, 177, 207, 104, 215, 16, 249, 39, 64, 60, 110, 61, 165, 254, 101, 41, 64, 173, 211, 90, 153, 159, 232, 42, 64, 42, 193, 78, 7, 62, 130, 44, 64, 67, 19, 16, 231, 55, 52, 46, 64, 0, 0, 0, 0, 0, 0, 48, 64, 98, 121, 217, 146, 143, 243, 48, 64, 193, 214, 199, 195, 154, 245, 49, 64, 21, 183, 49, 10, 254, 6, 51, 64, 138, 114, 141, 249, 162, 40, 52, 64, 95, 236, 240, 8, 129, 91, 53, 64, 205, 59, 127, 102, 158, 160, 54, 64, 175, 207, 104, 215, 16, 249, 55, 64, 62, 110, 61, 165, 254, 101, 57, 64, 173, 211, 90, 153, 159, 232, 58, 64, 40, 193, 78, 7, 62, 130, 60, 64, 69, 19, 16, 231, 55, 52, 62, 64, 0, 0, 0, 0, 0, 0, 64, 64, 98, 121, 217, 146, 143, 243, 64, 64, 193, 214, 199, 195, 154, 245, 65, 64, 21, 183, 49, 10, 254, 6, 67, 64, 138, 114, 141, 249, 162, 40, 68, 64, 95, 236, 240, 8, 129, 91, 69, 64, 205, 59, 127, 102, 158, 160, 70, 64, 175, 207, 104, 215, 16, 249, 71, 64, 62, 110, 61, 165, 254, 101, 73, 64, 173, 211, 90, 153, 159, 232, 74, 64, 40, 193, 78, 7, 62, 130, 76, 64, 69, 19, 16, 231, 55, 52, 78, 64, 0, 0, 0, 0, 0, 0, 80, 64, 98, 121, 217, 146, 143, 243, 80, 64, 193, 214, 199, 195, 154, 245, 81, 64, 21, 183, 49, 10, 254, 6, 83, 64, 138, 114, 141, 249, 162, 40, 84, 64, 95, 236, 240, 8, 129, 91, 85, 64, 205, 59, 127, 102, 158, 160, 86, 64, 175, 207, 104, 215, 16, 249, 87, 64, 62, 110, 61, 165, 254, 101, 89, 64, 173, 211, 90, 153, 159, 232, 90, 64, 40, 193, 78, 7, 62, 130, 92, 64, 69, 19, 16, 231, 55, 52, 94, 64, 0, 0, 0, 0, 0, 0, 96, 64, 98, 121, 217, 146, 143, 243, 96, 64, 193, 214, 199, 195, 154, 245, 97, 64, 21, 183, 49, 10, 254, 6, 99, 64, 138, 114, 141, 249, 162, 40, 100, 64, 95, 236, 240, 8, 129, 91, 101, 64, 205, 59, 127, 102, 158, 160, 102, 64, 175, 207, 104, 215, 16, 249, 103, 64, 62, 110, 61, 165, 254, 101, 105, 64, 173, 211, 90, 153, 159, 232, 106, 64, 40, 193, 78, 7, 62, 130, 108, 64, 69, 19, 16, 231, 55, 52, 110, 64, 0, 0, 0, 0, 0, 0, 112, 64, 101, 121, 217, 146, 143, 243, 112, 64, 190, 214, 199, 195, 154, 245, 113, 64, 21, 183, 49, 10, 254, 6, 115, 64, 141, 114, 141, 249, 162, 40, 116, 64, 92, 236, 240, 8, 129, 91, 117, 64, 205, 59, 127, 102, 158, 160, 118, 64, 179, 207, 104, 215, 16, 249, 119, 64, 58, 110, 61, 165, 254, 101, 121, 64, 173, 211, 90, 153, 159, 232, 122, 64, 45, 193, 78, 7, 62, 130, 124, 64, 64, 19, 16, 231, 55, 52, 126, 64, 0, 0, 0, 0, 0, 0, 128, 64, 101, 121, 217, 146, 143, 243, 128, 64, 190, 214, 199, 195, 154, 245, 129, 64, 21, 183, 49, 10, 254, 6, 131, 64, 141, 114, 141, 249, 162, 40, 132, 64, 92, 236, 240, 8, 129, 91, 133, 64, 205, 59, 127, 102, 158, 160, 134, 64, 179, 207, 104, 215, 16, 249, 135, 64, 58, 110, 61, 165, 254, 101, 137, 64, 173, 211, 90, 153, 159, 232, 138, 64, 45, 193, 78, 7, 62, 130, 140, 64, 64, 19, 16, 231, 55, 52, 142, 64, 0, 0, 0, 0, 0, 0, 144, 64, 101, 121, 217, 146, 143, 243, 144, 64, 190, 214, 199, 195, 154, 245, 145, 64, 21, 183, 49, 10, 254, 6, 147, 64, 141, 114, 141, 249, 162, 40, 148, 64, 92, 236, 240, 8, 129, 91, 149, 64, 205, 59, 127, 102, 158, 160, 150, 64, 179, 207, 104, 215, 16, 249, 151, 64, 77, 84, 104, 100, 0, 0, 0, 0, 86, 101, 108, 111, 99, 105, 116, 121, 32, 37, 100, 32, 37, 100, 10, 0, 70, 84, 80, 112, 114, 111, 120, 121, 0, 0, 0, 0, 0, 0, 0, 0, 72, 84, 84, 80, 112, 114, 111, 120, 121, 0, 0, 0, 0, 0, 0, 0, 99, 111, 109, 109, 0, 0, 0, 0, 35, 101, 120, 116, 101, 110, 115, 105, 111, 110, 0, 0, 0, 0, 0, 0, 78, 117, 109, 32, 77, 105, 115, 115, 105, 110, 103, 32, 112, 97, 116, 99, 104, 101, 115, 58, 32, 37, 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 37, 115, 58, 32, 108, 105, 110, 101, 32, 37, 100, 58, 32, 115, 116, 114, 105, 112, 32, 109, 117, 115, 116, 32, 98, 101, 32, 101, 110, 118, 44, 32, 108, 111, 111, 112, 44, 32, 111, 114, 32, 116, 97, 105, 108, 10, 0, 0, 116, 97, 105, 108, 0, 0, 0, 0, 115, 116, 114, 105, 112, 0, 0, 0, 37, 115, 58, 32, 108, 105, 110, 101, 32, 37, 100, 58, 32, 107, 101, 101, 112, 32, 109, 117, 115, 116, 32, 98, 101, 32, 101, 110, 118, 32, 111, 114, 32, 108, 111, 111, 112, 10, 0, 0, 108, 111, 111, 112, 0, 0, 0, 0, 101, 110, 118, 0, 0, 0, 0, 0, 107, 101, 101, 112, 0, 0, 0, 0, 37, 115, 58, 32, 108, 105, 110, 101, 32, 37, 100, 58, 32, 112, 97, 110, 110, 105, 110, 103, 32, 109, 117, 115, 116, 32, 98, 101, 32, 108, 101, 102, 116, 44, 32, 114, 105, 103, 104, 116, 44, 32, 99, 101, 110, 116, 101, 114, 44, 32, 111, 114, 32, 98, 101, 116, 119, 101, 101, 110, 32, 45, 49, 48, 48, 32, 97, 110, 100, 32, 49, 48, 48, 10, 0, 0, 0, 0, 0, 0, 32, 9, 160, 0, 0, 0, 0, 0, 114, 105, 103, 104, 116, 0, 0, 0, 108, 101, 102, 116, 0, 0, 0, 0, 77, 105, 115, 115, 105, 110, 103, 32, 112, 97, 116, 99, 104, 58, 32, 37, 115, 10, 0, 0, 0, 0, 0, 0, 99, 101, 110, 116, 101, 114, 0, 0, 112, 97, 110, 0, 0, 0, 0, 0, 37, 115, 58, 32, 108, 105, 110, 101, 32, 37, 100, 58, 32, 110, 111, 116, 101, 32, 109, 117, 115, 116, 32, 98, 101, 32, 98, 101, 116, 119, 101, 101, 110, 32, 48, 32, 97, 110, 100, 32, 49, 50, 55, 10, 0, 0, 0, 0, 110, 111, 116, 101, 0, 0, 0, 0, 37, 115, 58, 32, 108, 105, 110, 101, 32, 37, 100, 58, 32, 97, 109, 112, 108, 105, 102, 105, 99, 97, 116, 105, 111, 110, 32, 109, 117, 115, 116, 32, 98, 101, 32, 98, 101, 116, 119, 101, 101, 110, 32, 48, 32, 97, 110, 100, 32, 37, 100, 10, 0, 0, 0, 0, 97, 109, 112, 0, 0, 0, 0, 0, 37, 115, 58, 32, 108, 105, 110, 101, 32, 37, 100, 58, 32, 98, 97, 100, 32, 112, 97, 116, 99, 104, 32, 111, 112, 116, 105, 111, 110, 32, 37, 115, 10, 0, 0, 0, 0, 0, 0, 0, 37, 115, 58, 32, 108, 105, 110, 101, 32, 37, 100, 58, 32, 77, 117, 115, 116, 32, 115, 112, 101, 99, 105, 102, 121, 32, 116, 111, 110, 101, 32, 98, 97, 110, 107, 32, 111, 114, 32, 100, 114, 117, 109, 32, 115, 101, 116, 32, 98, 101, 102, 111, 114, 101, 32, 97, 115, 115, 105, 103, 110, 109, 101, 110, 116, 10, 0, 0, 0, 0, 0, 0, 67, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 102, 105, 108, 101, 32, 37, 115, 32, 110, 111, 116, 32, 102, 111, 117, 110, 100, 10, 0, 0, 0, 0, 0, 0, 0, 0, 37, 115, 58, 32, 108, 105, 110, 101, 32, 37, 100, 58, 32, 80, 114, 111, 103, 114, 97, 109, 32, 109, 117, 115, 116, 32, 98, 101, 32, 98, 101, 116, 119, 101, 101, 110, 32, 48, 32, 97, 110, 100, 32, 49, 50, 55, 10, 0, 37, 115, 58, 32, 108, 105, 110, 101, 32, 37, 100, 58, 32, 115, 121, 110, 116, 97, 120, 32, 101, 114, 114, 111, 114, 10, 0, 0, 0, 0, 0, 0, 63, 63, 63, 63, 63, 63, 0, 0, 37, 115, 58, 32, 108, 105, 110, 101, 32, 37, 100, 58, 32, 84, 111, 110, 101, 32, 98, 97, 110, 107, 32, 109, 117, 115, 116, 32, 98, 101, 32, 98, 101, 116, 119, 101, 101, 110, 32, 48, 32, 97, 110, 100, 32, 49, 50, 55, 10, 0, 0, 0, 0, 0, 0, 0, 37, 115, 58, 32, 108, 105, 110, 101, 32, 37, 100, 58, 32, 78, 111, 32, 98, 97, 110, 107, 32, 110, 117, 109, 98, 101, 114, 32, 103, 105, 118, 101, 110, 10, 0, 0, 0, 0, 0, 0, 98, 97, 110, 107, 0, 0, 0, 0, 37, 115, 58, 32, 108, 105, 110, 101, 32, 37, 100, 58, 32, 68, 114, 117, 109, 32, 115, 101, 116, 32, 109, 117, 115, 116, 32, 98, 101, 32, 98, 101, 116, 119, 101, 101, 110, 32, 48, 32, 97, 110, 100, 32, 49, 50, 55, 10, 0, 0, 0, 0, 0, 0, 0, 0, 37, 115, 58, 32, 108, 105, 110, 101, 32, 37, 100, 58, 32, 78, 111, 32, 100, 114, 117, 109, 32, 115, 101, 116, 32, 110, 117, 109, 98, 101, 114, 32, 103, 105, 118, 101, 110, 10, 0, 0, 100, 114, 117, 109, 115, 101, 116, 0, 37, 115, 58, 32, 108, 105, 110, 101, 32, 37, 100, 58, 32, 77, 117, 115, 116, 32, 115, 112, 101, 99, 105, 102, 121, 32, 101, 120, 97, 99, 116, 108, 121, 32, 111, 110, 101, 32, 112, 97, 116, 99, 104, 32, 110, 97, 109, 101, 10, 0, 0, 0, 0, 0, 0, 0, 100, 101, 102, 97, 117, 108, 116, 0, 80, 114, 111, 98, 97, 98, 108, 101, 32, 115, 111, 117, 114, 99, 101, 32, 108, 111, 111, 112, 32, 105, 110, 32, 99, 111, 110, 102, 105, 103, 117, 114, 97, 116, 105, 111, 110, 32, 102, 105, 108, 101, 115, 10, 0, 0, 0, 0, 37, 115, 58, 32, 108, 105, 110, 101, 32, 37, 100, 58, 32, 78, 111, 32, 102, 105, 108, 101, 32, 110, 97, 109, 101, 32, 103, 105, 118, 101, 110, 10, 0, 0, 0, 0, 0, 0, 0, 0, 115, 111, 117, 114, 99, 101, 0, 0, 71, 70, 49, 80, 65, 84, 67, 72, 49, 48, 48, 0, 73, 68, 35, 48, 48, 48, 48, 48, 50, 0, 0, 0, 37, 115, 58, 32, 108, 105, 110, 101, 32, 37, 100, 58, 32, 78, 111, 32, 100, 105, 114, 101, 99, 116, 111, 114, 121, 32, 103, 105, 118, 101, 110, 10, 0, 0, 0, 0, 0, 0, 0, 0, 100, 105, 114, 0, 0, 0, 0, 0, 70, 73, 88, 77, 69, 58, 32, 73, 109, 112, 108, 101, 109, 101, 110, 116, 32, 34, 109, 97, 112, 34, 32, 105, 110, 32, 84, 105, 77, 105, 100, 105, 116, 121, 32, 99, 111, 110, 102, 105, 103, 46, 10, 0, 0, 0, 0, 0, 109, 97, 112, 0, 0, 0, 0, 0, 70, 73, 88, 77, 69, 58, 32, 73, 109, 112, 108, 101, 109, 101, 110, 116, 32, 34, 112, 114, 111, 103, 98, 97, 115, 101, 34, 32, 105, 110, 32, 84, 105, 77, 105, 100, 105, 116, 121, 32, 99, 111, 110, 102, 105, 103, 46, 10, 0, 0, 0, 0, 0, 0, 0, 0, 112, 114, 111, 103, 98, 97, 115, 101, 0, 0, 0, 0, 0, 0, 0, 0, 70, 73, 88, 77, 69, 58, 32, 73, 109, 112, 108, 109, 101, 109, 101, 110, 116, 32, 34, 37, 115, 34, 32, 105, 110, 32, 84, 105, 77, 105, 100, 105, 116, 121, 32, 99, 111, 110, 102, 105, 103, 46, 10, 0, 0, 0, 0, 0, 102, 111, 110, 116, 0, 0, 0, 0, 85, 110, 115, 117, 112, 112, 111, 114, 116, 101, 100, 32, 97, 117, 100, 105, 111, 32, 102, 111, 114, 109, 97, 116, 10, 0, 0, 0, 0, 0, 0, 0, 115, 111, 117, 110, 100, 102, 111, 110, 116, 0, 0, 0, 0, 0, 0, 0, 70, 73, 88, 77, 69, 58, 32, 73, 109, 112, 108, 101, 109, 101, 110, 116, 32, 34, 97, 108, 116, 97, 115, 115, 105, 103, 110, 34, 32, 105, 110, 32, 84, 105, 77, 105, 100, 105, 116, 121, 32, 99, 111, 110, 102, 105, 103, 46, 10, 0, 0, 0, 0, 0, 0, 0, 71, 70, 49, 80, 65, 84, 67, 72, 49, 49, 48, 0, 73, 68, 35, 48, 48, 48, 48, 48, 50, 0, 0, 0, 77, 84, 114, 107, 0, 0, 0, 0, 97, 108, 116, 97, 115, 115, 105, 103, 110, 0, 0, 0, 0, 0, 0, 0, 70, 73, 88, 77, 69, 58, 32, 73, 109, 112, 108, 101, 109, 101, 110, 116, 32, 34, 117, 110, 100, 101, 102, 34, 32, 105, 110, 32, 84, 105, 77, 105, 100, 105, 116, 121, 32, 99, 111, 110, 102, 105, 103, 46, 10, 0, 0, 0, 117, 110, 100, 101, 102, 0, 0, 0, 70, 73, 88, 77, 69, 58, 32, 73, 109, 112, 108, 101, 109, 101, 110, 116, 32, 34, 37, 115, 34, 32, 105, 110, 32, 84, 105, 77, 105, 100, 105, 116, 121, 32, 99, 111, 110, 102, 105, 103, 46, 10, 0, 0, 0, 0, 0, 0, 99, 111, 112, 121, 98, 97, 110, 107, 0, 0, 0, 0, 0, 0, 0, 0, 99, 111, 112, 121, 100, 114, 117, 109, 115, 101, 116, 0, 0, 0, 0, 0, 70, 73, 88, 77, 69, 58, 32, 73, 109, 112, 108, 101, 109, 101, 110, 116, 32, 34, 116, 105, 109, 101, 111, 117, 116, 34, 32, 105, 110, 32, 84, 105, 77, 105, 100, 105, 116, 121, 32, 99, 111, 110, 102, 105, 103, 46, 10, 0, 97, 100, 100, 32, 116, 111, 32, 112, 97, 116, 104, 108, 105, 115, 116, 58, 32, 37, 115, 10, 0, 0, 0, 0, 116, 105, 109, 101, 111, 117, 116, 0, 46, 0, 0, 0, 0, 0, 0, 0, 116, 105, 109, 105, 100, 105, 116, 121, 46, 99, 102, 103, 0, 0, 0, 0, 111, 112, 116, 0, 0, 0, 0, 0, 114, 98, 0, 0, 0, 0, 0, 0, 109, 97, 105, 108, 97, 100, 100, 114, 0, 0, 0, 0, 0, 0, 0, 0, 46, 112, 97, 116, 0, 0, 0, 0, 114, 98, 0, 0, 0, 0, 0, 0];\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/typeof.js\nvar helpers_typeof = __webpack_require__(5);\nvar typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof);\n\n// CONCATENATED MODULE: ./src/LibTiMidity.js\n// https://github.com/kripken/emscripten/wiki/\nvar INT_TYPES={i1:0,i8:0,i16:0,i32:0,i64:0};var FLOAT_TYPES={\"float\":0,\"double\":0};/** @class */var LibTiMidity_LibTiMidity=/**\n * Library to enable playback of MIDI files.\n * @param {undefined}\n * @return {object} The module of an instance of LibTiMidity.\n * @property {Number} TOTAL_MEMORY The amount of memory available to the library.\n */function LibTiMidity(){classCallCheck_default()(this,LibTiMidity);var Runtime={stackSave:function stackSave(){return STACKTOP;},stackRestore:function stackRestore(stackTop){STACKTOP=stackTop;},isNumberType:function isNumberType(type){return type in INT_TYPES||type in FLOAT_TYPES;},isPointerType:function isPointerType(type){return type[type.length-1]=='*';},isStructType:function isStructType(type){if(isPointerType(type))return false;if(isArrayType(type))return true;if(/?/.test(type))return true;// { i32, i8 } etc. - anonymous struct types\n// See comment in isStructPointerType()\nreturn type[0]=='%';},getNativeTypeSize:function getNativeTypeSize(type){switch(type){case'i1':case'i8':return 1;case'i16':return 2;case'i32':return 4;case'i64':return 8;case'float':return 4;case'double':return 8;default:{if(type[type.length-1]==='*'){return Runtime.QUANTUM_SIZE;// A pointer\n}else if(type[0]==='i'){var bits=parseInt(type.substr(1));assert(bits%8===0);return bits/8;}}}},getNativeFieldSize:function getNativeFieldSize(type){return Math.max(Runtime.getNativeTypeSize(type),Runtime.QUANTUM_SIZE);},dedup:function dedup(items,ident){var seen={};if(ident){return items.filter(function(item){if(seen[item[ident]])return false;seen[item[ident]]=true;return true;});}else{return items.filter(function(item){if(seen[item])return false;seen[item]=true;return true;});}},set:function set(){var args=typeof_default()(arguments[0])==='object'?arguments[0]:arguments;var ret={};for(var i=0;i=0){diffs.push(curr-prev);}prev=curr;return curr;});type.flatSize=Runtime.alignMemory(type.flatSize,type.alignSize);if(diffs.length==0){type.flatFactor=type.flatSize;}else if(Runtime.dedup(diffs).length==1){type.flatFactor=diffs[0];}type.needsFlattening=type.flatFactor!=1;return type.flatIndexes;},generateStructInfo:function generateStructInfo(struct,typeName,offset){var type,alignment;if(typeName){offset=offset||0;type=(typeof Types==='undefined'?Runtime.typeInfo:Types.types)[typeName];if(!type)return null;if(type.fields.length!=struct.length){console.warn('Number of named fields must match the type for '+typeName+': possibly duplicate struct names. Cannot return structInfo');return null;}alignment=type.flatIndexes;}else{var type={fields:struct.map(function(item){return item[0];})};alignment=Runtime.calculateStructAlignment(type);}var ret={__size__:type.flatSize};if(typeName){struct.forEach(function(item,i){if(typeof item==='string'){ret[item]=alignment[i]+offset;}else{// embedded struct\nvar key;for(var k in item){key=k;}ret[key]=Runtime.generateStructInfo(item[key],type.fields[i],alignment[i]);}});}else{struct.forEach(function(item,i){ret[item[1]]=alignment[i];});}return ret;},dynCall:function dynCall(sig,ptr,args){if(args&&args.length){if(!args.splice)args=Array.prototype.slice.call(args);args.splice(0,0,ptr);return Module['dynCall_'+sig].apply(null,args);}else{return Module['dynCall_'+sig].call(null,ptr);}},UTF8Processor:function UTF8Processor(){var buffer=[];var needed=0;this.processCChar=function(code){code=code&0xff;if(buffer.length==0){if((code&0x80)==0x00){// 0xxxxxxx\nreturn String.fromCharCode(code);}buffer.push(code);if((code&0xe0)==0xc0){// 110xxxxx\nneeded=1;}else if((code&0xf0)==0xe0){// 1110xxxx\nneeded=2;}else{// 11110xxx\nneeded=3;}return'';}if(needed){buffer.push(code);needed--;if(needed>0)return'';}var c1=buffer[0];var c2=buffer[1];var c3=buffer[2];var c4=buffer[3];var ret;if(buffer.length==2){ret=String.fromCharCode((c1&0x1f)<<6|c2&0x3f);}else if(buffer.length==3){ret=String.fromCharCode((c1&0x0f)<<12|(c2&0x3f)<<6|c3&0x3f);}else{// http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae\nvar codePoint=(c1&0x07)<<18|(c2&0x3f)<<12|(c3&0x3f)<<6|c4&0x3f;ret=String.fromCharCode(Math.floor((codePoint-0x10000)/0x400)+0xd800,(codePoint-0x10000)%0x400+0xdc00);}buffer.length=0;return ret;};this.processJSString=function(string){string=unescape(encodeURIComponent(string));var ret=[];for(var i=0;i=TOTAL_MEMORY){abort('Out of memory.');}return ret;},alignMemory:function alignMemory(size,quantum){var ret=size=Math.ceil(size/(quantum?quantum:8))*(quantum?quantum:8);return ret;},makeBigInt:function makeBigInt(low,high,unsigned){var ret=unsigned?+(low>>>0)+ +(high>>>0)*+4294967296:+(low>>>0)+ +(high|0)*+4294967296;return ret;},GLOBAL_BASE:8,QUANTUM_SIZE:4};/* Initialize the runtime memory */ // TODO: Allow user to set up how much memory LibTimidity get at initialization\n// original amount of memory was 67108864\nvar TOTAL_MEMORY=67108864*8;var PAGE_SIZE=4096;var HEAP8,HEAPU8,HEAP16,HEAPU16,HEAP32,HEAPU32,HEAPF32,HEAPF64;var STATIC_BASE=0,STATICTOP=0;var STACK_BASE=0,STACKTOP=0,STACK_MAX=0;// stack area\nvar DYNAMIC_BASE=0,DYNAMICTOP=0;// dynamic area handled by sbrk\nassert(typeof Int32Array!=='undefined'&&typeof Float64Array!=='undefined'&&!!new Int32Array(1)['subarray']&&!!new Int32Array(1)['set'],'Typed arrays not supported.');var buffer=new ArrayBuffer(TOTAL_MEMORY);HEAP8=new Int8Array(buffer);HEAP16=new Int16Array(buffer);HEAP32=new Int32Array(buffer);HEAPU8=new Uint8Array(buffer);HEAPU16=new Uint16Array(buffer);HEAPU32=new Uint32Array(buffer);HEAPF32=new Float32Array(buffer);HEAPF64=new Float64Array(buffer);// Endianness check (note: assumes compiler arch was little-endian)\nHEAP32[0]=255;assert(HEAPU8[0]===255&&HEAPU8[3]===0,'Typed arrays 2 must be run on a little-endian system');/**\n * @function alignMemoryPage\n * @memberof LibTiMidity\n * @instance\n * @param {Number} x\n */function alignMemoryPage(x){return x+4095&-4096;}var Module={};this.Module=Module;Module.arguments=arguments;if(!Module['arguments']){Module['arguments']=[];}Module.read=function(url){var xhr=new XMLHttpRequest();xhr.open('GET',url,false);xhr.send(null);return xhr.responseText;};Module.print=function(message){console.log(message);};Module.preRun=[];Module.postRun=[];// Whether we are quitting the application. If so, no more code should run.\nvar ABORT=false;var tempI64;function ExitStatus(status){this.name='ExitStatus';this.message='Program terminated with exit('+status+')';this.status=status;}ExitStatus.prototype=new Error();ExitStatus.prototype.constructor=ExitStatus;/**\n * Exits the script.\n * @function exit\n * @memberof LibTiMidity\n * @instance\n * @param {string} status The message to display.\n */function exit(status){ABORT=true;STACKTOP=initialStackTop;// exit the runtime\nexitRuntime();throw new ExitStatus(status);}Module.exit=exit;/**\n * Throws an error that aborts the execution of the script.\n * @function abort\n * @memberof LibTiMidity\n * @instance\n * @param {string} text The message to display.\n */function abort(text){ABORT=true;throw new Error(text).stack;}Module.abort=abort;/**\n * Aborts the execution of the script if assertion fails.\n * @function assert\n * @memberof LibTiMidity\n * @instance\n * @param {boolean} condition The assertion to test.\n * @param {string} text The message to display if the assertion fails.\n */function assert(condition,text){if(!condition){abort(text);}}Module.assert=assert;/**\n * A wrapper to call functions.\n * @function call\n * @memberof LibTiMidity\n * @instance\n * @param {string} ident The name of the function to call.\n * @param {string} returnType The return type of the function, one of the JS types 'number', 'string' or 'array' (use 'number' for any C pointer, and 'array' for JavaScript arrays and typed arrays; note that arrays are 8-bit).\n * @param {array} argTypes An array of the types of arguments for the function (if there are no arguments, this can be ommitted). Types are as in returnType, except that 'array' is not possible (there is no way for us to know the length of the array)\n * @param {array} args An array of the arguments to the function, as native JS values (as in returnType). Note that string arguments will be stored on the stack (the JS string will become a C string on the stack).\n * @return Native JS value (as in returnType)\n */Module.call=function call(ident,returnType,argTypes,args){var func=Module['_'+ident];if(!func){abort(\"Unknown function: \\\"\".concat(ident,\"\\\".\"));}var stack=0;function toC(value,type){if(type=='string'){if(value===null||value===undefined||value===0)return 0;// null string\nvalue=intArrayFromString(value);type='array';}if(type=='array'){if(!stack)stack=Runtime.stackSave();var _ret=Runtime.stackAlloc(value.length);writeArrayToMemory(value,_ret);return _ret;}return value;}function fromC(value,type){if(type=='string'){return Pointer_stringify(value);}assert(type!='array');return value;}var i=0;var cArgs=args?args.map(function(arg){return toC(arg,argTypes[i++]);}):[];var ret=fromC(func.apply(null,cArgs),returnType);if(stack)Runtime.stackRestore(stack);return ret;};/**\n * Dynamically sets a value in memory at runtime. Only does *aligned* writes. This is a lower-level operation.\n * @function setValue\n * @memberof LibTiMidity\n * @instance\n * @param ptr Pointer.\n * @param value\n * @param {string} type LLVM type ('i8', , 'i16', 'i32', 'i64', 'float', 'double')\n */function setValue(ptr,value,type){type=type||'i8';if(type.charAt(type.length-1)==='*')type='i32';// pointers are 32-bit\nswitch(type){case'i1':HEAP8[ptr]=value;break;case'i8':HEAP8[ptr]=value;break;case'i16':HEAP16[ptr>>1]=value;break;case'i32':HEAP32[ptr>>2]=value;break;case'i64':tempI64=[value>>>0,(tempDouble=value,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/+4294967296)>>>0:0)],HEAP32[ptr>>2]=tempI64[0],HEAP32[ptr+4>>2]=tempI64[1];break;case'float':HEAPF32[ptr>>2]=value;break;case'double':HEAPF64[ptr>>3]=value;break;default:abort('invalid type for setValue: '+type);}}Module.setValue=setValue;/**\n * Dynamically gets a value in memory at runtime. Only does *aligned* reads. This is a lower-level operation.\n * @function getValue\n * @memberof LibTiMidity\n * @instance\n * @param ptr Pointer.\n * @param {string} type LLVM type ('i8', , 'i16', 'i32', 'i64', 'float', 'double')\n */function getValue(ptr,type){type=type||'i8';if(type.charAt(type.length-1)==='*')type='i32';// pointers are 32-bit\nswitch(type){case'i1':return HEAP8[ptr];case'i8':return HEAP8[ptr];case'i16':return HEAP16[ptr>>1];case'i32':return HEAP32[ptr>>2];case'i64':return HEAP32[ptr>>2];case'float':return HEAPF32[ptr>>2];case'double':return HEAPF64[ptr>>3];default:abort('invalid type for getValue: '+type);}return null;}Module['getValue']=getValue;var ALLOC_NORMAL=0;// Tries to use _malloc()\nvar ALLOC_STACK=1;// Lives for the duration of the current function call\nvar ALLOC_STATIC=2;// Cannot be freed\nvar ALLOC_DYNAMIC=3;// Cannot be freed except through sbrk\nvar ALLOC_NONE=4;// Do not allocate\nModule['ALLOC_NORMAL']=ALLOC_NORMAL;Module['ALLOC_STACK']=ALLOC_STACK;Module['ALLOC_STATIC']=ALLOC_STATIC;Module['ALLOC_DYNAMIC']=ALLOC_DYNAMIC;Module['ALLOC_NONE']=ALLOC_NONE;/**\n * This is for internal use. Optimized for multiple syntaxes to save space in generated code. You should allocate memory using _malloc(), initialize it with setValue(), and so forth.\n * @function allocate\n * @memberof LibTiMidity\n * @instance\n * @param slab An array of data or a number. If a number, then the size of the block to allocate in *bytes* (note that this is sometimes confusing: the next parameter does not affect this).\n * @param types Either an array of types, one for each byte (or 0 if no type at that position), or a single type which is used for the entire block. This only matters if there is initial data. If slab is a number, then this does not matter at all and is ignored.\n * @param allocator How to allocate memory, see ALLOC_*\n */function allocate(slab,types,allocator,ptr){var zeroinit,size;if(typeof slab==='number'){zeroinit=true;size=slab;}else{zeroinit=false;size=slab.length;}var singleType=typeof types==='string'?types:null;var ret;if(allocator==ALLOC_NONE){ret=ptr;}else{ret=[_malloc,Runtime.stackAlloc,Runtime.staticAlloc,Runtime.dynamicAlloc][allocator===undefined?ALLOC_STATIC:allocator](Math.max(size,singleType?1:types.length));}if(zeroinit){var ptr=ret,stop;assert((ret&3)==0);stop=ret+(size&~3);for(;ptr>2]=0;}stop=ret+size;while(ptr=128)hasUtf=true;else if(t==0&&!length)break;i++;if(length&&i==length)break;}if(!length)length=i;var ret='';if(!hasUtf){var MAX_CHUNK=1024;// split up into chunks, because .apply on a huge string can overflow the stack\nvar curr;while(length>0){curr=String.fromCharCode.apply(String,HEAPU8.subarray(ptr,ptr+Math.min(length,MAX_CHUNK)));ret=ret?ret+curr:curr;ptr+=MAX_CHUNK;length-=MAX_CHUNK;}return ret;}var utf8=new Runtime.UTF8Processor();for(i=0;i>1];if(codeUnit==0)return str;++i;// fromCharCode constructs a character from a UTF-16 code unit, so we can pass the UTF16 string right through.\nstr+=String.fromCharCode(codeUnit);}}Module['UTF16ToString']=UTF16ToString;/**\n * Copies a JavaScript string to the emscripten HEAP. The copy is null-terminated and encoded in UTF16LE form. The copy will require at most (str.length*2+1)*2 bytes of space in the HEAP.\n * @function stringToUTF16\n * @memberof LibTiMidity\n * @instance\n * @param {string} str JavaScript string.\n * @param outPtr HEAP address (pointer).\n */function stringToUTF16(str,outPtr){for(var i=0;i>1]=codeUnit;}// Null-terminate the pointer to the HEAP.\nHEAP16[outPtr+str.length*2>>1]=0;}Module['stringToUTF16']=stringToUTF16;/**\n * @function UTF32ToString\n * @memberof LibTiMidity\n * @instance\n * @param ptr Pointer to a null-terminated UTF32LE-encoded string in the emscripten HEAP.\n * @return\n */function UTF32ToString(ptr){var i=0;var str='';while(1){var utf32=HEAP32[ptr+i*4>>2];if(utf32==0)return str;++i;// Gotcha: fromCharCode constructs a character from a UTF-16 encoded code (pair), not from a Unicode code point! So encode the code point to UTF-16 for constructing.\nif(utf32>=0x10000){var ch=utf32-0x10000;str+=String.fromCharCode(0xd800|ch>>10,0xdc00|ch&0x3ff);}else{str+=String.fromCharCode(utf32);}}}Module['UTF32ToString']=UTF32ToString;/**\n * Copies a JavaScript string to the emscripten HEAP. The copy is null-terminated and encoded in UTF32LE form. The copy will require at most (str.length+1)*4 bytes of space in the HEAP.\n * @function stringToUTF32\n * @memberof LibTiMidity\n * @instance\n * @param {string} str JavaScript string.\n * @param outPtr HEAP address (pointer).\n */function stringToUTF32(str,outPtr){var iChar=0;for(var iCodeUnit=0;iCodeUnit=0xd800&&codeUnit<=0xdfff){var trailSurrogate=str.charCodeAt(++iCodeUnit);codeUnit=0x10000+((codeUnit&0x3ff)<<10)|trailSurrogate&0x3ff;}HEAP32[outPtr+iChar*4>>2]=codeUnit;++iChar;}// Null-terminate the pointer to the HEAP.\nHEAP32[outPtr+iChar*4>>2]=0;}Module['stringToUTF32']=stringToUTF32;/**\n * @function callRuntimeCallbacks\n * @memberof LibTiMidity\n * @instance\n * @param callbacks\n */function callRuntimeCallbacks(callbacks){while(callbacks.length>0){var callback=callbacks.shift();if(typeof callback=='function'){callback();continue;}var func=callback.func;if(typeof func==='number'){if(callback.arg===undefined){Runtime.dynCall('v',func);}else{Runtime.dynCall('vi',func,[callback.arg]);}}else{func(callback.arg===undefined?null:callback.arg);}}}var __ATPRERUN__=[];// functions called before the runtime is initialized\nvar __ATINIT__=[];// functions called during startup\nvar __ATMAIN__=[];// functions called when main() is to be run\nvar __ATEXIT__=[];// functions called during shutdown\nvar __ATPOSTRUN__=[];// functions called after the runtime has exited\nvar runtimeInitialized=false;function preRun(){// compatibility - merge in anything from Module['preRun'] at this time\nif(Module['preRun']){if(typeof Module['preRun']=='function')Module['preRun']=[Module['preRun']];while(Module['preRun'].length){addOnPreRun(Module['preRun'].shift());}}callRuntimeCallbacks(__ATPRERUN__);}function ensureInitRuntime(){if(runtimeInitialized)return;runtimeInitialized=true;callRuntimeCallbacks(__ATINIT__);}function preMain(){callRuntimeCallbacks(__ATMAIN__);}function exitRuntime(){callRuntimeCallbacks(__ATEXIT__);}function postRun(){// compatibility - merge in anything from Module['postRun'] at this time\nif(Module['postRun']){if(typeof Module['postRun']=='function')Module['postRun']=[Module['postRun']];while(Module['postRun'].length){addOnPostRun(Module['postRun'].shift());}}callRuntimeCallbacks(__ATPOSTRUN__);}/**\n * @function addOnPreRun\n * @memberof LibTiMidity\n * @instance\n * @param cb Callback.\n */function addOnPreRun(cb){__ATPRERUN__.unshift(cb);}Module['addOnPreRun']=Module.addOnPreRun=addOnPreRun;/**\n * @function addOnInit\n * @memberof LibTiMidity\n * @instance\n * @param cb Callback.\n */function addOnInit(cb){__ATINIT__.unshift(cb);}Module['addOnInit']=addOnInit;/**\n * @function addOnPreMain\n * @memberof LibTiMidity\n * @instance\n * @param cb Callback.\n */function addOnPreMain(cb){__ATMAIN__.unshift(cb);}Module['addOnPreMain']=addOnPreMain;/**\n * @function addOnExit\n * @memberof LibTiMidity\n * @instance\n * @param cb Callback.\n */function addOnExit(cb){__ATEXIT__.unshift(cb);}Module['addOnExit']=addOnExit;/**\n * @function addOnPostRun\n * @memberof LibTiMidity\n * @instance\n * @param cb Callback.\n */function addOnPostRun(cb){__ATPOSTRUN__.unshift(cb);}Module['addOnPostRun']=addOnPostRun;/**\n * @function intArrayFromString\n * @memberof LibTiMidity\n * @instance\n * @param stringy\n * @param dontAddNull\n * @param length\n */ // Tools\n// This processes a JS string into a C-line array of numbers, 0-terminated.\n// For LLVM-originating strings, see parser.js:parseLLVMString function\nfunction intArrayFromString(stringy,dontAddNull,length/* optional */){var ret=new Runtime.UTF8Processor().processJSString(stringy);if(length){ret.length=length;}if(!dontAddNull){ret.push(0);}return ret;}Module['intArrayFromString']=intArrayFromString;/**\n * @function intArrayToString\n * @memberof LibTiMidity\n * @instance\n * @param array\n */function intArrayToString(array){var ret=[];for(var i=0;i0xff){chr&=0xff;}ret.push(String.fromCharCode(chr));}return ret.join('');}Module['intArrayToString']=intArrayToString;/**\n * @function writeStringToMemory\n * @memberof LibTiMidity\n * @instance\n * @param string\n * @param buffer\n * @param dontAddNull\n */ // Write a Javascript array to somewhere in the heap\nfunction writeStringToMemory(string,buffer,dontAddNull){var array=intArrayFromString(string,dontAddNull);var i=0;while(i=0){return value;}return bits<=32?2*Math.abs(1<=half&&(bits<=32||value>half)){// for huge values, we can hit the precision limit and always get true here. so don't do that\n// but, in general there is no perfect solution here. With 64-bit ints, we get rounding and errors\n// TODO: In i64 mode 1, resign the two parts separately and safely\nvalue=-2*half+value;// Cannot bitshift half, as it may be at the limit of the bits JS uses in bitshifts\n}return value;}if(!Math['imul'])Math['imul']=function(a,b){var ah=a>>>16;var al=a&0xffff;var bh=b>>>16;var bl=b&0xffff;return al*bl+(ah*bl+al*bh<<16)|0;};Math.imul=Math['imul'];var Math_abs=Math.abs;var Math_sin=Math.sin;var Math_ceil=Math.ceil;var Math_floor=Math.floor;var Math_pow=Math.pow;var Math_min=Math.min;// A counter of dependencies for calling run(). If we need to\n// do asynchronous work before running, increment this and\n// decrement it. Incrementing must happen in a place like\n// PRE_RUN_ADDITIONS (used by emcc to add file preloading).\n// Note that you can add dependencies in preRun, even though\n// it happens right before run - run will be postponed until\n// the dependencies are met.\nvar runDependencies=0;var runDependencyTracking={};var runDependencyWatcher=null;var dependenciesFulfilled=null;// overridden to take different actions when all run dependencies are fulfilled\n/**\n * @function addRunDependency\n * @memberof LibTiMidity\n * @instance\n * @param id\n */function addRunDependency(id){runDependencies++;if(Module['monitorRunDependencies']){Module['monitorRunDependencies'](runDependencies);}if(id){assert(!runDependencyTracking[id]);runDependencyTracking[id]=1;}else{console.warn('warning: run dependency added without ID');}}Module['addRunDependency']=addRunDependency;/**\n * @function removeRunDependency\n * @memberof LibTiMidity\n * @instance\n * @param id\n */function removeRunDependency(id){runDependencies--;if(Module['monitorRunDependencies']){Module['monitorRunDependencies'](runDependencies);}if(id){assert(runDependencyTracking[id]);delete runDependencyTracking[id];}else{console.warn('warning: run dependency removed without ID');}if(runDependencies==0){if(runDependencyWatcher!==null){clearInterval(runDependencyWatcher);runDependencyWatcher=null;}if(dependenciesFulfilled){var callback=dependenciesFulfilled;dependenciesFulfilled=null;callback();// can add another dependenciesFulfilled\n}}}Module['removeRunDependency']=removeRunDependency;var memoryInitializer=null;// === Body ===\nSTATIC_BASE=8;STATICTOP=STATIC_BASE+8448;/* global initializers */__ATINIT__.push({func:function func(){runPostSets();}});var _stderr;var _stderr=_stderr=allocate([0,0,0,0,0,0,0,0],'i8',ALLOC_STATIC);/* memory initializer */ // prettier-ignore\nallocate(MEMORY_ALLOCATION,\"i8\",ALLOC_NONE,Runtime.GLOBAL_BASE);var tempDoublePtr=Runtime.alignMemory(allocate(12,'i8',ALLOC_STATIC),8);assert(tempDoublePtr%8==0);var ___errno_state=0;function ___setErrNo(value){// For convenient setting and returning of errno.\nHEAP32[___errno_state>>2]=value;return value;}var PATH={splitPath:function splitPath(filename){var splitPathRe=/^(\\/?|)([\\s\\S]*?)((?:\\.{1,2}|[^\\/]+?|)(\\.[^.\\/]*|))(?:[\\/]*)$/;return splitPathRe.exec(filename).slice(1);},normalizeArray:function normalizeArray(parts,allowAboveRoot){// if the path tries to go above the root, `up` ends up > 0\nvar up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==='.'){parts.splice(i,1);}else if(last==='..'){parts.splice(i,1);up++;}else if(up){parts.splice(i,1);up--;}}// if the path is allowed to go above the root, restore leading ..s\nif(allowAboveRoot){for(;up--;up){parts.unshift('..');}}return parts;},normalize:function normalize(path){var isAbsolute=path.charAt(0)==='/',trailingSlash=path.substr(-1)==='/';// Normalize the path\npath=PATH.normalizeArray(path.split('/').filter(function(p){return!!p;}),!isAbsolute).join('/');if(!path&&!isAbsolute){path='.';}if(path&&trailingSlash){path+='/';}return(isAbsolute?'/':'')+path;},dirname:function dirname(path){var result=PATH.splitPath(path),root=result[0],dir=result[1];if(!root&&!dir){// No dirname whatsoever\nreturn'.';}if(dir){// It has a dirname, strip trailing slash\ndir=dir.substr(0,dir.length-1);}return root+dir;},basename:function basename(path,ext){// EMSCRIPTEN return '/'' for '/', not an empty string\nif(path==='/')return'/';var f=PATH.splitPath(path)[2];if(ext&&f.substr(-1*ext.length)===ext){f=f.substr(0,f.length-ext.length);}return f;},extname:function extname(path){return PATH.splitPath(path)[3];},join:function join(){var paths=Array.prototype.slice.call(arguments,0);return PATH.normalize(paths.filter(function(p,index){if(typeof p!=='string'){throw new TypeError('Arguments to path.join must be strings');}return p;}).join('/'));},resolve:function resolve(){var resolvedPath='',resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:FS.cwd();// Skip empty and invalid entries\nif(typeof path!=='string'){throw new TypeError('Arguments to path.resolve must be strings');}else if(!path){continue;}resolvedPath=path+'/'+resolvedPath;resolvedAbsolute=path.charAt(0)==='/';}// At this point the path should be resolved to a full absolute path, but handle relative paths to be safe (might happen when process.cwd() fails)\nresolvedPath=PATH.normalizeArray(resolvedPath.split('/').filter(function(p){return!!p;}),!resolvedAbsolute).join('/');return(resolvedAbsolute?'/':'')+resolvedPath||'.';},relative:function relative(from,to){from=PATH.resolve(from).substr(1);to=PATH.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=='')break;}if(start>end)return[];return arr.slice(start,end-start+1);}var fromParts=trim(from.split('/'));var toParts=trim(to.split('/'));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;icontents.length){contents.push(0);}}},lookup:function lookup(){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.ENOENT);},mknod:function mknod(parent,name,mode,dev){return MEMFS.createNode(parent,name,mode,dev);},rename:function rename(old_node,new_dir,new_name){// if we're overwriting a directory at new_name, make sure it's empty.\nif(FS.isDir(old_node.mode)){var new_node;try{new_node=FS.lookupNode(new_dir,new_name);}catch(e){}if(new_node){for(var i in new_node.contents){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.ENOTEMPTY);}}}// do the internal rewiring\ndelete old_node.parent.contents[old_node.name];old_node.name=new_name;new_dir.contents[new_name]=old_node;},unlink:function unlink(parent,name){delete parent.contents[name];},rmdir:function rmdir(parent,name){var node=FS.lookupNode(parent,name);for(var i in node.contents){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.ENOTEMPTY);}delete parent.contents[name];},readdir:function readdir(node){var entries=['.','..'];for(var key in node.contents){if(!node.contents.hasOwnProperty(key)){continue;}entries.push(key);}return entries;},symlink:function symlink(parent,newname,oldpath){var node=MEMFS.createNode(parent,newname,511|40960,0);node.link=oldpath;return node;},readlink:function readlink(node){if(!FS.isLink(node.mode)){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EINVAL);}return node.link;}},stream_ops:{read:function read(stream,buffer,offset,length,position){var contents=stream.node.contents;if(position>=contents.length)return 0;var size=Math.min(contents.length-position,length);assert(size>=0);if(size>8&&contents.subarray){// non-trivial and typed array\nbuffer.set(contents.subarray(position,position+size),offset);}else{for(var i=0;icontents.length){contents.push(0);}},mmap:function mmap(stream,buffer,length,position,flags){if(!FS.isFile(stream.node.mode)){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.ENODEV);}var ptr;var allocated;var contents=stream.node.contents;// Only make a new copy when MAP_PRIVATE is specified.\nif(!(flags&2)&&(contents.buffer===buffer||contents.buffer===buffer.buffer)){// We can't emulate MAP_SHARED when the file is not backed by the buffer\n// we're mapping to (e.g. the HEAP buffer).\nallocated=false;ptr=contents.byteOffset;}else{// Try to avoid unnecessary slices.\nif(position>0||position+length8){// max recursive lookup of 8\nthrow new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.ELOOP);}// split the path\nvar parts=PATH.normalizeArray(path.split('/').filter(function(p){return!!p;}),false);// start at the root\nvar current=FS.root;var current_path='/';for(var i=0;i40){// limit max consecutive symlinks to 40 (SYMLOOP_MAX).\nthrow new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.ELOOP);}}}}return{path:current_path,node:current};},getPath:function getPath(node){var path;while(true){if(FS.isRoot(node)){return path?PATH.join(node.mount.mountpoint,path):node.mount.mountpoint;}path=path?PATH.join(node.name,path):node.name;node=node.parent;}},hashName:function hashName(parentid,name){var hash=0;for(var i=0;i>>0)%FS.nameTable.length;},hashAddNode:function hashAddNode(node){var hash=FS.hashName(node.parent.id,node.name);node.name_next=FS.nameTable[hash];FS.nameTable[hash]=node;},hashRemoveNode:function hashRemoveNode(node){var hash=FS.hashName(node.parent.id,node.name);if(FS.nameTable[hash]===node){FS.nameTable[hash]=node.name_next;}else{var current=FS.nameTable[hash];while(current){if(current.name_next===node){current.name_next=node.name_next;break;}current=current.name_next;}}},lookupNode:function lookupNode(parent,name){var err=FS.mayLookup(parent);if(err){throw new FS.ErrnoError(err,name);}var hash=FS.hashName(parent.id,name);for(var _node=FS.nameTable[hash];_node;_node=_node.name_next){var nodeName=_node.name;if(_node.parent.id===parent.id&&nodeName===name){return _node;}}// if we failed to find it in the cache, call into the VFS\nreturn FS.lookup(parent,name);},createNode:function createNode(parent,name,mode,rdev){var node={id:FS.nextInode++,name:name,mode:mode,node_ops:{},stream_ops:{},rdev:rdev,parent:null,mount:null};if(!parent){parent=node;// root node sets parent to itself\n}node.parent=parent;node.mount=parent.mount;// compatibility\nvar readMode=292|73;var writeMode=146;// NOTE we must use Object.defineProperties instead of individual calls to\n// Object.defineProperty in order to make closure compiler happy\nObject.defineProperties(node,{read:{get:function get(){return(node.mode&readMode)===readMode;},set:function set(val){val?node.mode|=readMode:node.mode&=~readMode;}},write:{get:function get(){return(node.mode&writeMode)===writeMode;},set:function set(val){val?node.mode|=writeMode:node.mode&=~writeMode;}},isFolder:{get:function get(){return FS.isDir(node.mode);}},isDevice:{get:function get(){return FS.isChrdev(node.mode);}}});FS.hashAddNode(node);return node;},destroyNode:function destroyNode(node){FS.hashRemoveNode(node);},isRoot:function isRoot(node){return node===node.parent;},isMountpoint:function isMountpoint(node){return node.mounted;},isFile:function isFile(mode){return(mode&61440)===32768;},isDir:function isDir(mode){return(mode&61440)===16384;},isLink:function isLink(mode){return(mode&61440)===40960;},isChrdev:function isChrdev(mode){return(mode&61440)===8192;},isBlkdev:function isBlkdev(mode){return(mode&61440)===24576;},isFIFO:function isFIFO(mode){return(mode&61440)===4096;},isSocket:function isSocket(mode){return(mode&49152)===49152;},flagModes:{r:0,rs:1052672,'r+':2,w:577,wx:705,xw:705,'w+':578,'wx+':706,'xw+':706,a:1089,ax:1217,xa:1217,'a+':1090,'ax+':1218,'xa+':1218},modeStringToFlags:function modeStringToFlags(str){var flags=FS.flagModes[str];if(typeof flags==='undefined'){throw new Error('Unknown file open mode: '+str);}return flags;},flagsToPermissionString:function flagsToPermissionString(flag){var accmode=flag&2097155;var perms=['r','w','rw'][accmode];if(flag&512){perms+='w';}return perms;},nodePermissions:function nodePermissions(node,perms){if(FS.ignorePermissions){return 0;}// return 0 if any user, group or owner bits are set.\nif(perms.indexOf('r')!==-1&&!(node.mode&292)){return LIBTIMIDITY_ERROR_CODES.EACCES;}else if(perms.indexOf('w')!==-1&&!(node.mode&146)){return LIBTIMIDITY_ERROR_CODES.EACCES;}else if(perms.indexOf('x')!==-1&&!(node.mode&73)){return LIBTIMIDITY_ERROR_CODES.EACCES;}return 0;},mayLookup:function mayLookup(dir){return FS.nodePermissions(dir,'x');},mayCreate:function mayCreate(dir,name){try{FS.lookupNode(dir,name);return LIBTIMIDITY_ERROR_CODES.EEXIST;}catch(e){}return FS.nodePermissions(dir,'wx');},mayDelete:function mayDelete(dir,name,isdir){var node;try{node=FS.lookupNode(dir,name);}catch(e){return e.errno;}var err=FS.nodePermissions(dir,'wx');if(err){return err;}if(isdir){if(!FS.isDir(node.mode)){return LIBTIMIDITY_ERROR_CODES.ENOTDIR;}if(FS.isRoot(node)||FS.getPath(node)===FS.cwd()){return LIBTIMIDITY_ERROR_CODES.EBUSY;}}else{if(FS.isDir(node.mode)){return LIBTIMIDITY_ERROR_CODES.EISDIR;}}return 0;},mayOpen:function mayOpen(node,flags){if(!node){return LIBTIMIDITY_ERROR_CODES.ENOENT;}if(FS.isLink(node.mode)){return LIBTIMIDITY_ERROR_CODES.ELOOP;}else if(FS.isDir(node.mode)){if((flags&2097155)!==0||// opening for write\nflags&512){return LIBTIMIDITY_ERROR_CODES.EISDIR;}}return FS.nodePermissions(node,FS.flagsToPermissionString(flags));},MAX_OPEN_FDS:4096,nextfd:function nextfd(fd_start,fd_end){fd_start=fd_start||1;fd_end=fd_end||FS.MAX_OPEN_FDS;for(var fd=fd_start;fd<=fd_end;fd++){if(!FS.streams[fd]){return fd;}}throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EMFILE);},getStream:function getStream(fd){return FS.streams[fd];},createStream:function createStream(stream,fd_start,fd_end){var fd=FS.nextfd(fd_start,fd_end);stream.fd=fd;// compatibility\nObject.defineProperties(stream,{object:{get:function get(){return stream.node;},set:function set(val){stream.node=val;}},isRead:{get:function get(){return(stream.flags&2097155)!==1;}},isWrite:{get:function get(){return(stream.flags&2097155)!==0;}},isAppend:{get:function get(){return stream.flags&1024;}}});FS.streams[fd]=stream;return stream;},closeStream:function closeStream(fd){FS.streams[fd]=null;},chrdev_stream_ops:{open:function open(stream){var device=FS.getDevice(stream.node.rdev);// override node's stream ops with the device's\nstream.stream_ops=device.stream_ops;// forward the open call\nif(stream.stream_ops.open){stream.stream_ops.open(stream);}},llseek:function llseek(){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.ESPIPE);}},major:function major(dev){return dev>>8;},minor:function minor(dev){return dev&0xff;},makedev:function makedev(ma,mi){return ma<<8|mi;},registerDevice:function registerDevice(dev,ops){FS.devices[dev]={stream_ops:ops};},getDevice:function getDevice(dev){return FS.devices[dev];},syncfs:function syncfs(populate,callback){if(typeof populate==='function'){callback=populate;populate=false;}var completed=0;var total=FS.mounts.length;var done=function done(err){if(err){return callback(err);}if(++completed>=total){callback(null);}};// sync all mounts\nfor(var i=0;i3&&arguments[3]!==undefined?arguments[3]:true;var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var error=FS.mayCreate(parent,name);if(error){if(throwError){throw new FS.ErrnoError(error,path);}return;}if(!parent.node_ops.mknod){if(throwError){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EPERM,path);}return;}return parent.node_ops.mknod(parent,name,mode,dev);},create:function create(path,mode){var throwError=arguments.length>2&&arguments[2]!==undefined?arguments[2]:true;mode=mode!==undefined?mode:438;mode&=4095;mode|=32768;return FS.mknod(path,mode,0,throwError);},mkdir:function mkdir(path,mode){var throwError=arguments.length>2&&arguments[2]!==undefined?arguments[2]:true;mode=mode!==undefined?mode:511;mode&=511|512;mode|=16384;return FS.mknod(path,mode,0,throwError);},mkdev:function mkdev(path,mode,dev){if(typeof dev==='undefined'){dev=mode;mode=438;}mode|=8192;return FS.mknod(path,mode,dev);},symlink:function symlink(oldpath,newpath){var lookup=FS.lookupPath(newpath,{parent:true});var parent=lookup.node;var newname=PATH.basename(newpath);var err=FS.mayCreate(parent,newname);if(err){throw new FS.ErrnoError(err);}if(!parent.node_ops.symlink){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EPERM);}return parent.node_ops.symlink(parent,newname,oldpath);},rename:function rename(old_path,new_path){var old_dirname=PATH.dirname(old_path);var new_dirname=PATH.dirname(new_path);var old_name=PATH.basename(old_path);var new_name=PATH.basename(new_path);// parents must exist\nvar lookup,old_dir,new_dir;try{lookup=FS.lookupPath(old_path,{parent:true});old_dir=lookup.node;lookup=FS.lookupPath(new_path,{parent:true});new_dir=lookup.node;}catch(e){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EBUSY);}// need to be part of the same mount\nif(old_dir.mount!==new_dir.mount){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EXDEV);}// source must exist\nvar old_node=FS.lookupNode(old_dir,old_name);// old path should not be an ancestor of the new path\nvar relative=PATH.relative(old_path,new_dirname);if(relative.charAt(0)!=='.'){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EINVAL);}// new path should not be an ancestor of the old path\nrelative=PATH.relative(new_path,old_dirname);if(relative.charAt(0)!=='.'){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.ENOTEMPTY);}// see if the new path already exists\nvar new_node;try{new_node=FS.lookupNode(new_dir,new_name);}catch(e){}// not fatal\n// early out if nothing needs to change\nif(old_node===new_node){return;}// we'll need to delete the old entry\nvar isdir=FS.isDir(old_node.mode);var err=FS.mayDelete(old_dir,old_name,isdir);if(err){throw new FS.ErrnoError(err);}// need delete permissions if we'll be overwriting.\n// need create permissions if new doesn't already exist.\nerr=new_node?FS.mayDelete(new_dir,new_name,isdir):FS.mayCreate(new_dir,new_name);if(err){throw new FS.ErrnoError(err);}if(!old_dir.node_ops.rename){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EPERM);}if(FS.isMountpoint(old_node)||new_node&&FS.isMountpoint(new_node)){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EBUSY);}// if we are going to change the parent, check write permissions\nif(new_dir!==old_dir){err=FS.nodePermissions(old_dir,'w');if(err){throw new FS.ErrnoError(err);}}// remove the node from the lookup hash\nFS.hashRemoveNode(old_node);// do the underlying fs rename\ntry{old_dir.node_ops.rename(old_node,new_dir,new_name);}catch(e){throw e;}finally{// add the node back to the hash (in case node_ops.rename\n// changed its name)\nFS.hashAddNode(old_node);}},rmdir:function rmdir(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var err=FS.mayDelete(parent,name,true);if(err){throw new FS.ErrnoError(err);}if(!parent.node_ops.rmdir){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EPERM);}if(FS.isMountpoint(node)){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EBUSY);}parent.node_ops.rmdir(parent,name);FS.destroyNode(node);},readdir:function readdir(path){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;if(!node.node_ops.readdir){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.ENOTDIR);}return node.node_ops.readdir(node);},unlink:function unlink(path){var lookup=FS.lookupPath(path,{parent:true});var parent=lookup.node;var name=PATH.basename(path);var node=FS.lookupNode(parent,name);var err=FS.mayDelete(parent,name,false);if(err){// POSIX says unlink should set EPERM, not EISDIR\nif(err===LIBTIMIDITY_ERROR_CODES.EISDIR)err=LIBTIMIDITY_ERROR_CODES.EPERM;throw new FS.ErrnoError(err);}if(!parent.node_ops.unlink){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EPERM);}if(FS.isMountpoint(node)){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EBUSY);}parent.node_ops.unlink(parent,name);FS.destroyNode(node);},readlink:function readlink(path){var lookup=FS.lookupPath(path,{follow:false});var link=lookup.node;if(!link.node_ops.readlink){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EINVAL);}return link.node_ops.readlink(link);},stat:function stat(path,dontFollow){var lookup=FS.lookupPath(path,{follow:!dontFollow});var node=lookup.node;if(!node.node_ops.getattr){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EPERM);}return node.node_ops.getattr(node);},lstat:function lstat(path){return FS.stat(path,true);},chmod:function chmod(path,mode,dontFollow){var node;if(typeof path==='string'){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node;}else{node=path;}if(!node.node_ops.setattr){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EPERM);}node.node_ops.setattr(node,{mode:mode&4095|node.mode&~4095,timestamp:Date.now()});},lchmod:function lchmod(path,mode){FS.chmod(path,mode,true);},fchmod:function fchmod(fd,mode){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EBADF);}FS.chmod(stream.node,mode);},chown:function chown(path,uid,gid,dontFollow){var node;if(typeof path==='string'){var lookup=FS.lookupPath(path,{follow:!dontFollow});node=lookup.node;}else{node=path;}if(!node.node_ops.setattr){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EPERM);}node.node_ops.setattr(node,{timestamp:Date.now()// we ignore the uid / gid for now\n});},lchown:function lchown(path,uid,gid){FS.chown(path,uid,gid,true);},fchown:function fchown(fd,uid,gid){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EBADF);}FS.chown(stream.node,uid,gid);},truncate:function truncate(path,len){if(len<0){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EINVAL);}var node;if(typeof path==='string'){var lookup=FS.lookupPath(path,{follow:true});node=lookup.node;}else{node=path;}if(!node.node_ops.setattr){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EPERM);}if(FS.isDir(node.mode)){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EISDIR);}if(!FS.isFile(node.mode)){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EINVAL);}var err=FS.nodePermissions(node,'w');if(err){throw new FS.ErrnoError(err);}node.node_ops.setattr(node,{size:len,timestamp:Date.now()});},ftruncate:function ftruncate(fd,len){var stream=FS.getStream(fd);if(!stream){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EBADF);}if((stream.flags&2097155)===0){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EINVAL);}FS.truncate(stream.node,len);},utime:function utime(path,atime,mtime){var lookup=FS.lookupPath(path,{follow:true});var node=lookup.node;node.node_ops.setattr(node,{timestamp:Math.max(atime,mtime)});},open:function open(path,flags,mode,fd_start,fd_end){path=PATH.normalize(path);flags=typeof flags==='string'?FS.modeStringToFlags(flags):flags;mode=typeof mode==='undefined'?438:mode;if(flags&64){mode=mode&4095|32768;}else{mode=0;}var node;try{var lookup=FS.lookupPath(path,{follow:!(flags&131072)});node=lookup.node;}catch(e){}// ignore\n// perhaps we need to create the node\nif(flags&64){if(node){// if O_CREAT and O_EXCL are set, error out if the node already exists\nif(flags&128){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EEXIST);}}else{// node doesn't exist, try to create it\nnode=FS.mknod(path,mode,0);}}if(!node){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.ENOENT);}// can't truncate a device\nif(FS.isChrdev(node.mode)){flags&=~512;}// check permissions\nvar err=FS.mayOpen(node,flags);if(err){throw new FS.ErrnoError(err);}// do truncation if necessary\nif(flags&512){FS.truncate(node,0);}// we've already handled these, don't pass down to the underlying vfs\nflags&=~(128|512);// register the stream with the filesystem\nvar stream=FS.createStream({node:node,path:FS.getPath(node),// we want the absolute path to the node\nflags:flags,seekable:true,position:0,stream_ops:node.stream_ops,// used by the file family libc calls (fopen, fwrite, ferror, etc.)\nungotten:[],error:false},fd_start,fd_end);// call the new stream's open function\nif(stream.stream_ops.open){stream.stream_ops.open(stream);}if(Module['logReadFiles']&&!(flags&1)){if(!FS.readFiles)FS.readFiles={};if(!(path in FS.readFiles)){FS.readFiles[path]=1;console.warn('read file: '+path);}}return stream;},close:function close(stream){try{if(stream.stream_ops.close){stream.stream_ops.close(stream);}}catch(e){throw e;}finally{FS.closeStream(stream.fd);}},llseek:function llseek(stream,offset,whence){if(!stream.seekable||!stream.stream_ops.llseek){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.ESPIPE);}return stream.stream_ops.llseek(stream,offset,whence);},read:function read(stream,buffer,offset,length,position){if(length<0||position<0){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EINVAL);}if((stream.flags&2097155)===1){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EBADF);}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EISDIR);}if(!stream.stream_ops.read){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EINVAL);}var seeking=true;if(typeof position==='undefined'){position=stream.position;seeking=false;}else if(!stream.seekable){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.ESPIPE);}var bytesRead=stream.stream_ops.read(stream,buffer,offset,length,position);if(!seeking)stream.position+=bytesRead;return bytesRead;},write:function write(stream,buffer,offset,length,position,canOwn){if(length<0||position<0){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EINVAL);}if((stream.flags&2097155)===0){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EBADF);}if(FS.isDir(stream.node.mode)){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EISDIR);}if(!stream.stream_ops.write){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EINVAL);}var seeking=true;if(typeof position==='undefined'){position=stream.position;seeking=false;}else if(!stream.seekable){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.ESPIPE);}if(stream.flags&1024){// seek to the end before writing in append mode\nFS.llseek(stream,0,2);}var bytesWritten=stream.stream_ops.write(stream,buffer,offset,length,position,canOwn);if(!seeking)stream.position+=bytesWritten;return bytesWritten;},allocate:function allocate(stream,offset,length){if(offset<0||length<=0){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EINVAL);}if((stream.flags&2097155)===0){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EBADF);}if(!FS.isFile(stream.node.mode)&&!FS.isDir(node.mode)){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.ENODEV);}if(!stream.stream_ops.allocate){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EOPNOTSUPP);}stream.stream_ops.allocate(stream,offset,length);},mmap:function mmap(stream,buffer,offset,length,position,prot,flags){// TODO if PROT is PROT_WRITE, make sure we have write access\nif((stream.flags&2097155)===1){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EACCES);}if(!stream.stream_ops.mmap){throw new FS.errnoError(LIBTIMIDITY_ERROR_CODES.ENODEV);}return stream.stream_ops.mmap(stream,buffer,offset,length,position,prot,flags);},ioctl:function ioctl(stream,cmd,arg){if(!stream.stream_ops.ioctl){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.ENOTTY);}return stream.stream_ops.ioctl(stream,cmd,arg);},readFile:function readFile(path,opts){opts=opts||{};opts.flags=opts.flags||'r';opts.encoding=opts.encoding||'binary';var ret;var stream=FS.open(path,opts.flags);var stat=FS.stat(path);var length=stat.size;var buf=new Uint8Array(length);FS.read(stream,buf,0,length,0);if(opts.encoding==='utf8'){ret='';var utf8=new Runtime.UTF8Processor();for(var i=0;i>2]=stdin.fd;assert(stdin.fd===1,'invalid handle for stdin ('+stdin.fd+')');var stdout=FS.open('/dev/stdout','w');HEAP32[_stdout>>2]=stdout.fd;assert(stdout.fd===2,'invalid handle for stdout ('+stdout.fd+')');var stderr=FS.open('/dev/stderr','w');HEAP32[_stderr>>2]=stderr.fd;assert(stderr.fd===3,'invalid handle for stderr ('+stderr.fd+')');},staticInit:function staticInit(){FS.nameTable=new Array(4096);FS.root=FS.createNode(null,'/',16384|511,0);FS.mount(MEMFS,{},'/');FS.createDefaultDirectories();FS.createDefaultDevices();},init:function init(input,output,error){assert(!FS.init.initialized,'FS.init was previously called. If you want to initialize later with custom parameters, remove any earlier calls (note that one is automatically added to the generated code)');FS.init.initialized=true;// Allow Module.stdin etc. to provide defaults, if none explicitly passed to us here\nModule['stdin']=input||Module['stdin'];Module['stdout']=output||Module['stdout'];Module['stderr']=error||Module['stderr'];FS.createStandardStreams();},quit:function quit(){FS.init.initialized=false;for(var i=0;i2&&arguments[2]!==undefined?arguments[2]:true;var parts=path.split('/').reverse();while(parts.length){var part=parts.pop();if(!part){continue;}var current=PATH.join(parent,part);try{FS.mkdir(current,undefined,throwError);}catch(error){// console.error(error)\n}parent=current;}},/**\n * Creates a file.\n * @function createFile\n * @memberof LibTiMidity\n * @instance\n * @param {string} parent The parent folder.\n * @param {string} name The path to create.\n * @param {boolean} canRead\n * @param {boolean} canWrite\n */createFile:function createFile(parent,name,canRead,canWrite){var path=PATH.join(typeof parent==='string'?parent:FS.getPath(parent),name);var mode=FS.getMode(canRead,canWrite);return FS.create(path,mode);},/**\n * Creates a data file and writes data to it.\n * @function createDataFile\n * @memberof LibTiMidity\n * @instance\n * @param {string} parent\n * @param {string} name\n * @param {array} data\n * @param {boolean} canRead\n * @param {boolean} canWrite\n * @param {boolean} [canOwn]\n * @param {boolean} [throwError = true] If file creation failed, throw an error.\n */createDataFile:function createDataFile(parent,name,data,canRead,canWrite,canOwn){var throwError=arguments.length>6&&arguments[6]!==undefined?arguments[6]:true;var path=name?PATH.join(typeof parent==='string'?parent:FS.getPath(parent),name):parent;var mode=FS.getMode(canRead,canWrite);if(throwError){FS.create(path,mode);}else{try{FS.create(path,mode);}catch(error){return;}}if(data){if(typeof data==='string'){var arr=new Array(data.length);for(var i=0,len=data.length;i>2];path=Pointer_stringify(path);try{var stream=FS.open(path,oflag,mode);return stream.fd;}catch(e){FS.handleFSError(e);return-1;}}function _fopen(filename,mode){// FILE *fopen(const char *restrict filename, const char *restrict mode);\n// http://pubs.opengroup.org/onlinepubs/000095399/functions/fopen.html\nvar flags;mode=Pointer_stringify(mode);if(mode[0]=='r'){if(mode.indexOf('+')!=-1){flags=2;}else{flags=0;}}else if(mode[0]=='w'){if(mode.indexOf('+')!=-1){flags=2;}else{flags=1;}flags|=64;flags|=512;}else if(mode[0]=='a'){if(mode.indexOf('+')!=-1){flags=2;}else{flags=1;}flags|=64;flags|=1024;}else{___setErrNo(LIBTIMIDITY_ERROR_CODES.EINVAL);return 0;}var ret=_open(filename,flags,allocate([0x1ff,0,0,0],'i32',ALLOC_STACK));// All creation permissions.\nreturn ret==-1?0:ret;}Module['_strlen']=_strlen;Module['_strcpy']=_strcpy;Module['_strcat']=_strcat;var SOCKFS={mount:function mount(){return FS.createNode(null,'/',16384|511,0);},createSocket:function createSocket(family,type,protocol){var streaming=type==1;if(protocol){assert(streaming==(protocol==6));// if SOCK_STREAM, must be tcp\n}// create our internal socket structure\nvar sock={family:family,type:type,protocol:protocol,server:null,peers:{},pending:[],recv_queue:[],sock_ops:SOCKFS.websocket_sock_ops};// create the filesystem node to store the socket structure\nvar name=SOCKFS.nextname();var node=FS.createNode(SOCKFS.root,name,49152,0);node.sock=sock;// and the wrapping stream that enables library functions such as read and write to indirectly interact with the socket\nvar stream=FS.createStream({path:name,node:node,flags:FS.modeStringToFlags('r+'),seekable:false,stream_ops:SOCKFS.stream_ops});// map the new stream to the socket structure (sockets have a 1:1 relationship with a stream)\nsock.stream=stream;return sock;},getSocket:function getSocket(fd){var stream=FS.getStream(fd);if(!stream||!FS.isSocket(stream.node.mode)){return null;}return stream.node.sock;},stream_ops:{poll:function poll(stream){var sock=stream.node.sock;return sock.sock_ops.poll(sock);},ioctl:function ioctl(stream,request,varargs){var sock=stream.node.sock;return sock.sock_ops.ioctl(sock,request,varargs);},read:function read(stream,buffer,offset,length){var sock=stream.node.sock;var msg=sock.sock_ops.recvmsg(sock,length);if(!msg){// socket is closed\nreturn 0;}buffer.set(msg.buffer,offset);return msg.buffer.length;},write:function write(stream,buffer,offset,length){var sock=stream.node.sock;return sock.sock_ops.sendmsg(sock,buffer,offset,length);},close:function close(stream){var sock=stream.node.sock;sock.sock_ops.close(sock);}},nextname:function nextname(){if(!SOCKFS.nextname.current){SOCKFS.nextname.current=0;}return'socket['+SOCKFS.nextname.current++ +']';},websocket_sock_ops:{createPeer:function createPeer(sock,addr,port){var ws;if(typeof_default()(addr)==='object'){ws=addr;addr=null;port=null;}if(ws){// for sockets that've already connected (e.g. we're the server) we can inspect the _socket property for the address\nif(ws._socket){addr=ws._socket.remoteAddress;port=ws._socket.remotePort;}// if we're just now initializing a connection to the remote, inspect the url property\nelse{var result=/ws[s]?:\\/\\/([^:]+):(\\d+)/.exec(ws.url);if(!result){throw new Error('WebSocket URL must be in the format ws(s)://address:port');}addr=result[1];port=parseInt(result[2],10);}}else{// create the actual websocket object and connect\ntry{var url='ws://'+addr+':'+port;// the node ws library API is slightly different than the browser's\nvar opts=['binary'];ws=new WebSocket(url,opts);ws.binaryType='arraybuffer';}catch(e){throw new FS.ErrnoError(LIBTIMIDITY_ERROR_CODES.EHOSTUNREACH);}}var peer={addr:addr,port:port,socket:ws,dgram_send_queue:[]};SOCKFS.websocket_sock_ops.addPeer(sock,peer);SOCKFS.websocket_sock_ops.handlePeerEvents(sock,peer);// if this is a bound dgram socket, send the port number first to allow\n// us to override the ephemeral port reported to us by remotePort on the\n// remote end.\nif(sock.type===2&&typeof sock.sport!=='undefined'){peer.dgram_send_queue.push(new Uint8Array([255,255,255,255,'p'.charCodeAt(0),'o'.charCodeAt(0),'r'.charCodeAt(0),'t'.charCodeAt(0),(sock.sport&0xff00)>>8,sock.sport&0xff]));}return peer;},getPeer:function getPeer(sock,addr,port){return sock.peers[addr+':'+port];},addPeer:function addPeer(sock,peer){sock.peers[peer.addr+':'+peer.port]=peer;},removePeer:function removePeer(sock,peer){delete sock.peers[peer.addr+':'+peer.port];},handlePeerEvents:function handlePeerEvents(sock,peer){var first=true;var handleOpen=function handleOpen(){try{var queued=peer.dgram_send_queue.shift();while(queued){peer.socket.send(queued);queued=peer.dgram_send_queue.shift();}}catch(e){// not much we can do here in the way of proper error handling as we've already\n// lied and said this data was sent. shut it down.\npeer.socket.close();}};var handleMessage=function handleMessage(data){assert(typeof data!=='string'&&data.byteLength!==undefined);// must receive an ArrayBuffer\ndata=new Uint8Array(data);// make a typed array view on the array buffer\n// if this is the port message, override the peer's port with it\nvar wasfirst=first;first=false;if(wasfirst&&data.length===10&&data[0]===255&&data[1]===255&&data[2]===255&&data[3]===255&&data[4]==='p'.charCodeAt(0)&&data[5]==='o'.charCodeAt(0)&&data[6]==='r'.charCodeAt(0)&&data[7]==='t'.charCodeAt(0)){// update the peer's port and it's key in the peer map\nvar newport=data[8]<<8|data[9];SOCKFS.websocket_sock_ops.removePeer(sock,peer);peer.port=newport;SOCKFS.websocket_sock_ops.addPeer(sock,peer);return;}sock.recv_queue.push({addr:peer.addr,port:peer.port,data:data});};peer.socket.onopen=handleOpen;peer.socket.onmessage=function(event){handleMessage(event.data);};},poll:function poll(sock){if(sock.type===1&&sock.server){// listen sockets should only say they're available for reading\n// if there are pending clients.\nreturn sock.pending.length?64|1:0;}var mask=0;var dest=sock.type===1// we only care about the socket state for connection-based sockets\n?SOCKFS.websocket_sock_ops.getPeer(sock,sock.daddr,sock.dport):null;if(sock.recv_queue.length||!dest||// connection-less sockets are always ready to read\ndest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){// let recv return 0 once closed\nmask|=64|1;}if(!dest||// connection-less sockets are always ready to write\ndest&&dest.socket.readyState===dest.socket.OPEN){mask|=4;}if(dest&&dest.socket.readyState===dest.socket.CLOSING||dest&&dest.socket.readyState===dest.socket.CLOSED){mask|=16;}return mask;},ioctl:function ioctl(sock,request,arg){switch(request){case 21531:var bytes=0;if(sock.recv_queue.length){bytes=sock.recv_queue[0].data.length;}HEAP32[arg>>2]=bytes;return 0;default:return LIBTIMIDITY_ERROR_CODES.EINVAL;}},close:function close(sock){// if we've spawned a listen server, close it\nif(sock.server){try{sock.server.close();}catch(e){}sock.server=null;}// close any peer connections\nvar peers=Object.keys(sock.peers);for(var i=0;i>3];}else if(type=='i64'){ret=[HEAP32[varargs+argIndex>>2],HEAP32[varargs+(argIndex+8)>>2]];argIndex+=8;// each 32-bit chunk is in a 64-bit block\n}else{type='i32';// varargs are always i32, i64, or double\nret=HEAP32[varargs+argIndex>>2];}argIndex+=Math.max(Runtime.getNativeFieldSize(type),Runtime.getAlignSize(type,null,true));return ret;}var ret=[];var curr,next,currArg;while(1){var startTextIndex=textIndex;curr=HEAP8[textIndex];if(curr===0)break;next=HEAP8[textIndex+1|0];if(curr==37){// Handle flags.\nvar flagAlwaysSigned=false;var flagLeftAlign=false;var flagAlternative=false;var flagZeroPad=false;var flagPadSign=false;flagsLoop:while(1){switch(next){case 43:flagAlwaysSigned=true;break;case 45:flagLeftAlign=true;break;case 35:flagAlternative=true;break;case 48:if(flagZeroPad){break flagsLoop;}else{flagZeroPad=true;break;}case 32:flagPadSign=true;break;default:break flagsLoop;}textIndex++;next=HEAP8[textIndex+1|0];}// Handle width.\nvar width=0;if(next==42){width=getNextArg('i32');textIndex++;next=HEAP8[textIndex+1|0];}else{while(next>=48&&next<=57){width=width*10+(next-48);textIndex++;next=HEAP8[textIndex+1|0];}}// Handle precision.\nvar precisionSet=false;if(next==46){var precision=0;precisionSet=true;textIndex++;next=HEAP8[textIndex+1|0];if(next==42){precision=getNextArg('i32');textIndex++;}else{while(1){var precisionChr=HEAP8[textIndex+1|0];if(precisionChr<48||precisionChr>57)break;precision=precision*10+(precisionChr-48);textIndex++;}}next=HEAP8[textIndex+1|0];}else{var precision=6;// Standard default.\n}// Handle integer sizes. WARNING: These assume a 32-bit architecture!\nvar argSize=void 0;switch(String.fromCharCode(next)){case'h':var nextNext=HEAP8[textIndex+2|0];if(nextNext==104){textIndex++;argSize=1;// char (actually i32 in varargs)\n}else{argSize=2;// short (actually i32 in varargs)\n}break;case'l':var nextNext=HEAP8[textIndex+2|0];if(nextNext==108){textIndex++;argSize=8;// long long\n}else{argSize=4;// long\n}break;case'L':// long long\ncase'q':// int64_t\ncase'j':// intmax_t\nargSize=8;break;case'z':// size_t\ncase't':// ptrdiff_t\ncase'I':// signed ptrdiff_t or unsigned size_t\nargSize=4;break;default:argSize=null;}if(argSize)textIndex++;next=HEAP8[textIndex+1|0];// Handle type specifier.\nswitch(String.fromCharCode(next)){case'd':case'i':case'u':case'o':case'x':case'X':case'p':{// Integer.\nvar signed=next==100||next==105;argSize=argSize||4;var currArg=getNextArg('i'+argSize*8);var origArg=currArg;var argText;// Flatten i64-1 [low, high] into a (slightly rounded) double\nif(argSize==8){currArg=Runtime.makeBigInt(currArg[0],currArg[1],next==117);}// Truncate to requested size.\nif(argSize<=4){var limit=Math.pow(256,argSize)-1;currArg=(signed?reSign:unSign)(currArg&limit,argSize*8);}// Format the number.\nvar currAbsArg=Math.abs(currArg);var prefix='';if(next==100||next==105){if(argSize==8&&i64Math)argText=i64Math.stringify(origArg[0],origArg[1],null);else argText=reSign(currArg,8*argSize,1).toString(10);}else if(next==117){if(argSize==8&&i64Math)argText=i64Math.stringify(origArg[0],origArg[1],true);else argText=unSign(currArg,8*argSize,1).toString(10);currArg=Math.abs(currArg);}else if(next==111){argText=(flagAlternative?'0':'')+currAbsArg.toString(8);}else if(next==120||next==88){prefix=flagAlternative&&currArg!=0?'0x':'';if(argSize==8&&i64Math){if(origArg[1]){argText=(origArg[1]>>>0).toString(16);var lower=(origArg[0]>>>0).toString(16);while(lower.length<8){lower='0'+lower;}argText+=lower;}else{argText=(origArg[0]>>>0).toString(16);}}else if(currArg<0){// Represent negative numbers in hex as 2's complement.\ncurrArg=-currArg;argText=(currAbsArg-1).toString(16);var _buffer=[];for(var i=0;i=0){if(flagAlwaysSigned){prefix='+'+prefix;}else if(flagPadSign){prefix=' '+prefix;}}// Move sign to prefix so we zero-pad after the sign\nif(argText.charAt(0)=='-'){prefix='-'+prefix;argText=argText.substr(1);}// Add padding.\nwhile(prefix.length+argText.lengthexponent&&exponent>=-4){next=(next==103?'f':'F').charCodeAt(0);precision-=exponent+1;}else{next=(next==103?'e':'E').charCodeAt(0);precision--;}effectivePrecision=Math.min(precision,20);}if(next==101||next==69){argText=currArg.toExponential(effectivePrecision);// Make sure the exponent has at least 2 digits.\nif(/[eE][-+]\\d$/.test(argText)){argText=argText.slice(0,-1)+'0'+argText.slice(-1);}}else if(next==102||next==70){argText=currArg.toFixed(effectivePrecision);if(currArg===0&&__reallyNegative(currArg)){argText='-'+argText;}}var parts=argText.split('e');if(isGeneral&&!flagAlternative){// Discard trailing zeros and periods.\nwhile(parts[0].length>1&&parts[0].indexOf('.')!=-1&&(parts[0].slice(-1)=='0'||parts[0].slice(-1)=='.')){parts[0]=parts[0].slice(0,-1);}}else{// Make sure we have a period in alternative mode.\nif(flagAlternative&&argText.indexOf('.')==-1)parts[0]+='.';// Zero pad until required precision.\nwhile(precision>effectivePrecision++){parts[0]+='0';}}argText=parts[0]+(parts.length>1?'e'+parts[1]:'');// Capitalize 'E' if needed.\nif(next==69)argText=argText.toUpperCase();// Add sign.\nif(currArg>=0){if(flagAlwaysSigned){argText='+'+argText;}else if(flagPadSign){argText=' '+argText;}}}// Add padding.\nwhile(argText.length0){ret.push(32);}if(!flagLeftAlign)ret.push(getNextArg('i8'));break;}case'n':{// Write the length written so far to the next parameter.\nvar ptr=getNextArg('i32*');HEAP32[ptr>>2]=ret.length;break;}case'%':{// Literal percent sign.\nret.push(curr);break;}default:{// Unknown specifiers remain untouched.\nfor(var i=startTextIndex;i0){HEAP8[ptr++|0]=streamObj.ungotten.pop();bytesToRead--;bytesRead++;}var err=_read(stream,ptr,bytesToRead);if(err==-1){if(streamObj)streamObj.error=true;return 0;}bytesRead+=err;if(bytesRead>2];return _fprintf(stdout,format,varargs);}Module['_memset']=_memset;Module['_memcpy']=_memcpy;var _llvm_pow_f64=Math_pow;var _sin=Math_sin;function _strrchr(ptr,chr){var ptr2=ptr+_strlen(ptr);do{if(HEAP8[ptr2]==chr)return ptr2;ptr2--;}while(ptr2>=ptr);return 0;}var ___strtok_state=0;function _strtok_r(s,delim,lasts){var skip_leading_delim=1;var spanp;var c,sc;var tok;if(s==0&&(s=getValue(lasts,'i8*'))==0){return 0;}cont:while(1){c=getValue(s++,'i8');for(spanp=delim;(sc=getValue(spanp++,'i8'))!=0;){if(c==sc){if(skip_leading_delim){continue cont;}else{setValue(lasts,s,'i8*');setValue(s-1,0,'i8');return s-1;}}}break;}if(c==0){setValue(lasts,0,'i8*');return 0;}tok=s-1;for(;;){c=getValue(s++,'i8');spanp=delim;do{if((sc=getValue(spanp++,'i8'))==c){if(c==0){s=0;}else{setValue(s-1,0,'i8');}setValue(lasts,s,'i8*');return tok;}}while(sc!=0);}abort('strtok_r error!');}function _strtok(s,delim){return _strtok_r(s,delim,___strtok_state);}function _strncmp(px,py,n){var i=0;while(iy?1:-1;}}return 0;}function _strcmp(px,py){return _strncmp(px,py,TOTAL_MEMORY);}Module['_strncpy']=_strncpy;function _isspace(chr){return chr==32||chr>=9&&chr<=13;}function __parseInt(str,endptr,base,min,max,bits,unsign){// Skip space.\nwhile(_isspace(HEAP8[str])){str++;}// Check for a plus/minus sign.\nvar multiplier=1;if(HEAP8[str]==45){multiplier=-1;str++;}else if(HEAP8[str]==43){str++;}// Find base.\nvar finalBase=base;if(!finalBase){if(HEAP8[str]==48){if(HEAP8[str+1|0]==120||HEAP8[str+1|0]==88){finalBase=16;str+=2;}else{finalBase=8;str++;}}}else if(finalBase==16){if(HEAP8[str]==48){if(HEAP8[str+1|0]==120||HEAP8[str+1|0]==88){str+=2;}}}if(!finalBase)finalBase=10;// Get digits.\nvar chr;var ret=0;while((chr=HEAP8[str])!=0){var digit=parseInt(String.fromCharCode(chr),finalBase);if(isNaN(digit)){break;}else{ret=ret*finalBase+digit;str++;}}// Apply sign.\nret*=multiplier;// Set end pointer.\nif(endptr){HEAP32[endptr>>2]=str;}// Unsign if needed.\nif(unsign){if(Math.abs(ret)>max){ret=max;___setErrNo(LIBTIMIDITY_ERROR_CODES.ERANGE);}else{ret=unSign(ret,bits);}}// Validate range.\nif(ret>max||retmax?max:min;___setErrNo(LIBTIMIDITY_ERROR_CODES.ERANGE);}if(bits==64){return(asm['setTempRet0']((tempDouble=ret,+Math_abs(tempDouble)>=+1?tempDouble>+0?(Math_min(+Math_floor(tempDouble/+4294967296),+4294967295)|0)>>>0:~~+Math_ceil((tempDouble-+(~~tempDouble>>>0))/+4294967296)>>>0:0)),ret>>>0)|0;}return ret;}function _strtol(str,endptr,base){return __parseInt(str,endptr,base,-2147483648,2147483647,32);// LONG_MIN, LONG_MAX.\n}function _atoi(ptr){return _strtol(ptr,null,10);}function _strchr(ptr,chr){ptr--;do{ptr++;var val=HEAP8[ptr];if(val==chr)return ptr;}while(val);return 0;}function _abort(){Module['abort']();}function ___errno_location(){return ___errno_state;}function _sbrk(bytes){/*\n Implement a Linux-like 'memory area' for our 'process'.\n Changes the size of the memory area by |bytes|.\n Returns the address of the previous top ('break') of the memory area.\n We control the \"dynamic\" memory - DYNAMIC_BASE to DYNAMICTOP.\n */var self=_sbrk;if(!self.called){DYNAMICTOP=alignMemoryPage(DYNAMICTOP);// make sure we start out aligned\nself.called=true;assert(Runtime.dynamicAlloc);self.alloc=Runtime.dynamicAlloc;Runtime.dynamicAlloc=function(){abort('cannot dynamically allocate, sbrk now has control');};}var ret=DYNAMICTOP;if(bytes!=0)self.alloc(bytes);return ret;// Previous break location.\n}function _sysconf(name){// long sysconf(int name);\n// http://pubs.opengroup.org/onlinepubs/009695399/functions/sysconf.html\nswitch(name){case 30:return PAGE_SIZE;case 132:case 133:case 12:case 137:case 138:case 15:case 235:case 16:case 17:case 18:case 19:case 20:case 149:case 13:case 10:case 236:case 153:case 9:case 21:case 22:case 159:case 154:case 14:case 77:case 78:case 139:case 80:case 81:case 79:case 82:case 68:case 67:case 164:case 11:case 29:case 47:case 48:case 95:case 52:case 51:case 46:return 200809;case 27:case 246:case 127:case 128:case 23:case 24:case 160:case 161:case 181:case 182:case 242:case 183:case 184:case 243:case 244:case 245:case 165:case 178:case 179:case 49:case 50:case 168:case 169:case 175:case 170:case 171:case 172:case 97:case 76:case 32:case 173:case 35:return-1;case 176:case 177:case 7:case 155:case 8:case 157:case 125:case 126:case 92:case 93:case 129:case 130:case 131:case 94:case 91:return 1;case 74:case 60:case 69:case 70:case 4:return 1024;case 31:case 42:case 72:return 32;case 87:case 26:case 33:return 2147483647;case 34:case 1:return 47839;case 38:case 36:return 99;case 43:case 37:return 2048;case 0:return 2097152;case 3:return 65536;case 28:return 32768;case 44:return 32767;case 75:return 16384;case 39:return 1000;case 89:return 700;case 71:return 256;case 40:return 255;case 2:return 100;case 180:return 64;case 25:return 20;case 5:return 16;case 6:return 6;case 73:return 4;case 84:return 1;}___setErrNo(LIBTIMIDITY_ERROR_CODES.EINVAL);return-1;}function _time(ptr){var ret=Math.floor(Date.now()/1000);if(ptr){HEAP32[ptr>>2]=ret;}return ret;}FS.staticInit();__ATINIT__.unshift({func:function func(){if(!Module['noFSInit']&&!FS.init.initialized)FS.init();}});__ATMAIN__.push({func:function func(){FS.ignorePermissions=false;}});__ATEXIT__.push({func:function func(){FS.quit();}});Module['FS_createFolder']=FS.createFolder;Module.createPath=FS.createPath;Module.createDataFile=FS.createDataFile;Module.loadPatchFromUrl=FS.loadPatchFromUrl;Module['FS_createPreloadedFile']=FS.createPreloadedFile;Module['FS_createLink']=FS.createLink;Module['FS_createDevice']=FS.createDevice;___errno_state=Runtime.staticAlloc(4);HEAP32[___errno_state>>2]=0;__ATINIT__.unshift({func:function func(){TTY.init();}});__ATEXIT__.push({func:function func(){TTY.shutdown();}});TTY.utf8=new Runtime.UTF8Processor();__ATINIT__.push({func:function func(){SOCKFS.root=FS.mount(SOCKFS,{},null);}});___strtok_state=Runtime.staticAlloc(4);STACK_BASE=STACKTOP=Runtime.alignMemory(STATICTOP);STACK_MAX=STACK_BASE+5242880;DYNAMIC_BASE=DYNAMICTOP=Runtime.alignMemory(STACK_MAX);assert(DYNAMIC_BASE>2]|0)|0;if((l|0)!=0){m=e|0;n=c[b>>2]|0;c2(m|0,n|0)|0;if((a[e+(l-1)|0]|0)!=47){a[e+l|0]=47;a[e+(l+1)|0]=0;}}c3(e|0,f|0)|0;l=av(e|0,6576)|0;g=l;if((l|0)!=0){break;}b=c[b+4>>2]|0;}if((k|0)==16){break;}h=g;j=h;i=d;return j|0;}}while(0);h=0;j=h;i=d;return j|0;}}while(0);h=0;j=h;i=d;return j|0;}function bi(a){a=a|0;var b=0;b=c$(a)|0;return b|0;}function bj(a){a=a|0;var b=0,d=0,e=0;b=a;a=bi(8)|0;if((a|0)==0){return;}c[a>>2]=bi((c1(b|0)|0)+1|0)|0;if((c[a>>2]|0)==0){c0(a);return;}else{d=c[a>>2]|0;e=b;c2(d|0,e|0)|0;c[a+4>>2]=c[1664];c[1664]=a;return;}}function bk(){var a=0,b=0;a=c[1664]|0;while(1){if((a|0)==0){break;}b=c[a+4>>2]|0;c0(c[a>>2]|0);c0(a);a=b;}c[1664]=0;return;}function bl(f,h,j,k,l,n,o,p,q){f=f|0;h=h|0;j=j|0;k=k|0;l=l|0;n=n|0;o=o|0;p=p|0;q=q|0;var r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0;j=i;i=i+1056|0;r=j|0;s=j+1024|0;t=j+1032|0;u=j+1040|0;v=j+1048|0;w=f;f=h;h=k;k=l;l=n;n=o;o=p;p=q;q=0;if((f|0)==0){x=0;y=x;i=j;return y|0;}z=bh(f)|0;A=z;if((z|0)==0){z=c[m>>2]|0;// _fprintf;\nar(6512,(z=i,i=i+1|0,i=i+7&-8,c[z>>2]=0,z)|0)|0;i=z;q=1;B=0;while(1){if((c[1048+(B<<2)>>2]|0)==0){break;}z=c1(f|0)|0;if((z+(c1(c[1048+(B<<2)>>2]|0)|0)|0)>>>0<1024){z=r|0;C=f;c2(z|0,C|0)|0;C=r|0;z=c[1048+(B<<2)>>2]|0;c3(C|0,z|0)|0;z=bh(r|0)|0;A=z;if((z|0)!=0){D=46;break;}}B=B+1|0;}if((D|0)==46){q=0;f=r|0;}}if((q|0)!=0){x=0;y=x;i=j;return y|0;}do{if(239==(an(r|0,1,239,A|0)|0)){if((c4(r|0,6248,22)|0)!=0){if((c4(r|0,5888,22)|0)!=0){break;}}do{if((a[r+82|0]|0)!=1){if((a[r+82|0]|0)==0){break;}x=0;y=x;i=j;return y|0;}}while(0);do{if((a[r+151|0]|0)!=1){if((a[r+151|0]|0)==0){break;}x=0;y=x;i=j;return y|0;}}while(0);q=bi(8)|0;c[q>>2]=a[r+198|0]|0;c[q+4>>2]=bi((c[q>>2]|0)*116|0)|0;B=0;while(1){if((B|0)>=(c[q>>2]|0)){D=162;break;}aB(A|0,7,1)|0;if(1!=(an(s|0,1,1,A|0)|0)){D=66;break;}f=(c[q+4>>2]|0)+(B*116|0)|0;if(1!=(an(t|0,4,1,A|0)|0)){D=73;break;}c[f+8>>2]=c[t>>2];if(1!=(an(t|0,4,1,A|0)|0)){D=75;break;}c[f>>2]=c[t>>2];if(1!=(an(t|0,4,1,A|0)|0)){D=77;break;}c[f+4>>2]=c[t>>2];if(1!=(an(u|0,2,1,A|0)|0)){D=79;break;}c[f+12>>2]=e[u>>1]|0;if(1!=(an(t|0,4,1,A|0)|0)){D=81;break;}c[f+24>>2]=c[t>>2];if(1!=(an(t|0,4,1,A|0)|0)){D=83;break;}c[f+28>>2]=c[t>>2];if(1!=(an(t|0,4,1,A|0)|0)){D=85;break;}c[f+32>>2]=c[t>>2];c[f+16>>2]=0;c[f+20>>2]=127;aB(A|0,2,1)|0;if(1!=(an(v|0,1,1,A|0)|0)){D=87;break;}a[r|0]=a[v]|0;if((h|0)==-1){a[f+111|0]=(a[r|0]<<3)+4&127;}else{a[f+111|0]=h&127;}if(18!=(an(r|0,1,18,A|0)|0)){D=92;break;}do{if((a[r+13|0]|0)!=0){if((a[r+14|0]|0)==0){D=95;break;}c[f+92>>2]=bm(w,a[r+12|0]|0)|0;c[f+96>>2]=bn(w,a[r+13|0]|0)|0;a[f+108|0]=a[r+14|0]|0;}else{D=95;}}while(0);if((D|0)==95){D=0;a[f+108|0]=0;c[f+96>>2]=0;c[f+92>>2]=0;}do{if((a[r+16|0]|0)!=0){if((a[r+17|0]|0)==0){D=99;break;}c[f+104>>2]=bo(w,a[r+16|0]|0)|0;c[f+100>>2]=bp(w,a[r+15|0]|0,c[f+104>>2]|0)|0;a[f+109|0]=a[r+17|0]|0;}else{D=99;}}while(0);if((D|0)==99){D=0;a[f+109|0]=0;c[f+104>>2]=0;c[f+100>>2]=0;}if(1!=(an(v|0,1,1,A|0)|0)){D=102;break;}a[f+110|0]=a[v]|0;aB(A|0,40,1)|0;if((l|0)!=-1){a[f+112|0]=l&255;}else{a[f+112|0]=0;}if((a[f+110|0]&4|0)!=0){z=f+110|0;a[z]=(d[z]|32)&255;}do{if((n|0)==1){if((a[f+110|0]&60|0)==0){break;}z=f+110|0;a[z]=d[z]&-61&255;}}while(0);if((o|0)==1){(a[f+110|0]&64|0)!=0;z=f+110|0;a[z]=d[z]&-65&255;}else{if((o|0)!=0){if((a[f+110|0]&28|0)!=0){do{if((c4(r|0,5512,6)|0)!=0){if((a[r+11|0]|0)>=100){D=120;break;}if((a[f+110|0]&32|0)==0){z=f+110|0;a[z]=d[z]&-65&255;}}else{D=120;}}while(0);if((D|0)==120){D=0;z=f+110|0;a[z]=d[z]&-65&255;}}else{z=f+110|0;a[z]=d[z]&-97&255;}}}E=0;while(1){if((E|0)>=6){break;}c[f+36+(E<<2)>>2]=bq(w,a[r+E|0]|0)|0;c[f+60+(E<<2)>>2]=br(a[r+(E+6)|0]|0)|0;E=E+1|0;}c[f+88>>2]=bi(c[f+8>>2]|0)|0;if(1!=(an(c[f+88>>2]|0,c[f+8>>2]|0,1,A|0)|0)){D=132;break;}if((a[f+110|0]&1|0)==0){z=c[f+8>>2]|0;C=c[f+88>>2]|0;F=bi(c[f+8>>2]<<1)|0;G=F;H=F;while(1){F=z;z=F-1|0;if((F|0)==0){break;}F=C;C=F+1|0;I=H;H=I+2|0;b[I>>1]=(a[F]&255)<<8&65535;}C=c[f+88>>2]|0;c[f+88>>2]=G;c0(C);H=f+8|0;c[H>>2]=c[H>>2]<<1;H=f|0;c[H>>2]=c[H>>2]<<1;H=f+4|0;c[H>>2]=c[H>>2]<<1;}if((a[f+110|0]&2|0)!=0){H=(c[f+8>>2]|0)/2|0;z=c[f+88>>2]|0;while(1){F=H;H=F-1|0;if((F|0)==0){break;}F=z;z=F+2|0;b[F>>1]=(b[F>>1]^32768)&65535;}}if((a[f+110|0]&16|0)!=0){bs(c[f+88>>2]|0,0,(c[f+8>>2]|0)/2|0);z=c[f>>2]|0;c[f>>2]=(c[f+8>>2]|0)-(c[f+4>>2]|0);c[f+4>>2]=(c[f+8>>2]|0)-z;z=f+110|0;a[z]=d[z]&-17&255;z=f+110|0;a[z]=(d[z]|4)&255;}if((k|0)!=-1){g[f+84>>2]=+(k|0)/100.0;}else{z=(c[f+8>>2]|0)/2|0;H=0;C=c[f+88>>2]|0;while(1){G=z;z=G-1|0;if((G|0)==0){break;}G=C;C=G+2|0;F=b[G>>1]|0;if((F<<16>>16|0)<0){F=-(F<<16>>16)&65535;}if((F<<16>>16|0)>(H<<16>>16|0)){H=F;}}g[f+84>>2]=32768.0/+(H<<16>>16|0);}C=f+8|0;c[C>>2]=(c[C>>2]|0)/2|0;C=f|0;c[C>>2]=(c[C>>2]|0)/2|0;C=f+4|0;c[C>>2]=(c[C>>2]|0)/2|0;C=f+8|0;c[C>>2]=c[C>>2]<<12;C=f|0;c[C>>2]=c[C>>2]<<12;C=f+4|0;c[C>>2]=c[C>>2]<<12;C=f|0;c[C>>2]=c[C>>2]|(a[s]&15)<<8;C=f+4|0;c[C>>2]=c[C>>2]|(d[s]>>4&15)<<8;do{if((a[f+112|0]|0)!=0){if((a[f+110|0]&4|0)!=0){break;}cF(w,f);}}while(0);if((p|0)==1){c[f+8>>2]=c[f+4>>2];}B=B+1|0;}if((D|0)!=66)if((D|0)!=73)if((D|0)!=75)if((D|0)!=77)if((D|0)!=79)if((D|0)!=81)if((D|0)!=83)if((D|0)!=85)if((D|0)!=87)if((D|0)!=92)if((D|0)!=102)if((D|0)!=132)if((D|0)==162){ao(A|0)|0;x=q;y=x;i=j;return y|0;}E=0;while(1){if((E|0)>=(B|0)){break;}c0(c[(c[q+4>>2]|0)+(E*116|0)+88>>2]|0);E=E+1|0;}c0(c[q+4>>2]|0);c0(q);x=0;y=x;i=j;return y|0;}}while(0);x=0;y=x;i=j;return y|0;}function bm(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=a;a=b;if(a<<24>>24!=0){b=((c[d+13060>>2]|0)*38|0)<<16;e=(b|0)/(_(c[d+4>>2]|0,a&255)|0)|0;f=e;return f|0;}else{e=0;f=e;return f|0;}return 0;}function bn(a,b){a=a|0;b=b|0;var d=0;d=a;a=(_(c[d+13060>>2]<<10,b&255)|0)<<5;return(a|0)/((c[d+4>>2]|0)*38|0|0)|0|0;}function bo(a,b){a=a|0;b=b|0;return((c[a+4>>2]|0)*38|0|0)/((b&255)<<1<<5|0)|0|0;}function bp(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0;e=b;if(e<<24>>24!=0){f=~~(+(d|0)*38.0*65536.0/+(_(c[a+4>>2]|0,e&255)|0));g=f;return g|0;}else{f=0;g=f;return g|0;}return 0;}function bq(a,b){a=a|0;b=b|0;var d=0;d=a;a=b;b=3-((a&255)>>6&3)|0;b=b*3|0;b=(a&63)<>2]|0)|0,c[d+13060>>2]|0)|0;return b<<10|0;}function br(a){a=a|0;return(a&255)<<22|0;}function bs(a,c,d){a=a|0;c=c|0;d=d|0;var e=0,f=0;e=a;a=c;c=d;d=e+(c<<1)|0;e=e+(a<<1)|0;c=c-a|0;c=(c|0)/2|0;while(1){a=c;c=a-1|0;if((a|0)==0){break;}a=b[e>>1]|0;f=e;e=f+2|0;b[f>>1]=b[d>>1]|0;f=d;d=f-2|0;b[f>>1]=a;}return;}// mid_song_get_num_missing_instruments\n// takes a number (a)\n// returns a number\nfunction bt(a){a=a|0;return c[a+13136>>2]|0;}// mid_song_get_missing_instrument\nfunction bu(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=a;a=b;do{if((a|0)>=0){// stops when reached last instrument\nif((a|0)>=(c[d+13136>>2]|0)){break;}// path to patch file\ne=c[d+13140+(a<<2)>>2]|0;f=e;return f|0;}}while(0);e=0;f=e;return f|0;}// returns number of missing patches\nfunction bv(a){a=a|0;var b=0,d=0,e=0;b=a;a=128;d=0;c[b+13136>>2]=0;while(1){e=a;a=e-1|0;if((e|0)==0){break;}// get number of instrument patches\nif((c[b+28+(a<<2)>>2]|0)!=0){d=d+(bw(b,0,a)|0)|0;}// get number of drum patches\nif((c[b+540+(a<<2)>>2]|0)!=0){d=d+(bw(b,1,a)|0)|0;}}return d|0;}function bw(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;e=i;f=a;a=b;b=d;d=0;if((a|0)!=0){g=c[f+540+(b<<2)>>2]|0;}else{g=c[f+28+(b<<2)>>2]|0;}h=g;if((h|0)==0){j=0;k=j;i=e;return k|0;}g=0;while(1){if((g|0)>=128){break;}do{if((c[h+4+(g<<2)>>2]|0)==-1){c[h+4+(g<<2)>>2]=bB(f,a,b,g)|0;if((c[h+4+(g<<2)>>2]|0)!=0){break;}if((c[(c[h>>2]|0)+(g*28|0)>>2]|0)!=0){l=f;n=c[(c[h>>2]|0)+(g*28|0)>>2]|0;o=(a|0)!=0?1:0;p=c[(c[h>>2]|0)+(g*28|0)+12>>2]|0;q=c[(c[h>>2]|0)+(g*28|0)+8>>2]|0;if((c[(c[h>>2]|0)+(g*28|0)+4>>2]|0)!=-1){r=c[(c[h>>2]|0)+(g*28|0)+4>>2]|0;}else{if((a|0)!=0){s=g;}else{s=-1;}r=s;}if((c[(c[h>>2]|0)+(g*28|0)+16>>2]|0)!=-1){t=c[(c[h>>2]|0)+(g*28|0)+16>>2]|0;}else{t=(a|0)!=0?1:-1;}if((c[(c[h>>2]|0)+(g*28|0)+20>>2]|0)!=-1){u=c[(c[h>>2]|0)+(g*28|0)+20>>2]|0;}else{u=(a|0)!=0?1:-1;}v=bl(l,n,o,p,q,r,t,u,c[(c[h>>2]|0)+(g*28|0)+24>>2]|0)|0;c[h+4+(g<<2)>>2]=v;if((v|0)==0){v=c[m>>2]|0;q=c[(c[h>>2]|0)+(g*28|0)>>2]|0;// prints 'Missing patch: arachno-88.pat' or 'Missing patch: MT32Drums/mt32drum-6.pat'\nar(v|0,5120,(v=i,i=i+8|0,c[v>>2]=q,v)|0)|0;i=v;if((c[f+13136>>2]|0)<256){q=c[m>>2]|0;p=c[f+13136>>2]|0;i=v;c[f+13140+(c[f+13136>>2]<<2)>>2]=c[(c[h>>2]|0)+(g*28|0)>>2];v=f+13136|0;c[v>>2]=(c[v>>2]|0)+1;}d=d+1|0;}}else{if((b|0)!=0){if((a|0)!=0){if((c[(c[f+540>>2]|0)+4+(g<<2)>>2]|0)==0){c[(c[f+540>>2]|0)+4+(g<<2)>>2]=-1;}}else{if((c[(c[f+28>>2]|0)+4+(g<<2)>>2]|0)==0){c[(c[f+28>>2]|0)+4+(g<<2)>>2]=-1;}}}c[h+4+(g<<2)>>2]=0;d=d+1|0;}w=246;}else{w=246;}}while(0);if((w|0)==246){w=0;}g=g+1|0;}j=d;k=j;i=e;return k|0;}function bx(a){a=a|0;var b=0,d=0;b=a;a=128;while(1){d=a;a=d-1|0;if((d|0)==0){break;}if((c[b+28+(a<<2)>>2]|0)!=0){by(b,0,a);}if((c[b+540+(a<<2)>>2]|0)!=0){by(b,1,a);}}return;}function by(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0;e=a;a=d;if((b|0)!=0){f=c[e+540+(a<<2)>>2]|0;}else{f=c[e+28+(a<<2)>>2]|0;}a=f;f=0;while(1){if((f|0)>=128){break;}if((c[a+4+(f<<2)>>2]|0)!=0){if((c[a+4+(f<<2)>>2]|0)!=-1){bA(c[a+4+(f<<2)>>2]|0);}c[a+4+(f<<2)>>2]=0;}f=f+1|0;}return;}function bz(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=a;a=bl(d,b,0,-1,-1,-1,0,0,0)|0;if((a|0)!=0){c[d+1052>>2]=a;c[d+1056>>2]=-1;e=0;f=e;return f|0;}else{e=-1;f=e;return f|0;}return 0;}function bA(a){a=a|0;var b=0;b=a;if((b|0)==0){return;}a=0;while(1){if((a|0)>=(c[b>>2]|0)){break;}c0(c[(c[b+4>>2]|0)+(a*116|0)+88>>2]|0);a=a+1|0;}c0(c[b+4>>2]|0);c0(b);return;}function bB(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=a;a=b;b=d;d=e;if((c[f+24>>2]|0)==0){g=0;h=g;return h|0;}a=(a|0)!=0?-2147483648:0;e=0;L368:while(1){if(e>>>0>=(c[(c[f+24>>2]|0)+4>>2]|0)>>>0){break;}i=(c[(c[f+24>>2]|0)+8>>2]|0)+(e*20|0)|0;do{if((c[(c[i+4>>2]|0)+4>>2]&-2147483648|0)==(a|0)){if(((c[(c[i+4>>2]|0)+4>>2]|0)>>>8&255|0)!=(b|0)){break;}if((c[(c[i+4>>2]|0)+8>>2]|0)==(d|0)){j=295;break L368;}}}while(0);e=e+1|0;}do{if((e|0)==(c[(c[f+24>>2]|0)+4>>2]|0)){if((b|0)!=0){break;}e=0;while(1){if(e>>>0>=(c[(c[f+24>>2]|0)+4>>2]|0)>>>0){break;}i=(c[(c[f+24>>2]|0)+8>>2]|0)+(e*20|0)|0;if((c[(c[i+4>>2]|0)+4>>2]&-2147483648|0)==(a|0)){if((c[(c[i+4>>2]|0)+8>>2]|0)==(d|0)){j=304;break;}}e=e+1|0;}}}while(0);if((e|0)==(c[(c[f+24>>2]|0)+4>>2]|0)){g=0;h=g;return h|0;}j=bi(8)|0;c[j>>2]=c[c[i+4>>2]>>2];c[j+4>>2]=bi((c[j>>2]|0)*116|0)|0;c5(c[j+4>>2]|0,0,(c[j>>2]|0)*116|0|0);e=0;while(1){if(e>>>0>=(c[c[i+4>>2]>>2]|0)>>>0){break;}bC(f,(c[j+4>>2]|0)+(e*116|0)|0,i,e);e=e+1|0;}g=j;h=g;return h|0;}function bC(b,f,h,i){b=b|0;f=f|0;h=h|0;i=i|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0.0,B=0.0,C=0.0,D=0.0;j=b;b=f;f=h;h=(c[f+8>>2]|0)+(i*24|0)|0;i=(c[(c[j+24>>2]|0)+20>>2]|0)+((c[(c[h+4>>2]|0)+8>>2]|0)*20|0)|0;k=1056+((e[c[h>>2]>>1]|0)<<2)|0;c[b+24>>2]=d[k]|d[k+1|0]<<8|d[k+2|0]<<16|d[k+3|0]<<24;k=1056+((e[(c[h>>2]|0)+2>>1]|0)<<2)|0;c[b+28>>2]=d[k]|d[k+1|0]<<8|d[k+2|0]<<16|d[k+3|0]<<24;k=1056+((e[(c[h+8>>2]|0)+4>>1]|0)<<2)|0;c[b+32>>2]=d[k]|d[k+1|0]<<8|d[k+2|0]<<16|d[k+3|0]<<24;c[b+16>>2]=e[(c[h>>2]|0)+4>>1]|0;c[b+20>>2]=e[(c[h>>2]|0)+6>>1]|0;a[b+110|0]=1;c[b+12>>2]=c[(c[i>>2]|0)+4>>2];c[b+8>>2]=((c[i+8>>2]|0)>>>0)/2|0;c[b+88>>2]=bi(c[i+8>>2]|0)|0;k=c[b+88>>2]|0;l=c[i+4>>2]|0;m=c[i+8>>2]|0;c6(k|0,l|0,m)|0;if((c[(c[h+8>>2]|0)+16>>2]|0)!=0){m=b+110|0;a[m]=(d[m]|0|36)&255;c[b>>2]=((c[(c[h+12>>2]|0)+8>>2]|0)>>>0)/2|0;c[b+4>>2]=(c[b>>2]|0)+(((c[(c[h+12>>2]|0)+12>>2]|0)>>>0)/2|0);}g[b+84>>2]=1.0;if((a[b+110|0]&32|0)==0){n=b;o=n+8|0;p=c[o>>2]|0;q=p<<12;c[o>>2]=q;r=b;s=r|0;t=c[s>>2]|0;u=t<<12;c[s>>2]=u;v=b;w=v+4|0;x=c[w>>2]|0;y=x<<12;c[w>>2]=y;return;}m=0;l=0;do{if((c[f+12>>2]|0)!=0){if((c[(c[f+12>>2]|0)+4>>2]|0)>>>0<=0){z=326;break;}if((c[f+16>>2]|0)==0){z=326;break;}m=c[f+12>>2]|0;l=c[f+16>>2]|0;}else{z=326;}}while(0);if((z|0)==326){m=c[h+16>>2]|0;l=c[h+20>>2]|0;}h=bD(c[m+4>>2]|0,l,518)|0;A=+bE(h);h=bD(c[m+4>>2]|0,l,524)|0;B=+bE(h);h=bD(c[m+4>>2]|0,l,519)|0;C=+bE(h);h=bD(c[m+4>>2]|0,l,521)|0;D=+bE(h);h=bD(c[m+4>>2]|0,l,522)|0;z=~~((1.0-+bF(h))*250.0);h=bD(c[m+4>>2]|0,l,4)|0;a[b+111|0]=~~((+bF(h)+0.5)*127.0)&255;c[b+60>>2]=bG(255)|0;c[b+36>>2]=bH(j,255,c[b+12>>2]|0,A)|0;c[b+64>>2]=bG(250)|0;c[b+40>>2]=bH(j,5,c[b+12>>2]|0,B)|0;c[b+68>>2]=bG(z)|0;c[b+44>>2]=bH(j,255-z|0,c[b+12>>2]|0,C)|0;c[b+72>>2]=bG(0)|0;c[b+48>>2]=bH(j,z+5|0,c[b+12>>2]|0,D)|0;c[b+76>>2]=bG(0)|0;c[b+52>>2]=bG(1)|0;c[b+80>>2]=bG(0)|0;c[b+56>>2]=bG(1)|0;z=b+110|0;a[z]=(d[z]|0|64)&255;n=b;o=n+8|0;p=c[o>>2]|0;q=p<<12;c[o>>2]=q;r=b;s=r|0;t=c[s>>2]|0;u=t<<12;c[s>>2]=u;v=b;w=v+4|0;x=c[w>>2]|0;y=x<<12;c[w>>2]=y;return;}function bD(a,b,d){a=a|0;b=b|0;d=d|0;var f=0,g=0,h=0;f=a;a=b;b=d;d=0;g=0;while(1){if(g>>>0>=f>>>0){break;}h=a+(g*12|0)|0;if((e[h+4>>1]|0|0)==(b&65535|0)){do{if((e[h>>1]|0|0)==0){if((e[h+2>>1]|0|0)!=0){break;}if((e[h+6>>1]|0|0)!=0){break;}d=d+(c[h+8>>2]|0)|0;}}while(0);}g=g+1|0;}return d|0;}function bE(a){a=a|0;var b=0,c=0.0,d=0.0;b=a;do{if((b|0)!=-2147483648){if((b|0)==0){break;}c=+P(2.0,+(+((b|0)/65536|0|0)/1200.0))*1.0e3;d=c;return+d;}}while(0);c=0.0;d=c;return+d;}function bF(a){a=a|0;return+(+((a|0)/65536|0|0)/1.0e3);}function bG(a){a=a|0;return a<<22|0;}function bH(a,b,d,e){a=a|0;b=b|0;d=d|0;e=+e;var f=0.0;d=a;a=b;f=e;if(f<6.0){f=6.0;}if((a|0)==0){a=255;}a=a<<22;return~~(+(a|0)/+(c[d+4>>2]|0)*+(c[d+13060>>2]|0)*1.0e3/f)|0;}function bI(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0;f=b;b=e;e=c[f+1724+(b*236|0)+220>>2]|0;if((e|0)>5){a[f+1724+(b*236|0)|0]=0;g=1;h=g;return h|0;}if((a[(c[f+1724+(b*236|0)+4>>2]|0)+110|0]&64|0)!=0){if((d[f+1724+(b*236|0)|0]|0|0)==1){i=361;}else{if((d[f+1724+(b*236|0)|0]|0|0)==2){i=361;}}do{if((i|0)==361){if((e|0)<=2){break;}c[f+1724+(b*236|0)+32>>2]=0;g=0;h=g;return h|0;}}while(0);}c[f+1724+(b*236|0)+220>>2]=e+1;if((c[f+1724+(b*236|0)+24>>2]|0)==(c[(c[f+1724+(b*236|0)+4>>2]|0)+60+(e<<2)>>2]|0)){g=bI(f,b)|0;h=g;return h|0;}c[f+1724+(b*236|0)+28>>2]=c[(c[f+1724+(b*236|0)+4>>2]|0)+60+(e<<2)>>2];c[f+1724+(b*236|0)+32>>2]=c[(c[f+1724+(b*236|0)+4>>2]|0)+36+(e<<2)>>2];if((c[f+1724+(b*236|0)+28>>2]|0)<(c[f+1724+(b*236|0)+24>>2]|0)){c[f+1724+(b*236|0)+32>>2]=-(c[f+1724+(b*236|0)+32>>2]|0);}g=0;h=g;return h|0;}function bJ(b,e){b=b|0;e=e|0;var f=0,i=0.0,j=0,l=0.0;f=b;b=e;i=+g[f+1724+(b*236|0)+68>>2];if((c[f+1724+(b*236|0)+232>>2]|0)!=0){if((c[f+1724+(b*236|0)+48>>2]|0)!=0){i=i*+g[f+1724+(b*236|0)+76>>2];}if((a[(c[f+1724+(b*236|0)+4>>2]|0)+110|0]&64|0)!=0){e=8+(c[f+1724+(b*236|0)+24>>2]>>23<<3)|0;i=i*(c[k>>2]=d[e]|d[e+1|0]<<8|d[e+2|0]<<16|d[e+3|0]<<24,c[k+4>>2]=d[e+4|0]|d[e+5|0]<<8|d[e+6|0]<<16|d[e+7|0]<<24,+h[k>>3]);}j=~~(i*4096.0);if((j|0)>8191){j=8191;}c[f+1724+(b*236|0)+60>>2]=j;return;}l=+g[f+1724+(b*236|0)+72>>2];if((c[f+1724+(b*236|0)+48>>2]|0)!=0){i=i*+g[f+1724+(b*236|0)+76>>2];l=l*+g[f+1724+(b*236|0)+76>>2];}if((a[(c[f+1724+(b*236|0)+4>>2]|0)+110|0]&64|0)!=0){e=8+(c[f+1724+(b*236|0)+24>>2]>>23<<3)|0;i=i*(c[k>>2]=d[e]|d[e+1|0]<<8|d[e+2|0]<<16|d[e+3|0]<<24,c[k+4>>2]=d[e+4|0]|d[e+5|0]<<8|d[e+6|0]<<16|d[e+7|0]<<24,+h[k>>3]);e=8+(c[f+1724+(b*236|0)+24>>2]>>23<<3)|0;l=l*(c[k>>2]=d[e]|d[e+1|0]<<8|d[e+2|0]<<16|d[e+3|0]<<24,c[k+4>>2]=d[e+4|0]|d[e+5|0]<<8|d[e+6|0]<<16|d[e+7|0]<<24,+h[k>>3]);}j=~~(i*4096.0);if((j|0)>8191){j=8191;}e=~~(l*4096.0);if((e|0)>8191){e=8191;}c[f+1724+(b*236|0)+60>>2]=j;c[f+1724+(b*236|0)+64>>2]=e;return;}function bK(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0;h=i;i=i+8|0;j=h|0;k=b;b=e;e=f;c[j>>2]=g;g=k+1724+(e*236|0)|0;if((d[g|0]|0|0)==4){if((c[j>>2]|0)>=20){c[j>>2]=20;}l=cy(k,e,j)|0;bL(k,l,b,e,c[j>>2]|0);a[g|0]=0;i=h;return;}l=cy(k,e,j)|0;if((c[k+8>>2]&1|0)!=0){do{if((c[g+32>>2]|0)!=0){m=402;}else{if((c[g+48>>2]|0)!=0){m=402;break;}bN(k,l,b,e,c[j>>2]|0);}}while(0);if((m|0)==402){bM(k,l,b,e,c[j>>2]|0);}}else{if((c[g+232>>2]|0)==0){do{if((c[g+32>>2]|0)!=0){m=408;}else{if((c[g+48>>2]|0)!=0){m=408;break;}bP(k,l,b,e,c[j>>2]|0);}}while(0);if((m|0)==408){bO(k,l,b,e,c[j>>2]|0);}}else{if((c[g+232>>2]|0)==3){do{if((c[g+32>>2]|0)!=0){m=414;}else{if((c[g+48>>2]|0)!=0){m=414;break;}bR(k,l,b,e,c[j>>2]|0);}}while(0);if((m|0)==414){bQ(k,l,b,e,c[j>>2]|0);}}else{if((c[g+232>>2]|0)==2){b=b+4|0;}do{if((c[g+32>>2]|0)!=0){m=421;}else{if((c[g+48>>2]|0)!=0){m=421;break;}bT(k,l,b,e,c[j>>2]|0);}}while(0);if((m|0)==421){bS(k,l,b,e,c[j>>2]|0);}}}}i=h;return;}function bL(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;h=a;a=d;d=e;e=f;f=g;g=0;if((f|0)==0){f=1;}i=c[h+1724+(e*236|0)+60>>2]|0;j=-((i|0)/(f|0)|0)|0;if((j|0)==0){j=-1;}if((c[h+8>>2]&1|0)!=0){while(1){k=f;f=k-1|0;if((k|0)==0){l=474;break;}i=i+j|0;if((i|0)<0){l=472;break;}k=a;a=k+2|0;g=b[k>>1]|0;k=_(i,g<<16>>16)|0;m=d;d=m+4|0;c[m>>2]=(c[m>>2]|0)+k;}if((l|0)==472){return;}else if((l|0)==474){return;}}if((c[h+1724+(e*236|0)+232>>2]|0)==0){k=c[h+1724+(e*236|0)+64>>2]|0;m=-((k|0)/(f|0)|0)|0;while(1){n=f;f=n-1|0;if((n|0)==0){break;}i=i+j|0;if((i|0)<0){i=0;}k=k+m|0;if((k|0)<0){k=0;}n=a;a=n+2|0;g=b[n>>1]|0;n=_(i,g<<16>>16)|0;o=d;d=o+4|0;c[o>>2]=(c[o>>2]|0)+n;n=_(k,g<<16>>16)|0;o=d;d=o+4|0;c[o>>2]=(c[o>>2]|0)+n;}}else{do{if((c[h+1724+(e*236|0)+232>>2]|0)==3){while(1){k=f;f=k-1|0;if((k|0)==0){l=450;break;}i=i+j|0;if((i|0)<0){break;}k=a;a=k+2|0;g=b[k>>1]|0;k=_(i,g<<16>>16)|0;m=d;d=m+4|0;c[m>>2]=(c[m>>2]|0)+k;k=_(i,g<<16>>16)|0;m=d;d=m+4|0;c[m>>2]=(c[m>>2]|0)+k;}if((l|0)==450){break;}return;}else{do{if((c[h+1724+(e*236|0)+232>>2]|0)==1){while(1){k=f;f=k-1|0;if((k|0)==0){l=457;break;}i=i+j|0;if((i|0)<0){break;}k=a;a=k+2|0;g=b[k>>1]|0;k=_(i,g<<16>>16)|0;m=d;d=m+4|0;c[m>>2]=(c[m>>2]|0)+k;d=d+4|0;}if((l|0)==457){break;}return;}else{do{if((c[h+1724+(e*236|0)+232>>2]|0)==2){while(1){k=f;f=k-1|0;if((k|0)==0){l=464;break;}i=i+j|0;if((i|0)<0){break;}k=a;a=k+2|0;g=b[k>>1]|0;d=d+4|0;k=_(i,g<<16>>16)|0;m=d;d=m+4|0;c[m>>2]=(c[m>>2]|0)+k;}if((l|0)==464){break;}return;}}while(0);}}while(0);}}while(0);}return;}function bM(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;h=a;a=d;d=e;e=f;f=g;g=h+1724+(e*236|0)|0;i=c[g+60>>2]|0;j=c[g+224>>2]|0;k=j;do{if((j|0)==0){k=c[h+13060>>2]|0;if((bU(h,e)|0)==0){i=c[g+60>>2]|0;break;}return;}}while(0);while(1){if((f|0)==0){l=502;break;}if((k|0)>=(f|0)){l=495;break;}f=f-k|0;while(1){j=k;k=j-1|0;if((j|0)==0){break;}j=a;a=j+2|0;m=b[j>>1]|0;j=_(i,m<<16>>16)|0;n=d;d=n+4|0;c[n>>2]=(c[n>>2]|0)+j;}k=c[h+13060>>2]|0;if((bU(h,e)|0)!=0){l=493;break;}i=c[g+60>>2]|0;}if((l|0)==502){return;}else if((l|0)==493){return;}else if((l|0)==495){c[g+224>>2]=k-f;while(1){k=f;f=k-1|0;if((k|0)==0){break;}k=a;a=k+2|0;m=b[k>>1]|0;k=_(i,m<<16>>16)|0;g=d;d=g+4|0;c[g>>2]=(c[g>>2]|0)+k;}return;}}function bN(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0;h=d;d=e;e=g;g=c[a+1724+(f*236|0)+60>>2]|0;while(1){f=e;e=f-1|0;if((f|0)==0){break;}f=h;h=f+2|0;a=_(g,b[f>>1]|0)|0;f=d;d=f+4|0;c[f>>2]=(c[f>>2]|0)+a;}return;}function bO(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0;h=a;a=d;d=e;e=f;f=g;g=h+1724+(e*236|0)|0;i=c[g+60>>2]|0;j=c[g+64>>2]|0;k=c[g+224>>2]|0;l=k;do{if((k|0)==0){l=c[h+13060>>2]|0;if((bU(h,e)|0)==0){i=c[g+60>>2]|0;j=c[g+64>>2]|0;break;}return;}}while(0);while(1){if((f|0)==0){m=530;break;}if((l|0)>=(f|0)){m=522;break;}f=f-l|0;while(1){k=l;l=k-1|0;if((k|0)==0){break;}k=a;a=k+2|0;n=b[k>>1]|0;k=_(i,n<<16>>16)|0;o=d;d=o+4|0;c[o>>2]=(c[o>>2]|0)+k;k=_(j,n<<16>>16)|0;o=d;d=o+4|0;c[o>>2]=(c[o>>2]|0)+k;}l=c[h+13060>>2]|0;if((bU(h,e)|0)!=0){m=520;break;}i=c[g+60>>2]|0;j=c[g+64>>2]|0;}if((m|0)==522){c[g+224>>2]=l-f;while(1){l=f;f=l-1|0;if((l|0)==0){break;}l=a;a=l+2|0;n=b[l>>1]|0;l=_(i,n<<16>>16)|0;g=d;d=g+4|0;c[g>>2]=(c[g>>2]|0)+l;l=_(j,n<<16>>16)|0;g=d;d=g+4|0;c[g>>2]=(c[g>>2]|0)+l;}return;}else if((m|0)==520){return;}else if((m|0)==530){return;}}function bP(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0;h=a;a=d;d=e;e=f;f=g;g=c[h+1724+(e*236|0)+60>>2]|0;i=c[h+1724+(e*236|0)+64>>2]|0;while(1){e=f;f=e-1|0;if((e|0)==0){break;}e=a;a=e+2|0;h=b[e>>1]|0;e=_(g,h<<16>>16)|0;j=d;d=j+4|0;c[j>>2]=(c[j>>2]|0)+e;e=_(i,h<<16>>16)|0;h=d;d=h+4|0;c[h>>2]=(c[h>>2]|0)+e;}return;}function bQ(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;h=a;a=d;d=e;e=f;f=g;g=h+1724+(e*236|0)|0;i=c[g+60>>2]|0;j=c[g+224>>2]|0;k=j;do{if((j|0)==0){k=c[h+13060>>2]|0;if((bU(h,e)|0)==0){i=c[g+60>>2]|0;break;}return;}}while(0);while(1){if((f|0)==0){l=556;break;}if((k|0)>=(f|0)){l=549;break;}f=f-k|0;while(1){j=k;k=j-1|0;if((j|0)==0){break;}j=a;a=j+2|0;m=b[j>>1]|0;j=_(i,m<<16>>16)|0;n=d;d=n+4|0;c[n>>2]=(c[n>>2]|0)+j;j=_(i,m<<16>>16)|0;n=d;d=n+4|0;c[n>>2]=(c[n>>2]|0)+j;}k=c[h+13060>>2]|0;if((bU(h,e)|0)!=0){l=547;break;}i=c[g+60>>2]|0;}if((l|0)==549){c[g+224>>2]=k-f;while(1){k=f;f=k-1|0;if((k|0)==0){break;}k=a;a=k+2|0;m=b[k>>1]|0;k=_(i,m<<16>>16)|0;g=d;d=g+4|0;c[g>>2]=(c[g>>2]|0)+k;k=_(i,m<<16>>16)|0;g=d;d=g+4|0;c[g>>2]=(c[g>>2]|0)+k;}return;}else if((l|0)==556){return;}else if((l|0)==547){return;}}function bR(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0;h=d;d=e;e=g;g=c[a+1724+(f*236|0)+60>>2]|0;while(1){f=e;e=f-1|0;if((f|0)==0){break;}f=h;h=f+2|0;a=b[f>>1]|0;f=_(g,a<<16>>16)|0;i=d;d=i+4|0;c[i>>2]=(c[i>>2]|0)+f;f=_(g,a<<16>>16)|0;a=d;d=a+4|0;c[a>>2]=(c[a>>2]|0)+f;}return;}function bS(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0;h=a;a=d;d=e;e=f;f=g;g=h+1724+(e*236|0)|0;i=c[g+60>>2]|0;j=c[g+224>>2]|0;k=j;do{if((j|0)==0){k=c[h+13060>>2]|0;if((bU(h,e)|0)==0){i=c[g+60>>2]|0;break;}return;}}while(0);while(1){if((f|0)==0){l=582;break;}if((k|0)>=(f|0)){l=576;break;}f=f-k|0;while(1){j=k;k=j-1|0;if((j|0)==0){break;}j=a;a=j+2|0;m=b[j>>1]|0;j=_(i,m<<16>>16)|0;n=d;d=n+4|0;c[n>>2]=(c[n>>2]|0)+j;d=d+4|0;}k=c[h+13060>>2]|0;if((bU(h,e)|0)!=0){l=574;break;}i=c[g+60>>2]|0;}if((l|0)==582){return;}else if((l|0)==576){c[g+224>>2]=k-f;while(1){k=f;f=k-1|0;if((k|0)==0){break;}k=a;a=k+2|0;m=b[k>>1]|0;k=_(i,m<<16>>16)|0;g=d;d=g+4|0;c[g>>2]=(c[g>>2]|0)+k;d=d+4|0;}return;}else if((l|0)==574){return;}}function bT(a,d,e,f,g){a=a|0;d=d|0;e=e|0;f=f|0;g=g|0;var h=0;h=d;d=e;e=g;g=c[a+1724+(f*236|0)+60>>2]|0;while(1){f=e;e=f-1|0;if((f|0)==0){break;}f=h;h=f+2|0;a=_(g,b[f>>1]|0)|0;f=d;d=f+4|0;c[f>>2]=(c[f>>2]|0)+a;d=d+4|0;}return;}function bU(a,b){a=a|0;b=b|0;var d=0,e=0,f=0;d=a;a=b;do{if((c[d+1724+(a*236|0)+32>>2]|0)!=0){if((bV(d,a)|0)==0){break;}e=1;f=e;return f|0;}}while(0);if((c[d+1724+(a*236|0)+48>>2]|0)!=0){bW(d,a);}bJ(d,a);e=0;f=e;return f|0;}function bV(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=a;a=b;b=d+1724+(a*236|0)+24|0;c[b>>2]=(c[b>>2]|0)+(c[d+1724+(a*236|0)+32>>2]|0);if((c[d+1724+(a*236|0)+32>>2]|0)<0){if((c[d+1724+(a*236|0)+24>>2]|0)<=(c[d+1724+(a*236|0)+28>>2]|0)){e=603;}else{e=601;}}else{e=601;}do{if((e|0)==601){if((c[d+1724+(a*236|0)+32>>2]|0)<=0){break;}if((c[d+1724+(a*236|0)+24>>2]|0)>=(c[d+1724+(a*236|0)+28>>2]|0)){e=603;}}}while(0);do{if((e|0)==603){c[d+1724+(a*236|0)+24>>2]=c[d+1724+(a*236|0)+28>>2];if((bI(d,a)|0)==0){break;}f=1;g=f;return g|0;}}while(0);f=0;g=f;return g|0;}function bW(a,b){a=a|0;b=b|0;var e=0,f=0;e=a;a=b;b=(d[(c[e+1724+(a*236|0)+4>>2]|0)+108|0]|0)<<7;if((c[e+1724+(a*236|0)+36>>2]|0)!=0){f=e+1724+(a*236|0)+40|0;c[f>>2]=(c[f>>2]|0)+(c[e+1724+(a*236|0)+36>>2]|0);if((c[e+1724+(a*236|0)+40>>2]|0)>=65536){c[e+1724+(a*236|0)+36>>2]=0;}else{b=_(b,c[e+1724+(a*236|0)+40>>2]|0)|0;b=b>>16;}}f=e+1724+(a*236|0)+44|0;c[f>>2]=(c[f>>2]|0)+(c[e+1724+(a*236|0)+48>>2]|0);g[e+1724+(a*236|0)+76>>2]=1.0-(+R(+(+(c[e+1724+(a*236|0)+44>>2]>>5|0)*0.006135923151542565))+1.0)*+(b|0)*1.0*762939453125.0e-17;return;}function bX(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;f=d;d=e;e=b;while(1){b=d;d=b-1|0;if((b|0)==0){break;}b=f;f=b+4|0;g=c[b>>2]>>21;if((g|0)>127){g=127;}else{if((g|0)<-128){g=-128;}}b=e;e=b+1|0;a[b]=g&255;}return;}function bY(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0;f=d;d=e;e=b;while(1){b=d;d=b-1|0;if((b|0)==0){break;}b=f;f=b+4|0;g=c[b>>2]>>21;if((g|0)>127){g=127;}else{if((g|0)<-128){g=-128;}}b=e;e=b+1|0;a[b]=(128^g&255)&255;}return;}function bZ(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0;f=d;d=e;e=a;while(1){a=d;d=a-1|0;if((a|0)==0){break;}a=f;f=a+4|0;g=c[a>>2]>>13;if((g|0)>32767){g=32767;}else{if((g|0)<-32768){g=-32768;}}a=e;e=a+2|0;b[a>>1]=g&65535;}return;}function b_(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0;f=d;d=e;e=a;while(1){a=d;d=a-1|0;if((a|0)==0){break;}a=f;f=a+4|0;g=c[a>>2]>>13;if((g|0)>32767){g=32767;}else{if((g|0)<-32768){g=-32768;}}a=e;e=a+2|0;b[a>>1]=(32768^g&65535)&65535;}return;}function b$(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0;f=d;d=e;e=a;while(1){a=d;d=a-1|0;if((a|0)==0){break;}a=f;f=a+4|0;g=c[a>>2]>>13;if((g|0)>32767){g=32767;}else{if((g|0)<-32768){g=-32768;}}a=e;e=a+2|0;b[a>>1]=(((g&65535)<<16>>16&255)<<8|(g&65535)<<16>>16>>8&255)&65535;}return;}function b0(b,d,e,f){b=b|0;d=d|0;e=e|0;f=f|0;var g=0,h=0;g=i;i=i+8|0;h=g|0;c[h>>2]=0;a[h+5|0]=1;a[h+4|0]=d&255;a[h+6|0]=e&255;a[h+7|0]=f&255;b1(b,h);i=g;return;}function b1(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,i=0;f=b;b=e;e=c[f+13052>>2]|0;g=-1;h=2147483647;if(0==(b|0)){i=c[f+13080>>2]|0;}else{i=b;}while(1){b=e;e=b-1|0;if((b|0)==0){break;}if((d[f+1724+(e*236|0)|0]|0|0)==0){g=e;}else{do{if((d[f+1724+(e*236|0)+1|0]|0|0)==(d[i+4|0]|0|0)){if((d[f+1724+(e*236|0)+2|0]|0|0)!=(d[i+6|0]|0|0)){if((c[f+1084+((d[f+1724+(e*236|0)+1|0]|0)*40|0)+28>>2]|0)==0){break;}}ch(f,e);}}while(0);}}if((g|0)!=-1){cn(f,i,g);return;}e=c[f+13052>>2]|0;while(1){b=e;e=b-1|0;if((b|0)==0){break;}do{if((d[f+1724+(e*236|0)|0]|0|0)!=1){if((d[f+1724+(e*236|0)|0]|0|0)==4){break;}b=c[f+1724+(e*236|0)+60>>2]|0;do{if((c[f+1724+(e*236|0)+232>>2]|0)==0){if((c[f+1724+(e*236|0)+64>>2]|0)<=(b|0)){break;}b=c[f+1724+(e*236|0)+64>>2]|0;}}while(0);if((b|0)<(h|0)){h=b;g=e;}}}while(0);}if((g|0)!=-1){e=f+13068|0;c[e>>2]=(c[e>>2]|0)+1;a[f+1724+(g*236|0)|0]=0;cn(f,i,g);return;}else{g=f+13064|0;c[g>>2]=(c[g>>2]|0)+1;return;}}function b2(b,e){b=b|0;e=e|0;var f=0,g=0,h=0;f=b;b=e;e=c[f+13052>>2]|0;if(0==(b|0)){g=c[f+13080>>2]|0;}else{g=b;}L890:while(1){b=e;e=b-1|0;if((b|0)==0){h=709;break;}do{if((d[f+1724+(e*236|0)|0]|0|0)==1){if((d[f+1724+(e*236|0)+1|0]|0|0)!=(d[g+4|0]|0|0)){break;}if((d[f+1724+(e*236|0)+2|0]|0|0)==(d[g+6|0]|0|0)){break L890;}}}while(0);}if((h|0)==709){return;}if((c[f+1084+((d[g+4|0]|0)*40|0)+12>>2]|0)!=0){a[f+1724+(e*236|0)|0]=2;}else{ci(f,e);}return;}function b3(a){a=a|0;var b=0;b=a;c[b>>2]=1;b4(b);b5(b,0);return;}function b4(a){a=a|0;var b=0;b=a;g[b+16>>2]=+(c[b+20>>2]|0)/100.0;return;}function b5(a,b){a=a|0;b=b|0;var d=0;d=a;a=b;if((c[d+13088>>2]|0)>(a|0)){c[d+13088>>2]=0;}ck(d);c[d+13080>>2]=c[d+13076>>2];c[392]=5e5;if((a|0)==0){return;}cl(d,a);return;}function b6(b,e,f,h){b=b|0;e=e|0;f=f|0;h=h|0;var j=0,k=0,l=0,m=0,n=0,o=0,p=0;j=i;i=i+8|0;k=j|0;l=b;c[k>>2]=e;e=h;if((c[l>>2]|0)==0){m=0;n=m;i=j;return n|0;}h=(f>>>0)/((c[l+12>>2]|0)>>>0)|0;f=c[l+13088>>2]|0;b=(c[l+13088>>2]|0)+h|0;L920:while(1){if((c[l+13088>>2]|0)>=(b|0)){o=758;break;}while(1){if(~~(+(c[c[l+13080>>2]>>2]|0)/+g[258])>>>0>(c[l+13088>>2]|0)>>>0){break;}switch(d[(c[l+13080>>2]|0)+5|0]|0){case 99:{if(0==(e|0)){o=752;break L920;}break;}case 6:{c[l+1084+((d[(c[l+13080>>2]|0)+4|0]|0)*40|0)+12>>2]=d[(c[l+13080>>2]|0)+6|0]|0;if((a[(c[l+13080>>2]|0)+6|0]|0)==0){ca(l);}break;}case 3:{b7(l);break;}case 11:{c[l+1084+((d[(c[l+13080>>2]|0)+4|0]|0)*40|0)+32>>2]=d[(c[l+13080>>2]|0)+6|0]|0;g[l+1084+((d[(c[l+13080>>2]|0)+4|0]|0)*40|0)+36>>2]=0.0;break;}case 14:{cc(l);break;}case 12:{cd(l);break;}case 13:{cb(l,d[(c[l+13080>>2]|0)+4|0]|0);break;}case 9:{if((c[l+13056>>2]&1<>2]|0)+4|0]|0)!=0){c[l+1084+((d[(c[l+13080>>2]|0)+4|0]|0)*40|0)>>2]=d[(c[l+13080>>2]|0)+6|0]|0;}else{c[l+1084+((d[(c[l+13080>>2]|0)+4|0]|0)*40|0)+4>>2]=d[(c[l+13080>>2]|0)+6|0]|0;}break;}case 5:{c[l+1084+((d[(c[l+13080>>2]|0)+4|0]|0)*40|0)+16>>2]=d[(c[l+13080>>2]|0)+6|0]|0;break;}case 7:{c[l+1084+((d[(c[l+13080>>2]|0)+4|0]|0)*40|0)+24>>2]=d[(c[l+13080>>2]|0)+6|0]|0;b9(l);break;}case 1:{if((a[(c[l+13080>>2]|0)+7|0]|0)!=0){b1(l,0);}else{b2(l,0);}break;}case 15:{c[l+1084+((d[(c[l+13080>>2]|0)+4|0]|0)*40|0)>>2]=d[(c[l+13080>>2]|0)+6|0]|0;break;}case 10:{c[392]=(d[(c[l+13080>>2]|0)+4|0]|0)+(d[(c[l+13080>>2]|0)+7|0]<<8)+(d[(c[l+13080>>2]|0)+6|0]<<16);break;}case 8:{c[l+1084+((d[(c[l+13080>>2]|0)+4|0]|0)*40|0)+20>>2]=(d[(c[l+13080>>2]|0)+6|0]|0)+(d[(c[l+13080>>2]|0)+7|0]<<7);g[l+1084+((d[(c[l+13080>>2]|0)+4|0]|0)*40|0)+36>>2]=0.0;b8(l);break;}case 4:{c[l+1084+((d[(c[l+13080>>2]|0)+4|0]|0)*40|0)+8>>2]=d[(c[l+13080>>2]|0)+6|0]|0;b9(l);break;}case 2:{b2(l,0);break;}default:{}}p=l+13080|0;c[p>>2]=(c[p>>2]|0)+8;}if(~~(+(c[c[l+13080>>2]>>2]|0)/+g[258])>>>0>b>>>0){ce(l,k,b-(c[l+13088>>2]|0)|0);}else{ce(l,k,~~(+(c[c[l+13080>>2]>>2]|0)/+g[258])-(c[l+13088>>2]|0)|0);}}if((o|0)==752){c[l>>2]=0;m=_((c[l+13088>>2]|0)-f|0,c[l+12>>2]|0)|0;n=m;i=j;return n|0;}else if((o|0)==758){m=_(h,c[l+12>>2]|0)|0;n=m;i=j;return n|0;}return 0;}function b7(b){b=b|0;var e=0,f=0,g=0,h=0;e=b;b=c[e+13080>>2]|0;f=c[e+13052>>2]|0;L967:while(1){g=f;f=g-1|0;if((g|0)==0){h=772;break;}do{if((d[e+1724+(f*236|0)|0]|0|0)==1){if((d[e+1724+(f*236|0)+1|0]|0|0)!=(d[b+4|0]|0|0)){break;}if((d[e+1724+(f*236|0)+2|0]|0|0)==(d[b+6|0]|0|0)){break L967;}}}while(0);}if((h|0)==772){return;}a[e+1724+(f*236|0)+3|0]=a[b+7|0]|0;cf(e,f);bJ(e,f);return;}function b8(a){a=a|0;var b=0,e=0,f=0;b=a;a=d[(c[b+13080>>2]|0)+4|0]|0;e=c[b+13052>>2]|0;while(1){f=e;e=f-1|0;if((f|0)==0){break;}do{if((d[b+1724+(e*236|0)|0]|0|0)!=0){if((d[b+1724+(e*236|0)+1|0]|0|0)!=(a|0)){break;}cj(b,e);}}while(0);}return;}function b9(a){a=a|0;var b=0,e=0,f=0;b=a;a=d[(c[b+13080>>2]|0)+4|0]|0;e=c[b+13052>>2]|0;while(1){f=e;e=f-1|0;if((f|0)==0){break;}do{if((d[b+1724+(e*236|0)+1|0]|0|0)==(a|0)){if((d[b+1724+(e*236|0)|0]|0|0)!=1){if((d[b+1724+(e*236|0)|0]|0|0)!=2){break;}}cf(b,e);bJ(b,e);}}while(0);}return;}function ca(a){a=a|0;var b=0,e=0,f=0;b=a;a=c[b+13052>>2]|0;e=d[(c[b+13080>>2]|0)+4|0]|0;while(1){f=a;a=f-1|0;if((f|0)==0){break;}do{if((d[b+1724+(a*236|0)|0]|0|0)==2){if((d[b+1724+(a*236|0)+1|0]|0|0)!=(e|0)){break;}ci(b,a);}}while(0);}return;}function cb(a,b){a=a|0;b=b|0;var d=0;d=a;a=b;c[d+1084+(a*40|0)+8>>2]=90;c[d+1084+(a*40|0)+24>>2]=127;c[d+1084+(a*40|0)+12>>2]=0;c[d+1084+(a*40|0)+20>>2]=8192;g[d+1084+(a*40|0)+36>>2]=0.0;return;}function cc(b){b=b|0;var e=0,f=0,g=0;e=b;b=c[e+13052>>2]|0;f=d[(c[e+13080>>2]|0)+4|0]|0;while(1){g=b;b=g-1|0;if((g|0)==0){break;}do{if((d[e+1724+(b*236|0)|0]|0|0)==1){if((d[e+1724+(b*236|0)+1|0]|0|0)!=(f|0)){break;}if((c[e+1084+(f*40|0)+12>>2]|0)!=0){a[e+1724+(b*236|0)|0]=2;}else{ci(e,b);}}}while(0);}return;}function cd(a){a=a|0;var b=0,e=0,f=0;b=a;a=c[b+13052>>2]|0;e=d[(c[b+13080>>2]|0)+4|0]|0;while(1){f=a;a=f-1|0;if((f|0)==0){break;}do{if((d[b+1724+(a*236|0)+1|0]|0|0)==(e|0)){if((d[b+1724+(a*236|0)|0]|0|0)==0){break;}if((d[b+1724+(a*236|0)|0]|0|0)==4){break;}ch(b,a);}}while(0);}return;}function ce(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,i=0,j=0;e=a;a=b;b=d;if((c[e+8>>2]&1|0)!=0){f=1;}else{f=2;}while(1){if((b|0)==0){break;}d=b;if((d|0)>(c[e+1064>>2]|0)){d=c[e+1064>>2]|0;}cg(e,d);g=c[e+1060>>2]|0;h=c[a>>2]|0;i=c[e+1072>>2]|0;j=_(f,d)|0;aZ[g&15](h,i,j);j=_(c[e+12>>2]|0,d)|0;i=a;c[i>>2]=(c[i>>2]|0)+j;b=b-d|0;}return;}function cf(a,b){a=a|0;b=b|0;var e=0,f=0,h=0;e=a;a=b;b=_(d[e+1724+(a*236|0)+3|0]|0,c[e+1084+((d[e+1724+(a*236|0)+1|0]|0)*40|0)+8>>2]|0)|0;f=_(b,c[e+1084+((d[e+1724+(a*236|0)+1|0]|0)*40|0)+24>>2]|0)|0;if((c[e+8>>2]&1|0)!=0){c[e+1724+(a*236|0)+232>>2]=3;g[e+1724+(a*236|0)+68>>2]=+(f|0)*+g[(c[e+1724+(a*236|0)+4>>2]|0)+84>>2]*+g[e+16>>2]*4.76837158203125e-7;return;}do{if((c[e+1724+(a*236|0)+228>>2]|0)>60){if((c[e+1724+(a*236|0)+228>>2]|0)>=68){h=827;break;}c[e+1724+(a*236|0)+232>>2]=3;g[e+1724+(a*236|0)+68>>2]=+(f|0)*+g[(c[e+1724+(a*236|0)+4>>2]|0)+84>>2]*+g[e+16>>2]*4.76837158203125e-7;}else{h=827;}}while(0);if((h|0)==827){if((c[e+1724+(a*236|0)+228>>2]|0)<5){c[e+1724+(a*236|0)+232>>2]=1;g[e+1724+(a*236|0)+68>>2]=+(f|0)*+g[(c[e+1724+(a*236|0)+4>>2]|0)+84>>2]*+g[e+16>>2]*9.5367431640625e-7;}else{if((c[e+1724+(a*236|0)+228>>2]|0)>123){c[e+1724+(a*236|0)+232>>2]=2;g[e+1724+(a*236|0)+68>>2]=+(f|0)*+g[(c[e+1724+(a*236|0)+4>>2]|0)+84>>2]*+g[e+16>>2]*9.5367431640625e-7;}else{c[e+1724+(a*236|0)+232>>2]=0;g[e+1724+(a*236|0)+68>>2]=+(f|0)*+g[(c[e+1724+(a*236|0)+4>>2]|0)+84>>2]*+g[e+16>>2]*7.450580596923828e-9;g[e+1724+(a*236|0)+72>>2]=+g[e+1724+(a*236|0)+68>>2]*+(c[e+1724+(a*236|0)+228>>2]|0);f=e+1724+(a*236|0)+68|0;g[f>>2]=+g[f>>2]*+(127-(c[e+1724+(a*236|0)+228>>2]|0)|0);}}}return;}function cg(a,b){a=a|0;b=b|0;var e=0,f=0;e=a;a=b;if((c[e+8>>2]&1|0)!=0){f=a<<2;}else{f=a<<3;}c5(c[e+1072>>2]|0,0,f|0);f=0;while(1){if((f|0)>=(c[e+13052>>2]|0)){break;}if((d[e+1724+(f*236|0)|0]|0|0)!=0){bK(e,c[e+1072>>2]|0,f,a);}f=f+1|0;}f=e+13088|0;c[f>>2]=(c[f>>2]|0)+a;return;}function ch(b,c){b=b|0;c=c|0;a[b+1724+(c*236|0)|0]=4;return;}function ci(b,d){b=b|0;d=d|0;var e=0,f=0;e=b;b=d;if((a[(c[e+1724+(b*236|0)+4>>2]|0)+110|0]&64|0)!=0){c[e+1724+(b*236|0)+220>>2]=3;a[e+1724+(b*236|0)|0]=3;d=e;f=b;bI(d,f)|0;bJ(e,b);return;}else{a[e+1724+(b*236|0)|0]=3;return;}}function cj(a,b){a=a|0;b=b|0;var e=0,f=0,i=0,j=0,l=0,m=0.0;e=a;a=b;b=(c[e+1724+(a*236|0)+20>>2]|0)<0|0;f=c[e+1084+((d[e+1724+(a*236|0)+1|0]|0)*40|0)+20>>2]|0;if((c[(c[e+1724+(a*236|0)+4>>2]|0)+12>>2]|0)==0){return;}if((c[e+1724+(a*236|0)+212>>2]|0)!=0){i=32;while(1){j=i;i=j-1|0;if((j|0)==0){break;}c[e+1724+(a*236|0)+80+(i<<2)>>2]=0;}}do{if((f|0)==8192){l=866;}else{if((f|0)<0){l=866;break;}if((f|0)>16383){l=866;break;}f=f-8192|0;if(+g[e+1084+((d[e+1724+(a*236|0)+1|0]|0)*40|0)+36>>2]==0.0){i=_(f,c[e+1084+((d[e+1724+(a*236|0)+1|0]|0)*40|0)+32>>2]|0)|0;if((f|0)<0){i=-i|0;}j=1704+((i>>5&255)<<3)|0;m=(c[k>>2]=d[j]|d[j+1|0]<<8|d[j+2|0]<<16|d[j+3|0]<<24,c[k+4>>2]=d[j+4|0]|d[j+5|0]<<8|d[j+6|0]<<16|d[j+7|0]<<24,+h[k>>3]);j=3752+(i>>13<<3)|0;g[e+1084+((d[e+1724+(a*236|0)+1|0]|0)*40|0)+36>>2]=m*(c[k>>2]=d[j]|d[j+1|0]<<8|d[j+2|0]<<16|d[j+3|0]<<24,c[k+4>>2]=d[j+4|0]|d[j+5|0]<<8|d[j+6|0]<<16|d[j+7|0]<<24,+h[k>>3]);}if((f|0)>0){c[e+1724+(a*236|0)+12>>2]=~~(+g[e+1084+((d[e+1724+(a*236|0)+1|0]|0)*40|0)+36>>2]*+(c[e+1724+(a*236|0)+8>>2]|0));}else{c[e+1724+(a*236|0)+12>>2]=~~(+(c[e+1724+(a*236|0)+8>>2]|0)/+g[e+1084+((d[e+1724+(a*236|0)+1|0]|0)*40|0)+36>>2]);}}}while(0);if((l|0)==866){c[e+1724+(a*236|0)+12>>2]=c[e+1724+(a*236|0)+8>>2];}m=+(c[(c[e+1724+(a*236|0)+4>>2]|0)+12>>2]|0)*+(c[e+1724+(a*236|0)+12>>2]|0)/(+(c[(c[e+1724+(a*236|0)+4>>2]|0)+32>>2]|0)*+(c[e+4>>2]|0))*4096.0;if((b|0)!=0){m=-0.0-m;}c[e+1724+(a*236|0)+20>>2]=~~m;return;}function ck(a){a=a|0;var b=0;b=a;a=0;while(1){if((a|0)>=16){break;}cb(b,a);c[b+1084+(a*40|0)+4>>2]=c[b+1056>>2];c[b+1084+(a*40|0)+16>>2]=-1;c[b+1084+(a*40|0)+32>>2]=2;c[b+1084+(a*40|0)>>2]=0;a=a+1|0;}cm(b);return;}function cl(a,b){a=a|0;b=b|0;var e=0,f=0;e=a;a=b;cm(e);L1123:while(1){if(+(c[c[e+13080>>2]>>2]|0)/+g[258]>=+(a|0)){break;}switch(d[(c[e+13080>>2]|0)+5|0]|0|0){case 7:{c[e+1084+((d[(c[e+13080>>2]|0)+4|0]|0)*40|0)+24>>2]=d[(c[e+13080>>2]|0)+6|0]|0;break;}case 13:{cb(e,d[(c[e+13080>>2]|0)+4|0]|0);break;}case 4:{c[e+1084+((d[(c[e+13080>>2]|0)+4|0]|0)*40|0)+8>>2]=d[(c[e+13080>>2]|0)+6|0]|0;break;}case 11:{c[e+1084+((d[(c[e+13080>>2]|0)+4|0]|0)*40|0)+32>>2]=d[(c[e+13080>>2]|0)+6|0]|0;g[e+1084+((d[(c[e+13080>>2]|0)+4|0]|0)*40|0)+36>>2]=0.0;break;}case 99:{f=902;break L1123;break;}case 9:{if((c[e+13056>>2]&1<<(d[(c[e+13080>>2]|0)+4|0]|0)|0)!=0){c[e+1084+((d[(c[e+13080>>2]|0)+4|0]|0)*40|0)>>2]=d[(c[e+13080>>2]|0)+6|0]|0;}else{c[e+1084+((d[(c[e+13080>>2]|0)+4|0]|0)*40|0)+4>>2]=d[(c[e+13080>>2]|0)+6|0]|0;}break;}case 8:{c[e+1084+((d[(c[e+13080>>2]|0)+4|0]|0)*40|0)+20>>2]=(d[(c[e+13080>>2]|0)+6|0]|0)+((d[(c[e+13080>>2]|0)+7|0]|0)<<7);g[e+1084+((d[(c[e+13080>>2]|0)+4|0]|0)*40|0)+36>>2]=0.0;break;}case 15:{c[e+1084+((d[(c[e+13080>>2]|0)+4|0]|0)*40|0)>>2]=d[(c[e+13080>>2]|0)+6|0]|0;break;}case 10:{c[392]=(d[(c[e+13080>>2]|0)+4|0]|0)+((d[(c[e+13080>>2]|0)+7|0]|0)<<8)+((d[(c[e+13080>>2]|0)+6|0]|0)<<16);break;}case 5:{c[e+1084+((d[(c[e+13080>>2]|0)+4|0]|0)*40|0)+16>>2]=d[(c[e+13080>>2]|0)+6|0]|0;break;}case 6:{c[e+1084+((d[(c[e+13080>>2]|0)+4|0]|0)*40|0)+12>>2]=d[(c[e+13080>>2]|0)+6|0]|0;break;}default:{}}b=e+13080|0;c[b>>2]=(c[b>>2]|0)+8;}if((f|0)==902){c[e+13088>>2]=~~(+(c[c[e+13080>>2]>>2]|0)/+g[258]);return;}if((c[e+13080>>2]|0)!=(c[e+13076>>2]|0)){f=e+13080|0;c[f>>2]=(c[f>>2]|0)-8;}c[e+13088>>2]=a;return;}function cm(b){b=b|0;var c=0;c=b;b=0;while(1){if((b|0)>=48){break;}a[c+1724+(b*236|0)|0]=0;b=b+1|0;}return;}function cn(b,e,f){b=b|0;e=e|0;f=f|0;var h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0;h=b;b=e;e=f;if((c[h+13056>>2]&1<>2]<<2)>>2]|0)+4+(d[b+6|0]<<2)>>2]|0;i=f;do{if((f|0)==0){j=c[(c[h+540>>2]|0)+4+(d[b+6|0]<<2)>>2]|0;i=j;if((j|0)!=0){break;}return;}}while(0);(c[i>>2]|0)!=1;if((a[(c[i+4>>2]|0)+112|0]|0)!=0){f=1056+(a[(c[i+4>>2]|0)+112|0]<<2)|0;c[h+1724+(e*236|0)+8>>2]=d[f]|d[f+1|0]<<8|d[f+2|0]<<16|d[f+3|0]<<24;}else{f=1056+((a[b+6|0]&127)<<2)|0;c[h+1724+(e*236|0)+8>>2]=d[f]|d[f+1|0]<<8|d[f+2|0]<<16|d[f+3|0]<<24;}c[h+1724+(e*236|0)+4>>2]=c[i+4>>2];}else{if(-1!=(c[1640+(d[b+4|0]<<2)>>2]|0)){f=c[h+28+(c[h+1084+((d[b+4|0]|0)*40|0)>>2]<<2)>>2]|0;j=c[1640+(d[b+4|0]<<2)>>2]|0;if(0==(c[f+4+(j<<2)>>2]|0)){k=0;l=h;m=c[(c[f>>2]|0)+(j*28|0)>>2]|0;n=(k|0)!=0?1:0;o=c[(c[f>>2]|0)+(j*28|0)+12>>2]|0;p=c[(c[f>>2]|0)+(j*28|0)+8>>2]|0;if((c[(c[f>>2]|0)+(j*28|0)+4>>2]|0)!=-1){q=c[(c[f>>2]|0)+(j*28|0)+4>>2]|0;}else{if((k|0)!=0){r=j;}else{r=-1;}q=r;}if((c[(c[f>>2]|0)+(j*28|0)+16>>2]|0)!=-1){s=c[(c[f>>2]|0)+(j*28|0)+16>>2]|0;}else{s=(k|0)!=0?1:-1;}if((c[(c[f>>2]|0)+(j*28|0)+20>>2]|0)!=-1){t=c[(c[f>>2]|0)+(j*28|0)+20>>2]|0;}else{t=(k|0)!=0?1:-1;}c[f+4+(j<<2)>>2]=bl(l,m,n,o,p,q,s,t,c[(c[f>>2]|0)+(j*28|0)+24>>2]|0)|0;}i=c[f+4+(j<<2)>>2]|0;}else{if((c[h+1084+((d[b+4|0]|0)*40|0)+4>>2]|0)==-1){i=c[h+1052>>2]|0;}else{j=c[(c[h+28+(c[h+1084+((d[b+4|0]|0)*40|0)>>2]<<2)>>2]|0)+4+(c[h+1084+((d[b+4|0]|0)*40|0)+4>>2]<<2)>>2]|0;i=j;do{if((j|0)==0){f=c[(c[h+28>>2]|0)+4+(c[h+1084+((d[b+4|0]|0)*40|0)+4>>2]<<2)>>2]|0;i=f;if((f|0)!=0){break;}return;}}while(0);}}if((a[(c[i+4>>2]|0)+112|0]|0)!=0){j=1056+(a[(c[i+4>>2]|0)+112|0]<<2)|0;c[h+1724+(e*236|0)+8>>2]=d[j]|d[j+1|0]<<8|d[j+2|0]<<16|d[j+3|0]<<24;}else{j=1056+(((d[b+6|0]|0)+(c[1662]|0)&127)<<2)|0;c[h+1724+(e*236|0)+8>>2]=d[j]|d[j+1|0]<<8|d[j+2|0]<<16|d[j+3|0]<<24;}c[h+1724+(e*236|0)+8>>2]=~~(+(c[h+1724+(e*236|0)+8>>2]|0)*+g[260]/440.0);co(h,e,i,d[b+7|0]|0);}a[h+1724+(e*236|0)|0]=1;a[h+1724+(e*236|0)+1|0]=a[b+4|0]|0;a[h+1724+(e*236|0)+2|0]=a[b+6|0]|0;a[h+1724+(e*236|0)+3|0]=cp(a[b+7|0]|0,+g[1576+(d[b+4|0]<<2)>>2])|0;c[h+1724+(e*236|0)+16>>2]=0;c[h+1724+(e*236|0)+20>>2]=0;c[h+1724+(e*236|0)+44>>2]=0;c[h+1724+(e*236|0)+48>>2]=c[(c[h+1724+(e*236|0)+4>>2]|0)+96>>2];c[h+1724+(e*236|0)+36>>2]=c[(c[h+1724+(e*236|0)+4>>2]|0)+92>>2];c[h+1724+(e*236|0)+40>>2]=0;c[h+1724+(e*236|0)+52>>2]=c[(c[h+1724+(e*236|0)+4>>2]|0)+100>>2];c[h+1724+(e*236|0)+56>>2]=0;c[h+1724+(e*236|0)+212>>2]=c[(c[h+1724+(e*236|0)+4>>2]|0)+104>>2];c[h+1724+(e*236|0)+208>>2]=0;c[h+1724+(e*236|0)+216>>2]=0;i=0;while(1){if((i|0)>=32){break;}c[h+1724+(e*236|0)+80+(i<<2)>>2]=0;i=i+1|0;}if((c[h+1084+((d[b+4|0]|0)*40|0)+16>>2]|0)!=-1){c[h+1724+(e*236|0)+228>>2]=c[h+1084+((d[b+4|0]|0)*40|0)+16>>2];}else{c[h+1724+(e*236|0)+228>>2]=a[(c[h+1724+(e*236|0)+4>>2]|0)+111|0]|0;}cj(h,e);cf(h,e);if((a[(c[h+1724+(e*236|0)+4>>2]|0)+110|0]&64|0)!=0){c[h+1724+(e*236|0)+220>>2]=0;c[h+1724+(e*236|0)+24>>2]=0;c[h+1724+(e*236|0)+224>>2]=0;b=h;i=e;bI(b,i)|0;bJ(h,e);return;}else{c[h+1724+(e*236|0)+32>>2]=0;bJ(h,e);return;}}function co(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0;f=a;a=b;b=d;d=e;e=c[b>>2]|0;g=c[b+4>>2]|0;if((e|0)==1){c[f+1724+(a*236|0)+4>>2]=g;return;}h=c[f+1724+(a*236|0)+8>>2]|0;i=0;L1232:while(1){if((i|0)>=(e|0)){break;}do{if((c[g+16>>2]|0)<=(d|0)){if((c[g+20>>2]|0)<(d|0)){break;}if((c[g+24>>2]|0)>(h|0)){break;}if((c[g+28>>2]|0)>=(h|0)){j=977;break L1232;}}}while(0);g=g+116|0;i=i+1|0;}if((j|0)==977){c[f+1724+(a*236|0)+4>>2]=g;return;}j=2147483647;d=c[b+4>>2]|0;g=d;b=d;i=0;while(1){if((i|0)>=(e|0)){break;}d=(c[g+32>>2]|0)-h|0;if((d|0)<0){d=-d|0;}if((d|0)<(j|0)){j=d;b=g;}g=g+116|0;i=i+1|0;}c[f+1724+(a*236|0)+4>>2]=b;return;}function cp(a,b){a=a|0;b=+b;var d=0,e=0,f=0.0,g=0,h=0,j=0,k=0;d=i;e=a;f=b;if(f<=1.0){g=~~(+(e&255|0)*f);h=g;i=d;return h|0;}else{a=(e&255)+(~~(+(127-(e&255)|0)*(f-1.0))&255)&255;j=e&255;e=a&255;aG(4784,(k=i,i=i+16|0,c[k>>2]=j,c[k+8>>2]=e,k)|0)|0;i=k;g=a;h=g;i=d;return h|0;}return 0;}function cq(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;h=i;i=i+40|0;j=h|0;k=h+8|0;l=h+16|0;m=h+24|0;n=h+32|0;o=d;d=e;e=f;f=g;c[d+13092>>2]=0;c[d+13096>>2]=0;c[d+13084>>2]=0;do{if((cP(o,n|0,1,4)|0)==4){if((cP(o,j,4,1)|0)!=1){break;}c[j>>2]=(c[j>>2]&255)<<24|(c[j>>2]&65280)<<8|(c[j>>2]&16711680)>>8|c[j>>2]>>24&255;do{if((c4(n|0,4776,4)|0)==0){if((c[j>>2]|0)<6){break;}g=o;p=k;cP(g,p,2,1)|0;p=o;g=l;cP(p,g,2,1)|0;g=o;p=m;cP(g,p,2,1)|0;b[k>>1]=((b[k>>1]&255)<<8|b[k>>1]>>8&255)&65535;b[l>>1]=((b[l>>1]&255)<<8|b[l>>1]>>8&255)&65535;b[m>>1]=((b[m>>1]&255)<<8|b[m>>1]>>8&255)&65535;if((b[m>>1]|0)<0){q=_(-((b[m>>1]|0)/256|0)|0,b[m>>1]&255)|0;}else{q=b[m>>1]|0;}if((c[j>>2]|0)>6){cQ(o,(c[j>>2]|0)-6|0);}do{if((b[k>>1]|0)>=0){if((b[k>>1]|0)>2){break;}c[d+13084>>2]=bi(12)|0;c[c[d+13084>>2]>>2]=0;a[(c[d+13084>>2]|0)+5|0]=0;c[(c[d+13084>>2]|0)+8>>2]=0;p=d+13092|0;c[p>>2]=(c[p>>2]|0)+1;p=b[k>>1]|0;do{if((p|0)==1){r=0;while(1){if((r|0)>=(b[l>>1]|0)){s=1023;break;}if((cr(o,d,0)|0)!=0){break;}r=r+1|0;}if((s|0)==1023){break;}cs(d);t=0;u=t;i=h;return u|0;}else if((p|0)==2){r=0;while(1){if((r|0)>=(b[l>>1]|0)){s=1030;break;}if((cr(o,d,1)|0)!=0){break;}r=r+1|0;}if((s|0)==1030){break;}cs(d);t=0;u=t;i=h;return u|0;}else if((p|0)==0){if((cr(o,d,0)|0)==0){break;}cs(d);t=0;u=t;i=h;return u|0;}}while(0);t=ct(d,q,e,f)|0;u=t;i=h;return u|0;}}while(0);t=0;u=t;i=h;return u|0;}}while(0);t=0;u=t;i=h;return u|0;}}while(0);t=0;u=t;i=h;return u|0;}function cr(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0;e=i;i=i+16|0;f=e|0;g=e+8|0;h=a;a=b;b=c[a+13084>>2]|0;do{if((d|0)!=0){if((b|0)==0){j=1047;break;}while(1){if((c[b+8>>2]|0)==0){break;}b=c[b+8>>2]|0;}c[a+13096>>2]=c[b>>2];}else{j=1047;}}while(0);if((j|0)==1047){c[a+13096>>2]=0;}do{if((cP(h,g|0,1,4)|0)==4){if((cP(h,f,4,1)|0)!=1){break;}c[f>>2]=(c[f>>2]&255)<<24|(c[f>>2]&65280)<<8|(c[f>>2]&16711680)>>8|c[f>>2]>>24&255;if((c4(g|0,6272,4)|0)!=0){k=-2;l=k;i=e;return l|0;}while(1){d=cv(h,a)|0;m=d;if((d|0)==0){j=1055;break;}if((m|0)==-1){j=1057;break;}d=c[b+8>>2]|0;while(1){if((d|0)!=0){n=(c[d>>2]|0)<(c[m>>2]|0);}else{n=0;}if(!n){break;}b=d;d=c[b+8>>2]|0;}c[m+8>>2]=d;c[b+8>>2]=m;o=a+13092|0;c[o>>2]=(c[o>>2]|0)+1;b=m;}if((j|0)==1055){k=-2;l=k;i=e;return l|0;}else if((j|0)==1057){k=0;l=k;i=e;return l|0;}}}while(0);k=-1;l=k;i=e;return l|0;}function cs(a){a=a|0;var b=0,d=0;b=a;a=c[b+13084>>2]|0;d=a;if((a|0)==0){return;}while(1){if((d|0)==0){break;}a=c[d+8>>2]|0;c0(d);d=a;}c[b+13084>>2]=0;return;}function ct(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;h=i;i=i+192|0;j=h|0;k=h+64|0;l=h+128|0;m=b;b=e;e=f;f=g;g=0;while(1){if((g|0)>=16){break;}c[j+(g<<2)>>2]=0;c[k+(g<<2)>>2]=0;c[l+(g<<2)>>2]=c[m+1056>>2];g=g+1|0;}n=5e5;cu(m,n,b);o=bi((c[m+13092>>2]|0)+1<<3)|0;p=o;q=o;o=c[m+13084>>2]|0;r=0;s=0;t=0;u=0;v=0;g=0;while(1){if((g|0)>=(c[m+13092>>2]|0)){break;}w=0;x=d[o+5|0]|0;do{if((x|0)==9){if((c[m+13056>>2]&1<<(d[o+4|0]|0)|0)!=0){if((c[m+540+((d[o+6|0]|0)<<2)>>2]|0)!=0){y=d[o+6|0]|0;}else{a[o+6|0]=0;y=0;}if((c[k+((d[o+4|0]|0)<<2)>>2]|0)!=(y|0)){c[k+((d[o+4|0]|0)<<2)>>2]=y;}else{w=1;}}else{y=d[o+6|0]|0;do{if((c[l+((d[o+4|0]|0)<<2)>>2]|0)!=-1){if((c[l+((d[o+4|0]|0)<<2)>>2]|0)==(y|0)){z=1096;break;}c[l+((d[o+4|0]|0)<<2)>>2]=y;}else{z=1096;}}while(0);if((z|0)==1096){z=0;w=1;}}}else if((x|0)==15){if((c[m+13056>>2]&1<<(d[o+4|0]|0)|0)!=0){w=1;break;}if((c[m+28+((d[o+6|0]|0)<<2)>>2]|0)!=0){y=d[o+6|0]|0;}else{a[o+6|0]=0;y=0;}if((c[j+((d[o+4|0]|0)<<2)>>2]|0)!=(y|0)){c[j+((d[o+4|0]|0)<<2)>>2]=y;}else{w=1;}}else if((x|0)==1){if((v|0)!=0){v=1;}if((c[m+13056>>2]&1<<(d[o+4|0]|0)|0)!=0){if((c[(c[m+540+(c[k+((d[o+4|0]|0)<<2)>>2]<<2)>>2]|0)+4+((d[o+6|0]|0)<<2)>>2]|0)==0){c[(c[m+540+(c[k+((d[o+4|0]|0)<<2)>>2]<<2)>>2]|0)+4+((d[o+6|0]|0)<<2)>>2]=-1;}}else{if((c[l+((d[o+4|0]|0)<<2)>>2]|0)==-1){break;}if((c[(c[m+28+(c[j+((d[o+4|0]|0)<<2)>>2]<<2)>>2]|0)+4+(c[l+((d[o+4|0]|0)<<2)>>2]<<2)>>2]|0)==0){c[(c[m+28+(c[j+((d[o+4|0]|0)<<2)>>2]<<2)>>2]|0)+4+(c[l+((d[o+4|0]|0)<<2)>>2]<<2)>>2]=-1;}}}}while(0);x=(c[o>>2]|0)-t|0;A=x;do{if((x|0)!=0){if((v|0)!=0){z=1125;break;}B=_(c[m+1076>>2]|0,A)|0;s=s+(_(c[m+1080>>2]|0,A)|0)|0;if((s&-65536|0)!=0){B=B+(s>>16&65535)|0;s=s&65535;}u=u+B|0;}else{z=1125;}}while(0);if((z|0)==1125){z=0;if((v|0)==1){v=0;}}if((d[o+5|0]|0|0)==10){n=(d[o+4|0]|0)+((d[o+7|0]|0)<<8)+((d[o+6|0]|0)<<16)|0;cu(m,n,b);}if((w|0)==0){A=p;x=o|0;c[A>>2]=c[x>>2];c[A+4>>2]=c[x+4>>2];c[p>>2]=u;p=p+8|0;r=r+1|0;}t=c[o>>2]|0;o=c[o+8>>2]|0;g=g+1|0;}c[p>>2]=u;a[p+5|0]=99;r=r+1|0;cs(m);c[e>>2]=r;c[f>>2]=u;i=h;return q|0;}function cu(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0.0;e=a;f=+(b|0)*+(c[e+4>>2]|0)*0.065536/+(d|0);c[e+1080>>2]=~~f&65535;c[e+1076>>2]=~~f>>16;return;}function cv(b,e){b=b|0;e=e|0;var f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0;f=i;i=i+40|0;g=f|0;h=f+8|0;j=f+16|0;k=f+24|0;l=f+32|0;m=b;b=e;L1442:while(1){e=cw(m)|0;n=b+13096|0;c[n>>2]=(c[n>>2]|0)+e;if((cP(m,g,1,1)|0)!=1){o=1138;break;}do{if((d[g]|0)==240){o=1141;}else{if((d[g]|0)==247){o=1141;break;}if((d[g]|0)==255){e=m;cP(e,h,1,1)|0;p=cw(m)|0;do{if((d[h]|0)>0){if((d[h]|0)>=16){o=1146;break;}e=m;n=p;q=a[h]|0;r=b;cx(e,n,q,r)|0;}else{o=1146;}}while(0);if((o|0)==1146){o=0;r=d[h]|0;if((r|0)==47){o=1147;break L1442;}else if((r|0)==81){o=1148;break L1442;}cQ(m,p);}}else{a[j]=a[g]|0;if((a[j]&128|0)!=0){a[6632]=d[j]&15;a[6624]=d[j]>>4&7;r=m;cP(r,j,1,1)|0;a[j]=d[j]&127;}switch(d[6624]|0){case 1:{o=1156;break L1442;break;}case 6:{o=1188;break L1442;break;}case 4:{o=1186;break L1442;break;}case 5:{break;}case 0:{o=1155;break L1442;break;}case 2:{o=1157;break L1442;break;}case 3:{cP(m,k,1,1)|0;a[k]=d[k]&127;s=255;L1466:do{switch(d[j]|0){case 98:{a[6616]=1;a[6600+(d[6632]|0)|0]=a[k]|0;break;}case 6:{if((a[6616]|0)!=0){break L1466;}r=d[6584+(d[6632]|0)|0]<<8|d[6600+(d[6632]|0)|0];if((r|0)==0){s=11;}else if((r|0)==32639){o=1179;break L1442;}break;}case 7:{s=4;break;}case 10:{s=5;break;}case 11:{s=7;break;}case 64:{s=6;break;}case 120:{s=12;break;}case 121:{s=13;break;}case 123:{s=14;break;}case 0:{s=15;break;}case 32:{if((d[k]|0)==0){s=15;}break;}case 100:{a[6616]=0;a[6584+(d[6632]|0)|0]=a[k]|0;break;}case 101:{a[6616]=0;a[6600+(d[6632]|0)|0]=a[k]|0;break;}case 99:{a[6616]=1;a[6584+(d[6632]|0)|0]=a[k]|0;break;}default:{}}}while(0);if((s|0)!=255){o=1184;break L1442;}break;}default:{}}}}}while(0);if((o|0)==1141){o=0;p=cw(m)|0;cQ(m,p);}}if((o|0)==1184){t=bi(12)|0;c[t>>2]=c[b+13096>>2];a[t+5|0]=s&255;a[t+4|0]=a[6632]|0;a[t+6|0]=a[k]|0;a[t+7|0]=0;c[t+8>>2]=0;u=t;v=u;i=f;return v|0;}else if((o|0)==1156){cP(m,k,1,1)|0;a[k]=d[k]&127;t=bi(12)|0;c[t>>2]=c[b+13096>>2];a[t+5|0]=1;a[t+4|0]=a[6632]|0;a[t+6|0]=a[j]|0;a[t+7|0]=a[k]|0;c[t+8>>2]=0;u=t;v=u;i=f;return v|0;}else if((o|0)==1179){t=bi(12)|0;c[t>>2]=c[b+13096>>2];a[t+5|0]=11;a[t+4|0]=a[6632]|0;a[t+6|0]=2;a[t+7|0]=0;c[t+8>>2]=0;u=t;v=u;i=f;return v|0;}else if((o|0)==1138){u=0;v=u;i=f;return v|0;}else if((o|0)==1188){cP(m,k,1,1)|0;a[k]=d[k]&127;t=bi(12)|0;c[t>>2]=c[b+13096>>2];a[t+5|0]=8;a[t+4|0]=a[6632]|0;a[t+6|0]=a[j]|0;a[t+7|0]=a[k]|0;c[t+8>>2]=0;u=t;v=u;i=f;return v|0;}else if((o|0)==1186){a[j]=d[j]&127;t=bi(12)|0;c[t>>2]=c[b+13096>>2];a[t+5|0]=9;a[t+4|0]=a[6632]|0;a[t+6|0]=a[j]|0;a[t+7|0]=0;c[t+8>>2]=0;u=t;v=u;i=f;return v|0;}else if((o|0)==1147){u=-1;v=u;i=f;return v|0;}else if((o|0)==1148){cP(m,j,1,1)|0;cP(m,k,1,1)|0;cP(m,l,1,1)|0;t=bi(12)|0;c[t>>2]=c[b+13096>>2];a[t+5|0]=10;a[t+4|0]=a[l]|0;a[t+6|0]=a[j]|0;a[t+7|0]=a[k]|0;c[t+8>>2]=0;u=t;v=u;i=f;return v|0;}else if((o|0)==1155){cP(m,k,1,1)|0;a[k]=d[k]&127;t=bi(12)|0;c[t>>2]=c[b+13096>>2];a[t+5|0]=2;a[t+4|0]=a[6632]|0;a[t+6|0]=a[j]|0;a[t+7|0]=a[k]|0;c[t+8>>2]=0;u=t;v=u;i=f;return v|0;}else if((o|0)==1157){cP(m,k,1,1)|0;a[k]=d[k]&127;t=bi(12)|0;c[t>>2]=c[b+13096>>2];a[t+5|0]=3;a[t+4|0]=a[6632]|0;a[t+6|0]=a[j]|0;a[t+7|0]=a[k]|0;c[t+8>>2]=0;u=t;v=u;i=f;return v|0;}return 0;}function cw(b){b=b|0;var c=0,d=0,e=0;c=i;i=i+8|0;d=c|0;e=b;b=0;while(1){cP(e,d,1,1)|0;b=b+(a[d]&127)|0;if((a[d]&128|0)==0){break;}b=b<<7;}i=c;return b|0;}function cx(b,e,f,g){b=b|0;e=e|0;f=f|0;g=g|0;var h=0,i=0,j=0,k=0;h=e;e=f;f=g;g=bi(h+1|0)|0;if((h|0)!=(cP(b,g,1,h)|0)){c0(g);i=-1;j=i;return j|0;}a[g+h|0]=0;while(1){b=h;h=b-1|0;if((b|0)==0){break;}if((d[g+h|0]|0|0)<32){a[g+h|0]=46;}}h=e&255;if((h|0)==1){k=0;}else if((h|0)==2){k=1;}else{c0(g);g=0;}if((g|0)!=0){if((c[f+13104+(k<<2)>>2]|0)!=0){c0(c[f+13104+(k<<2)>>2]|0);}c[f+13104+(k<<2)>>2]=g;}i=0;j=i;return j|0;}function cy(b,e,f){b=b|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0;g=b;b=e;e=f;f=g+1724+(b*236|0)|0;if((c[(c[f+4>>2]|0)+12>>2]|0)==0){h=c[f+16>>2]>>12;if((c[e>>2]|0)>=((c[(c[f+4>>2]|0)+8>>2]>>12)-h|0)){a[f|0]=0;c[e>>2]=(c[(c[f+4>>2]|0)+8>>2]>>12)-h;}else{i=f+16|0;c[i>>2]=(c[i>>2]|0)+(c[e>>2]<<12);}j=(c[(c[f+4>>2]|0)+88>>2]|0)+(h<<1)|0;k=j;return k|0;}h=a[(c[f+4>>2]|0)+110|0]|0;if((c[f+212>>2]|0)!=0){L1575:do{if((h&4|0)!=0){do{if((h&64|0)==0){if((d[f|0]|0|0)==1){break;}if((d[f|0]|0|0)!=2){break L1575;}}}while(0);if((h&8|0)!=0){j=cz(g,f,c[e>>2]|0)|0;k=j;return k|0;}else{j=cA(g,f,c[e>>2]|0)|0;k=j;return k|0;}}}while(0);j=cB(g,b,e)|0;k=j;return k|0;}else{L1561:do{if((h&4|0)!=0){do{if((h&64|0)==0){if((d[f|0]|0|0)==1){break;}if((d[f|0]|0|0)!=2){break L1561;}}}while(0);if((h&8|0)!=0){j=cC(g,f,c[e>>2]|0)|0;k=j;return k|0;}else{j=cD(g,f,c[e>>2]|0)|0;k=j;return k|0;}}}while(0);j=cE(g,b,e)|0;k=j;return k|0;}return 0;}function cz(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;f=a;a=d;d=e;e=c[a+16>>2]|0;g=c[a+20>>2]|0;h=c[(c[a+4>>2]|0)+4>>2]|0;i=c[c[a+4>>2]>>2]|0;j=c[f+1068>>2]|0;k=c[(c[a+4>>2]|0)+88>>2]|0;l=c[a+216>>2]|0;m=h<<1;n=i<<1;o=0;while(1){if((d|0)!=0){p=(e|0)<=(i|0);}else{p=0;}if(!p){break;}q=((i-e|0)/(g|0)|0)+1|0;if((q|0)>(d|0)){q=d;}if((q|0)>(l|0)){q=l;o=1;}else{l=l-q|0;}d=d-q|0;while(1){r=q;q=r-1|0;if((r|0)==0){break;}s=b[k+(e>>12<<1)>>1]|0;t=b[k+((e>>12)+1<<1)>>1]|0;r=j;j=r+2|0;b[r>>1]=(s<<16>>16)+((_((t<<16>>16)-(s<<16>>16)|0,e&4095)|0)>>>12)&65535;e=e+g|0;}if((o|0)!=0){l=c[a+212>>2]|0;g=cG(f,a,0)|0;o=0;}}while(1){if((d|0)==0){break;}if((g|0)>0){u=h;}else{u=i;}q=((u-e|0)/(g|0)|0)+1|0;if((q|0)>(d|0)){q=d;}if((q|0)>(l|0)){q=l;o=1;}else{l=l-q|0;}d=d-q|0;while(1){p=q;q=p-1|0;if((p|0)==0){break;}s=b[k+(e>>12<<1)>>1]|0;t=b[k+((e>>12)+1<<1)>>1]|0;p=j;j=p+2|0;b[p>>1]=(s<<16>>16)+((_((t<<16>>16)-(s<<16>>16)|0,e&4095)|0)>>>12)&65535;e=e+g|0;}if((o|0)!=0){l=c[a+212>>2]|0;g=cG(f,a,(g|0)<0|0)|0;o=0;}if((e|0)>=(h|0)){e=m-e|0;g=g*-1|0;}else{if((e|0)<=(i|0)){e=n-e|0;g=g*-1|0;}}}c[a+216>>2]=l;c[a+20>>2]=g;c[a+16>>2]=e;return c[f+1068>>2]|0;}function cA(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0;f=a;a=d;d=e;e=c[a+16>>2]|0;g=c[a+20>>2]|0;h=c[(c[a+4>>2]|0)+4>>2]|0;i=h-(c[c[a+4>>2]>>2]|0)|0;j=c[f+1068>>2]|0;k=c[(c[a+4>>2]|0)+88>>2]|0;l=c[a+216>>2]|0;m=0;while(1){if((d|0)==0){break;}if((e|0)>=(h|0)){e=e-i|0;}n=((h-e|0)/(g|0)|0)+1|0;if((n|0)>(d|0)){n=d;}if((n|0)>(l|0)){n=l;m=1;}else{l=l-n|0;}d=d-n|0;while(1){o=n;n=o-1|0;if((o|0)==0){break;}o=b[k+(e>>12<<1)>>1]|0;p=j;j=p+2|0;b[p>>1]=(o<<16>>16)+((_((b[k+((e>>12)+1<<1)>>1]|0)-(o<<16>>16)|0,e&4095)|0)>>>12)&65535;e=e+g|0;}if((m|0)!=0){l=c[a+212>>2]|0;g=cG(f,a,0)|0;m=0;}}c[a+216>>2]=l;c[a+20>>2]=g;c[a+16>>2]=e;return c[f+1068>>2]|0;}function cB(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0;g=d;d=f;f=g+1724+(e*236|0)|0;e=c[g+1068>>2]|0;h=c[(c[f+4>>2]|0)+88>>2]|0;i=c[(c[f+4>>2]|0)+8>>2]|0;j=c[f+16>>2]|0;k=c[f+20>>2]|0;l=c[d>>2]|0;m=c[f+216>>2]|0;if((k|0)<0){k=-k|0;}do{n=l;l=n-1|0;if((n|0)==0){o=1322;break;}n=m;m=n-1|0;if((n|0)==0){m=c[f+212>>2]|0;k=cG(g,f,0)|0;}n=b[h+(j>>12<<1)>>1]|0;p=e;e=p+2|0;b[p>>1]=(n<<16>>16)+((_((b[h+((j>>12)+1<<1)>>1]|0)-(n<<16>>16)|0,j&4095)|0)>>>12)&65535;j=j+k|0;}while((j|0)<(i|0));if((o|0)==1322){q=m;r=f;s=r+216|0;c[s>>2]=q;t=k;u=f;v=u+20|0;c[v>>2]=t;w=j;x=f;y=x+16|0;c[y>>2]=w;z=g;A=z+1068|0;B=c[A>>2]|0;return B|0;}if((j|0)==(i|0)){i=e;e=i+2|0;b[i>>1]=b[h+(j>>12<<1)>>1]|0;}a[f|0]=0;h=d;c[h>>2]=(c[h>>2]|0)-(l+1);q=m;r=f;s=r+216|0;c[s>>2]=q;t=k;u=f;v=u+20|0;c[v>>2]=t;w=j;x=f;y=x+16|0;c[y>>2]=w;z=g;A=z+1068|0;B=c[A>>2]|0;return B|0;}function cC(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0;f=a;a=d;d=e;e=c[a+16>>2]|0;g=c[a+20>>2]|0;h=c[(c[a+4>>2]|0)+4>>2]|0;i=c[c[a+4>>2]>>2]|0;j=c[f+1068>>2]|0;k=c[(c[a+4>>2]|0)+88>>2]|0;l=h<<1;m=i<<1;if((e|0)<=(i|0)){n=((i-e|0)/(g|0)|0)+1|0;if((n|0)>(d|0)){n=d;d=0;}else{d=d-n|0;}while(1){o=n;n=o-1|0;if((o|0)==0){break;}p=b[k+(e>>12<<1)>>1]|0;q=b[k+((e>>12)+1<<1)>>1]|0;o=j;j=o+2|0;b[o>>1]=(p<<16>>16)+((_((q<<16>>16)-(p<<16>>16)|0,e&4095)|0)>>>12)&65535;e=e+g|0;}}while(1){if((d|0)==0){break;}if((g|0)>0){r=h;}else{r=i;}n=((r-e|0)/(g|0)|0)+1|0;if((n|0)>(d|0)){n=d;d=0;}else{d=d-n|0;}while(1){o=n;n=o-1|0;if((o|0)==0){break;}p=b[k+(e>>12<<1)>>1]|0;q=b[k+((e>>12)+1<<1)>>1]|0;o=j;j=o+2|0;b[o>>1]=(p<<16>>16)+((_((q<<16>>16)-(p<<16>>16)|0,e&4095)|0)>>>12)&65535;e=e+g|0;}if((e|0)>=(h|0)){e=l-e|0;g=g*-1|0;}else{if((e|0)<=(i|0)){e=m-e|0;g=g*-1|0;}}}c[a+20>>2]=g;c[a+16>>2]=e;return c[f+1068>>2]|0;}function cD(a,d,e){a=a|0;d=d|0;e=e|0;var f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0;f=a;a=d;d=e;e=c[a+16>>2]|0;g=c[a+20>>2]|0;h=c[(c[a+4>>2]|0)+4>>2]|0;i=h-(c[c[a+4>>2]>>2]|0)|0;j=c[f+1068>>2]|0;k=c[(c[a+4>>2]|0)+88>>2]|0;while(1){if((d|0)==0){break;}if((e|0)>=(h|0)){e=e-i|0;}l=((h-e|0)/(g|0)|0)+1|0;if((l|0)>(d|0)){l=d;d=0;}else{d=d-l|0;}while(1){m=l;l=m-1|0;if((m|0)==0){break;}m=b[k+(e>>12<<1)>>1]|0;n=j;j=n+2|0;b[n>>1]=(m<<16>>16)+((_((b[k+((e>>12)+1<<1)>>1]|0)-(m<<16>>16)|0,e&4095)|0)>>>12)&65535;e=e+g|0;}}c[a+16>>2]=e;return c[f+1068>>2]|0;}function cE(d,e,f){d=d|0;e=e|0;f=f|0;var g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0;g=d;d=f;f=g+1724+(e*236|0)|0;e=c[g+1068>>2]|0;h=c[(c[f+4>>2]|0)+88>>2]|0;i=c[f+16>>2]|0;j=c[f+20>>2]|0;k=c[(c[f+4>>2]|0)+8>>2]|0;l=c[d>>2]|0;if((j|0)<0){j=-j|0;}m=((k-i|0)/(j|0)|0)+1|0;if((m|0)>(l|0)){m=l;l=0;}else{l=l-m|0;}while(1){n=m;m=n-1|0;if((n|0)==0){break;}n=b[h+(i>>12<<1)>>1]|0;o=e;e=o+2|0;b[o>>1]=(n<<16>>16)+((_((b[h+((i>>12)+1<<1)>>1]|0)-(n<<16>>16)|0,i&4095)|0)>>>12)&65535;i=i+j|0;}if((i|0)<(k|0)){p=i;q=f;r=q+16|0;c[r>>2]=p;s=g;t=s+1068|0;u=c[t>>2]|0;return u|0;}if((i|0)==(k|0)){k=e;e=k+2|0;b[k>>1]=b[h+(i>>12<<1)>>1]|0;}a[f|0]=0;h=d;c[h>>2]=(c[h>>2]|0)-(l+1);p=i;q=f;r=q+16|0;c[r>>2]=p;s=g;t=s+1068|0;u=c[t>>2]|0;return u|0;}function cF(e,f){e=e|0;f=f|0;var g=0,h=0,i=0.0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0.0,u=0,v=0,w=0,x=0,y=0,z=0,A=0.0,B=0.0,C=0.0,D=0,E=0,F=0,G=0,H=0,I=0,J=0.0,K=0.0,L=0.0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0;g=f;f=c[g+88>>2]|0;h=1056+(a[g+112|0]<<2)|0;i=+(c[g+12>>2]|0)*+(d[h]|d[h+1|0]<<8|d[h+2|0]<<16|d[h+3|0]<<24|0)/(+(c[g+32>>2]|0)*+(c[e+4>>2]|0));e=~~(+(c[g+8>>2]|0)/i);h=bi(e>>11)|0;j=h;k=h;h=(e>>12)-1|0;l=((c[g+8>>2]|0)-4096|0)/(h|0)|0;m=l;n=l;l=h-1|0;h=l;if((l|0)!=0){l=k;k=l+2|0;b[l>>1]=b[f>>1]|0;}while(1){l=h-1|0;h=l;if((l|0)==0){break;}l=f+(n>>12<<1)|0;if(l>>>0>f>>>0){o=b[l-2>>1]|0;}else{o=0;}p=o&65535;q=b[l>>1]|0;r=b[l+2>>1]|0;s=b[l+4>>1]|0;t=+((n&4095)>>>0>>>0)*0.000244140625;l=k;k=l+2|0;b[l>>1]=~~(+(q<<16>>16|0)+t/6.0*(+(((p<<16>>16)*-2|0)-((q<<16>>16)*3|0)+((r<<16>>16)*6|0)-(s<<16>>16)|0)+t*(+(((p<<16>>16)-(q<<16>>16<<1)+(r<<16>>16)|0)*3|0|0)+t*+((-(p<<16>>16)|0)+(((q<<16>>16)-(r<<16>>16)|0)*3|0)+(s<<16>>16)|0))));n=n+m|0;}if((n&4095|0)!=0){p=b[f+(n>>12<<1)>>1]|0;q=b[f+((n>>12)+1<<1)>>1]|0;m=k;k=m+2|0;b[m>>1]=(p<<16>>16)+((_((q<<16>>16)-(p<<16>>16)|0,n&4095)|0)>>>12)&65535;u=e;v=g;w=v+8|0;c[w>>2]=u;x=g;y=x|0;z=c[y>>2]|0;A=+(z|0);B=i;C=A/B;D=~~C;E=g;F=E|0;c[F>>2]=D;G=g;H=G+4|0;I=c[H>>2]|0;J=+(I|0);K=i;L=J/K;M=~~L;N=g;O=N+4|0;c[O>>2]=M;P=g;Q=P+88|0;R=c[Q>>2]|0;S=R;c0(S);T=j;U=g;V=U+88|0;c[V>>2]=T;W=g;X=W+12|0;c[X>>2]=0;return;}else{p=k;k=p+2|0;b[p>>1]=b[f+(n>>12<<1)>>1]|0;u=e;v=g;w=v+8|0;c[w>>2]=u;x=g;y=x|0;z=c[y>>2]|0;A=+(z|0);B=i;C=A/B;D=~~C;E=g;F=E|0;c[F>>2]=D;G=g;H=G+4|0;I=c[H>>2]|0;J=+(I|0);K=i;L=J/K;M=~~L;N=g;O=N+4|0;c[O>>2]=M;P=g;Q=P+88|0;R=c[Q>>2]|0;S=R;c0(S);T=j;U=g;V=U+88|0;c[V>>2]=T;W=g;X=W+12|0;c[X>>2]=0;return;}}function cG(a,b,e){a=a|0;b=b|0;e=e|0;var f=0,g=0,i=0,j=0,l=0,m=0.0,n=0.0;f=a;a=b;b=e;e=a+208|0;g=c[e>>2]|0;c[e>>2]=g+1;if((g|0)>=63){c[a+208>>2]=0;}g=cH(c[a+208>>2]|0)|0;if((c[a+80+(g<<2)>>2]|0)!=0){if((b|0)!=0){i=-(c[a+80+(g<<2)>>2]|0)|0;j=i;return j|0;}else{i=c[a+80+(g<<2)>>2]|0;j=i;return j|0;}}e=(d[(c[a+4>>2]|0)+109|0]|0)<<7;if((c[a+52>>2]|0)!=0){l=a+56|0;c[l>>2]=(c[l>>2]|0)+(c[a+52>>2]|0);if((c[a+56>>2]|0)>=65536){c[a+52>>2]=0;}else{e=_(e,c[a+56>>2]|0)|0;e=e>>16;}}m=+(c[(c[a+4>>2]|0)+12>>2]|0)*+(c[a+12>>2]|0)/(+(c[(c[a+4>>2]|0)+32>>2]|0)*+(c[f+4>>2]|0))*4096.0;f=~~(+R(+(+(c[a+208>>2]<<4|0)*0.006135923151542565))*+(e|0)*1.0);if((f|0)<0){f=-f|0;e=1704+((f>>5&255)<<3)|0;n=(c[k>>2]=d[e]|d[e+1|0]<<8|d[e+2|0]<<16|d[e+3|0]<<24,c[k+4>>2]=d[e+4|0]|d[e+5|0]<<8|d[e+6|0]<<16|d[e+7|0]<<24,+h[k>>3]);e=3752+(f>>13<<3)|0;m=m/(n*(c[k>>2]=d[e]|d[e+1|0]<<8|d[e+2|0]<<16|d[e+3|0]<<24,c[k+4>>2]=d[e+4|0]|d[e+5|0]<<8|d[e+6|0]<<16|d[e+7|0]<<24,+h[k>>3]));}else{e=1704+((f>>5&255)<<3)|0;n=(c[k>>2]=d[e]|d[e+1|0]<<8|d[e+2|0]<<16|d[e+3|0]<<24,c[k+4>>2]=d[e+4|0]|d[e+5|0]<<8|d[e+6|0]<<16|d[e+7|0]<<24,+h[k>>3]);e=3752+(f>>13<<3)|0;m=m*n*(c[k>>2]=d[e]|d[e+1|0]<<8|d[e+2|0]<<16|d[e+3|0]<<24,c[k+4>>2]=d[e+4|0]|d[e+5|0]<<8|d[e+6|0]<<16|d[e+7|0]<<24,+h[k>>3]);}if((c[a+52>>2]|0)==0){c[a+80+(g<<2)>>2]=~~m;}if((b|0)!=0){m=-0.0-m;}i=~~m;j=i;return j|0;}function cH(a){a=a|0;var b=0,c=0;b=a;do{if((b|0)<16){c=15-b|0;}else{if((b|0)>=48){c=79-b|0;break;}else{c=b-16|0;break;}}}while(0);return c|0;}function cI(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;return an(b|0,d|0,e|0,c[a>>2]|0)|0;}function cJ(a){a=a|0;var b=0,d=0,e=0;b=a;a=0;if((c[b+4>>2]|0)==0){d=b;c0(d);e=a;return e|0;}a=ao(c[b>>2]|0)|0;d=b;c0(d);e=a;return e|0;}function cK(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0,g=0;f=d;d=a;a=e;e=c[d+4>>2]|0;g=e+(_(a,f)|0)|0;if(g>>>0>(c[d+8>>2]|0)>>>0){a=(((c[d+8>>2]|0)-(c[d+4>>2]|0)|0)>>>0)/(f>>>0)|0;}g=b;b=c[d+4>>2]|0;e=_(a,f)|0;c6(g|0,b|0,e)|0;e=_(a,f)|0;f=d+4|0;c[f>>2]=(c[f>>2]|0)+e;return a|0;}function cL(a){a=a|0;var b=0,d=0;b=a;if((c[b+12>>2]|0)==0){d=b;c0(d);return 0;}c0(c[b>>2]|0);d=b;c0(d);return 0;}function cM(a,b){a=a|0;b=b|0;var d=0,e=0,f=0,g=0;d=bi(12)|0;if((d|0)==0){e=0;f=e;return f|0;}g=bi(8)|0;if((g|0)==0){c0(d);e=0;f=e;return f|0;}else{c[g>>2]=a;c[g+4>>2]=b;c[d+8>>2]=g;c[d>>2]=2;c[d+4>>2]=4;e=d;f=e;return f|0;}return 0;}function cN(a){a=a|0;var b=0,c=0,d=0;b=av(a|0,6544)|0;if((b|0)==0){c=0;d=c;return d|0;}else{c=cM(b,1)|0;d=c;return d|0;}return 0;}function cO(a,b,d){a=a|0;b=b|0;d=d|0;var e=0,f=0,g=0,h=0;e=a;a=bi(12)|0;if((a|0)==0){f=0;g=f;return g|0;}h=bi(16)|0;if((h|0)==0){c0(a);f=0;g=f;return g|0;}else{c[h>>2]=e;c[h+4>>2]=e;c[h+8>>2]=e+b;c[h+12>>2]=d;c[a+8>>2]=h;c[a>>2]=4;c[a+4>>2]=2;f=a;g=f;return g|0;}return 0;}function cP(a,b,d,e){a=a|0;b=b|0;d=d|0;e=e|0;var f=0;f=a;return aY[c[f>>2]&7](c[f+8>>2]|0,b,d,e)|0;}function cQ(a,b){a=a|0;b=b|0;var c=0,d=0,e=0;c=i;i=i+1024|0;d=c|0;e=a;a=b;while(1){if(a>>>0<=0){break;}b=a;if(b>>>0>1024){b=1024;}a=a-b|0;(b|0)!=(cP(e,d|0,1,b)|0);}i=c;return;}function cR(a){a=a|0;var b=0;b=a;a=aW[c[b+4>>2]&7](c[b+8>>2]|0)|0;c0(b);return a|0;}function cS(){var a=0;c[1676]=bi(516)|0;c5(c[1676]|0,0,516);a=bi(3584)|0;c[c[1676]>>2]=a;c5(c[c[1676]>>2]|0,0,3584);c[1804]=bi(516)|0;c5(c[1804]|0,0,516);a=bi(3584)|0;c[c[1804]>>2]=a;c5(c[c[1804]>>2]|0,0,3584);return 0;}function cT(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0;d=i;i=i+1024|0;e=d|0;f=b;do{if((f|0)!=0){if((c1(f|0)|0)>>>0>=1024){break;}b=e|0;g=f;c2(b|0,g|0)|0;g=aE(f|0,47)|0;if((g|0)!=0){a[e+(g-f)|0]=0;g=c[m>>2]|0;b=e|0;ar(g|0,6480,(g=i,i=i+8|0,c[g>>2]=b,g)|0)|0;i=g;bj(e|0);}}}while(0);cS()|0;do{if((f|0)!=0){if((a[f]|0)==0){break;}h=f;j=cU(h)|0;i=d;return j|0;}}while(0);f=6520;h=f;j=cU(h)|0;i=d;return j|0;}function cU(b){b=b|0;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0;d=i;i=i+1064|0;e=d|0;f=d+1024|0;g=b;b=0;h=0;if((c[1660]|0)>50){j=c[m>>2]|0;ar(j|0,5792,(k=i,i=i+1|0,i=i+7&-8,c[k>>2]=0,k)|0)|0;i=k;l=-1;n=l;i=d;return n|0;}j=bh(g)|0;o=j;if((j|0)==0){j=c[m>>2]|0;p=g;ar(j|0,5392,(k=i,i=i+8|0,c[k>>2]=p,k)|0)|0;i=k;l=-1;n=l;i=d;return n|0;}L1881:while(1){if((c_(e|0,1024,o)|0)==0){q=1646;break;}h=h+1|0;p=0;c[f>>2]=ay(e|0,5096)|0;if((c[f>>2]|0)==0){continue;}do{if((aV(c[f>>2]|0,4840)|0)==0){p=-1;}else{if((a[c[f>>2]|0]|0)==35){continue L1881;}else{break;}}}while(0);while(1){do{if((c[f+(p<<2)>>2]|0)!=0){if((a[c[f+(p<<2)>>2]|0]|0)==35){r=0;break;}r=(p|0)<10;}else{r=0;}}while(0);if(!r){break;}j=p+1|0;p=j;c[f+(j<<2)>>2]=ay(0,5096)|0;}do{if((aV(c[f>>2]|0,4832)|0)!=0){if((aV(c[f>>2]|0,4816)|0)==0){q=1504;break;}if((aV(c[f>>2]|0,4800)|0)==0){q=1504;break;}if((aV(c[f>>2]|0,6552)|0)==0){q=1504;break;}if((aV(c[f>>2]|0,6536)|0)==0){q=1504;break;}if((aV(c[f>>2]|0,6504)|0)!=0){do{if((aV(c[f>>2]|0,6416)|0)!=0){if((aV(c[f>>2]|0,6400)|0)==0){q=1509;break;}if((aV(c[f>>2]|0,6344)|0)!=0){if((aV(c[f>>2]|0,6280)|0)!=0){do{if((aV(c[f>>2]|0,6176)|0)!=0){if((aV(c[f>>2]|0,6136)|0)==0){q=1516;break;}if((aV(c[f>>2]|0,6072)|0)!=0){if((aV(c[f>>2]|0,6008)|0)!=0){if((aV(c[f>>2]|0,5952)|0)!=0){if((aV(c[f>>2]|0,5880)|0)!=0){if((aV(c[f>>2]|0,5784)|0)!=0){if((aV(c[f>>2]|0,5720)|0)!=0){if((aV(c[f>>2]|0,5616)|0)!=0){if((p|0)<2){q=1562;break L1881;}if((a[c[f>>2]|0]|0)<48){q=1562;break L1881;}if((a[c[f>>2]|0]|0)>57){q=1562;break L1881;}s=aL(c[f>>2]|0)|0;if((s|0)<0){q=1565;break L1881;}if((s|0)>127){q=1565;break L1881;}if((b|0)==0){q=1567;break L1881;}if((c[(c[b>>2]|0)+(s*28|0)>>2]|0)!=0){c0(c[(c[b>>2]|0)+(s*28|0)>>2]|0);}j=bi((c1(c[f+4>>2]|0)|0)+1|0)|0;c[(c[b>>2]|0)+(s*28|0)>>2]=j;t=c[f+4>>2]|0;c2(j|0,t|0)|0;c[(c[b>>2]|0)+(s*28|0)+24>>2]=-1;c[(c[b>>2]|0)+(s*28|0)+20>>2]=-1;c[(c[b>>2]|0)+(s*28|0)+16>>2]=-1;c[(c[b>>2]|0)+(s*28|0)+12>>2]=-1;c[(c[b>>2]|0)+(s*28|0)+8>>2]=-1;c[(c[b>>2]|0)+(s*28|0)+4>>2]=-1;u=2;while(1){if((u|0)>=(p|0)){break;}t=aH(c[f+(u<<2)>>2]|0,61)|0;j=t;if((t|0)==0){q=1573;break L1881;}t=j;j=t+1|0;a[t]=0;if((aV(c[f+(u<<2)>>2]|0,5272)|0)!=0){if((aV(c[f+(u<<2)>>2]|0,5208)|0)!=0){if((aV(c[f+(u<<2)>>2]|0,5152)|0)!=0){if((aV(c[f+(u<<2)>>2]|0,5008)|0)!=0){if((aV(c[f+(u<<2)>>2]|0,4944)|0)!=0){q=1625;break L1881;}if((aV(j|0,5e3)|0)!=0){if((aV(j|0,4992)|0)!=0){if((aV(j|0,4936)|0)!=0){q=1621;break L1881;}c[(c[b>>2]|0)+(s*28|0)+24>>2]=1;}else{c[(c[b>>2]|0)+(s*28|0)+16>>2]=1;}}else{c[(c[b>>2]|0)+(s*28|0)+20>>2]=1;}}else{if((aV(j|0,5e3)|0)!=0){if((aV(j|0,4992)|0)!=0){q=1611;break L1881;}c[(c[b>>2]|0)+(s*28|0)+16>>2]=0;}else{c[(c[b>>2]|0)+(s*28|0)+20>>2]=0;}}}else{if((aV(j|0,5144)|0)!=0){if((aV(j|0,5112)|0)!=0){if((aV(j|0,5104)|0)!=0){v=(((aL(j|0)|0)+100|0)*100|0|0)/157|0;}else{v=127;}}else{v=0;}}else{v=64;}if((v|0)<0){q=1604;break L1881;}if((v|0)>127){q=1604;break L1881;}do{if((v|0)==0){if((a[j]|0)==45){break;}if((a[j]|0)<48){q=1604;break L1881;}if((a[j]|0)>57){q=1604;break L1881;}}}while(0);c[(c[b>>2]|0)+(s*28|0)+12>>2]=v;}}else{v=aL(j|0)|0;if((v|0)<0){q=1586;break L1881;}if((v|0)>127){q=1586;break L1881;}if((a[j]|0)<48){q=1586;break L1881;}if((a[j]|0)>57){q=1586;break L1881;}c[(c[b>>2]|0)+(s*28|0)+4>>2]=v;}}else{v=aL(j|0)|0;if((v|0)<0){q=1579;break L1881;}if((v|0)>800){q=1579;break L1881;}if((a[j]|0)<48){q=1579;break L1881;}if((a[j]|0)>57){q=1579;break L1881;}c[(c[b>>2]|0)+(s*28|0)+8>>2]=v;}u=u+1|0;}}else{if((p|0)<2){q=1552;break L1881;}s=aL(c[f+4>>2]|0)|0;if((s|0)<0){q=1555;break L1881;}if((s|0)>127){q=1555;break L1881;}if((c[6704+(s<<2)>>2]|0)==0){c[6704+(s<<2)>>2]=bi(516)|0;c5(c[6704+(s<<2)>>2]|0,0,516);t=bi(3584)|0;c[c[6704+(s<<2)>>2]>>2]=t;c5(c[c[6704+(s<<2)>>2]>>2]|0,0,3584);}b=c[6704+(s<<2)>>2]|0;}}else{if((p|0)<2){q=1543;break L1881;}s=aL(c[f+4>>2]|0)|0;if((s|0)<0){q=1546;break L1881;}if((s|0)>127){q=1546;break L1881;}if((c[7216+(s<<2)>>2]|0)==0){c[7216+(s<<2)>>2]=bi(516)|0;c5(c[7216+(s<<2)>>2]|0,0,516);t=bi(3584)|0;c[c[7216+(s<<2)>>2]>>2]=t;c5(c[c[7216+(s<<2)>>2]>>2]|0,0,3584);}b=c[7216+(s<<2)>>2]|0;}}else{if((p|0)!=2){q=1539;break L1881;}t=c[f+4>>2]|0;c7(7728,t|0,255)|0;a[7983]=0;}}else{if((p|0)<2){q=1531;break L1881;}s=1;while(1){if((s|0)>=(p|0)){break;}c[1660]=(c[1660]|0)+1;cU(c[f+(s<<2)>>2]|0)|0;c[1660]=(c[1660]|0)-1;s=s+1|0;}}}else{if((p|0)<2){q=1523;break L1881;}s=1;while(1){if((s|0)>=(p|0)){break;}bj(c[f+(s<<2)>>2]|0);s=s+1|0;}}}else{t=c[m>>2]|0;ar(t|0,5960,(k=i,i=i+1|0,i=i+7&-8,c[k>>2]=0,k)|0)|0;i=k;}}else{t=c[m>>2]|0;ar(t|0,6016,(k=i,i=i+1|0,i=i+7&-8,c[k>>2]=0,k)|0)|0;i=k;}}else{q=1516;}}while(0);if((q|0)==1516){q=0;t=c[m>>2]|0;w=c[f>>2]|0;ar(t|0,6088,(k=i,i=i+8|0,c[k>>2]=w,k)|0)|0;i=k;}}else{w=c[m>>2]|0;ar(w|0,6192,(k=i,i=i+1|0,i=i+7&-8,c[k>>2]=0,k)|0)|0;i=k;}}else{w=c[m>>2]|0;ar(w|0,6296,(k=i,i=i+1|0,i=i+7&-8,c[k>>2]=0,k)|0)|0;i=k;}}else{q=1509;}}while(0);if((q|0)==1509){q=0;w=c[m>>2]|0;t=c[f>>2]|0;ar(w|0,6352,(k=i,i=i+8|0,c[k>>2]=t,k)|0)|0;i=k;}}else{t=c[m>>2]|0;ar(t|0,6432,(k=i,i=i+1|0,i=i+7&-8,c[k>>2]=0,k)|0)|0;i=k;}}else{q=1504;}}while(0);if((q|0)==1504){q=0;}}if((q|0)==1523){s=c[m>>2]|0;b=g;v=h;ar(s|0,5912,(k=i,i=i+16|0,c[k>>2]=b,c[k+8>>2]=v,k)|0)|0;i=k;l=-2;n=l;i=d;return n|0;}else if((q|0)==1555){ar(c[m>>2]|0,5520,(k=i,i=i+16|0,c[k>>2]=g,c[k+8>>2]=h,k)|0)|0;i=k;l=-2;n=l;i=d;return n|0;}else if((q|0)==1562){ar(c[m>>2]|0,5480,(k=i,i=i+16|0,c[k>>2]=g,c[k+8>>2]=h,k)|0)|0;i=k;l=-2;n=l;i=d;return n|0;}else if((q|0)==1565){ar(c[m>>2]|0,5432,(k=i,i=i+16|0,c[k>>2]=g,c[k+8>>2]=h,k)|0)|0;i=k;l=-2;n=l;i=d;return n|0;}else if((q|0)==1567){ar(c[m>>2]|0,5320,(k=i,i=i+16|0,c[k>>2]=g,c[k+8>>2]=h,k)|0)|0;i=k;l=-2;n=l;i=d;return n|0;}else if((q|0)==1539){ar(c[m>>2]|0,5728,(k=i,i=i+16|0,c[k>>2]=g,c[k+8>>2]=h,k)|0)|0;i=k;l=-2;n=l;i=d;return n|0;}else if((q|0)==1531){ar(c[m>>2]|0,5840,(k=i,i=i+16|0,c[k>>2]=g,c[k+8>>2]=h,k)|0)|0;i=k;l=-2;n=l;i=d;return n|0;}else if((q|0)==1552){ar(c[m>>2]|0,5576,(k=i,i=i+16|0,c[k>>2]=g,c[k+8>>2]=h,k)|0)|0;i=k;l=-2;n=l;i=d;return n|0;}else if((q|0)==1579){ar(c[m>>2]|0,5216,(k=i,i=i+24|0,c[k>>2]=g,c[k+8>>2]=h,c[k+16>>2]=800,k)|0)|0;i=k;l=-2;n=l;i=d;return n|0;}else if((q|0)==1586){ar(c[m>>2]|0,5160,(k=i,i=i+16|0,c[k>>2]=g,c[k+8>>2]=h,k)|0)|0;i=k;l=-2;n=l;i=d;return n|0;}else if((q|0)==1611){ar(c[m>>2]|0,4952,(k=i,i=i+16|0,c[k>>2]=g,c[k+8>>2]=h,k)|0)|0;i=k;l=-2;n=l;i=d;return n|0;}else if((q|0)==1621){ar(c[m>>2]|0,4888,(k=i,i=i+16|0,c[k>>2]=g,c[k+8>>2]=h,k)|0)|0;i=k;l=-2;n=l;i=d;return n|0;}else if((q|0)==1625){v=c[f+(u<<2)>>2]|0;ar(c[m>>2]|0,5280,(k=i,i=i+24|0,c[k>>2]=g,c[k+8>>2]=h,c[k+16>>2]=v,k)|0)|0;i=k;l=-2;n=l;i=d;return n|0;}else if((q|0)==1546){ar(c[m>>2]|0,5624,(k=i,i=i+16|0,c[k>>2]=g,c[k+8>>2]=h,k)|0)|0;i=k;l=-2;n=l;i=d;return n|0;}else if((q|0)==1543){ar(c[m>>2]|0,5680,(k=i,i=i+16|0,c[k>>2]=g,c[k+8>>2]=h,k)|0)|0;i=k;l=-2;n=l;i=d;return n|0;}else if((q|0)==1604){ar(c[m>>2]|0,5016,(k=i,i=i+16|0,c[k>>2]=g,c[k+8>>2]=h,k)|0)|0;i=k;l=-2;n=l;i=d;return n|0;}else if((q|0)==1573){v=c[f+(u<<2)>>2]|0;ar(c[m>>2]|0,5280,(k=i,i=i+24|0,c[k>>2]=g,c[k+8>>2]=h,c[k+16>>2]=v,k)|0)|0;i=k;l=-2;n=l;i=d;return n|0;}else if((q|0)==1646){ao(o|0)|0;l=0;n=l;i=d;return n|0;}return 0;}function cV(d,e,f,g){d=d|0;e=e|0;f=f|0;g=g|0;c[1672]=d;b[3346]=e;a[6694]=f;b[3348]=g;return 6688;}function cW(f,g,h){f=f|0;g=g|0;h=h|0;var j=0,k=0,l=0,n=0;j=i;k=f;f=h;if((k|0)==0){l=0;n=l;i=j;return n|0;}h=bi(14164)|0;c5(h|0,0,14164);c[h+24>>2]=g;g=0;while(1){if((g|0)>=128){break;}if((c[6704+(g<<2)>>2]|0)!=0){c[h+28+(g<<2)>>2]=bi(516)|0;c5(c[h+28+(g<<2)>>2]|0,0,516);c[c[h+28+(g<<2)>>2]>>2]=c[c[6704+(g<<2)>>2]>>2];}if((c[7216+(g<<2)>>2]|0)!=0){c[h+540+(g<<2)>>2]=bi(516)|0;c5(c[h+540+(g<<2)>>2]|0,0,516);c[c[h+540+(g<<2)>>2]>>2]=c[c[7216+(g<<2)>>2]>>2];}g=g+1|0;}c[h+20>>2]=70;c[h+13052>>2]=32;c[h+13056>>2]=33280;c[h+4>>2]=c[f>>2];c[h+8>>2]=0;if((b[f+4>>1]&255|0)==16){g=h+8|0;c[g>>2]=c[g>>2]|4;}if((b[f+4>>1]&32768|0)!=0){g=h+8|0;c[g>>2]=c[g>>2]|2;}if((d[f+6|0]|0)==1){g=h+8|0;c[g>>2]=c[g>>2]|1;}g=e[f+4>>1]|0;if((g|0)==36880){c[h+1060>>2]=4;}else if((g|0)==16){c[h+1060>>2]=6;}else if((g|0)==32776){c[h+1060>>2]=10;}else if((g|0)==8){c[h+1060>>2]=8;}else if((g|0)==32784){c[h+1060>>2]=2;}else{ar(c[m>>2]|0,6144,(g=i,i=i+1|0,i=i+7&-8,c[g>>2]=0,g)|0)|0;i=g;c[h+1060>>2]=6;}c[h+1064>>2]=e[f+8>>1]|0;c[h+1068>>2]=bi(e[f+8>>1]<<1)|0;c[h+1072>>2]=bi(e[f+8>>1]<<1<<2)|0;c[h+12>>2]=_((c[h+8>>2]&1|0)!=0?1:2,(c[h+8>>2]&4|0)!=0?2:1)|0;c[h+13060>>2]=(c[f>>2]|0)/1e3|0;if((c[h+13060>>2]|0)<1){c[h+13060>>2]=1;}else{if((c[h+13060>>2]|0)>255){c[h+13060>>2]=255;}}c[h+13064>>2]=0;c[h+13068>>2]=0;c[h+13076>>2]=cq(k,h,h+13100|0,h+13072|0)|0;if((c[h+13076>>2]|0)==0){c0(h);l=0;n=l;i=j;return n|0;}c[h+1052>>2]=0;c[h+1056>>2]=0;if((a[7728]|0)!=0){k=h;bz(k,7728)|0;}bv(h)|0;l=h;n=l;i=j;return n|0;}// mid_song_load\nfunction cX(a,b){a=a|0;b=b|0;return cW(a,0,b)|0;}// mid_song_free\nfunction cY(a){a=a|0;var b=0;b=a;bx(b);a=0;while(1){if((a|0)>=128){break;}if((c[b+28+(a<<2)>>2]|0)!=0){c0(c[b+28+(a<<2)>>2]|0);}if((c[b+540+(a<<2)>>2]|0)!=0){c0(c[b+540+(a<<2)>>2]|0);}a=a+1|0;}c0(c[b+1072>>2]|0);c0(c[b+1068>>2]|0);c0(c[b+13076>>2]|0);a=0;while(1){if(a>>>0>=8){break;}if((c[b+13104+(a<<2)>>2]|0)!=0){c0(c[b+13104+(a<<2)>>2]|0);}a=a+1|0;}c0(b);return;}// mid_exit\nfunction cZ(){var a=0,b=0,d=0,e=0;a=0;while(1){if((a|0)>=128){break;}if((c[6704+(a<<2)>>2]|0)!=0){b=c[c[6704+(a<<2)>>2]>>2]|0;if((b|0)!=0){d=0;while(1){if((d|0)>=128){break;}if((c[b+(d*28|0)>>2]|0)!=0){c0(c[b+(d*28|0)>>2]|0);}d=d+1|0;}c0(b);}c0(c[6704+(a<<2)>>2]|0);}if((c[7216+(a<<2)>>2]|0)!=0){e=c[c[7216+(a<<2)>>2]>>2]|0;if((e|0)!=0){d=0;while(1){if((d|0)>=128){break;}if((c[e+(d*28|0)>>2]|0)!=0){c0(c[e+(d*28|0)>>2]|0);}d=d+1|0;}c0(e);}c0(c[7216+(a<<2)>>2]|0);}a=a+1|0;}bk();return;}function c_(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0,g=0,h=0,i=0;e=b;b=c;c=d;d=0;f=0;while(1){if((d|0)<(b|0)){g=(f|0)!=0^1;}else{g=0;}if(!g){break;}if((an(e+d|0,1,1,c|0)|0)!=1){h=1752;break;}if((a[e+d|0]|0)==10){h=1755;}else{if((a[e+d|0]|0)==13){h=1755;}}if((h|0)==1755){h=0;a[e+d|0]=0;f=1;}d=d+1|0;}a[e+d|0]=0;if((d|0)!=0){i=e;return i|0;}else{i=0;return i|0;}return 0;}// malloc\nfunction c$(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=0,U=0,V=0,W=0,X=0,Y=0,Z=0,_=0,$=0,aa=0,ab=0,ac=0,ad=0,ae=0,af=0,ag=0,ah=0,ai=0,aj=0,ak=0,al=0,an=0,ao=0,ap=0,ar=0,as=0,at=0,au=0,av=0,aw=0,ax=0,ay=0,az=0,aA=0,aB=0,aC=0,aD=0,aE=0,aF=0,aG=0,aH=0,aI=0;do{if(a>>>0<245){if(a>>>0<11){b=16;}else{b=a+11&-8;}d=b>>>3;e=c[1996]|0;f=e>>>(d>>>0);if((f&3|0)!=0){g=(f&1^1)+d|0;h=g<<1;i=8024+(h<<2)|0;j=8024+(h+2<<2)|0;h=c[j>>2]|0;k=h+8|0;l=c[k>>2]|0;do{if((i|0)==(l|0)){c[1996]=e&~(1<>>0<(c[2e3]|0)>>>0){aq();return 0;}m=l+12|0;if((c[m>>2]|0)==(h|0)){c[m>>2]=i;c[j>>2]=l;break;}else{aq();return 0;}}}while(0);l=g<<3;c[h+4>>2]=l|3;j=h+(l|4)|0;c[j>>2]=c[j>>2]|1;n=k;return n|0;}if(b>>>0<=(c[1998]|0)>>>0){o=b;break;}if((f|0)!=0){j=2<>>12&16;i=j>>>(l>>>0);j=i>>>5&8;m=i>>>(j>>>0);i=m>>>2&4;p=m>>>(i>>>0);m=p>>>1&2;q=p>>>(m>>>0);p=q>>>1&1;r=(j|l|i|m|p)+(q>>>(p>>>0))|0;p=r<<1;q=8024+(p<<2)|0;m=8024+(p+2<<2)|0;p=c[m>>2]|0;i=p+8|0;l=c[i>>2]|0;do{if((q|0)==(l|0)){c[1996]=e&~(1<>>0<(c[2e3]|0)>>>0){aq();return 0;}j=l+12|0;if((c[j>>2]|0)==(p|0)){c[j>>2]=q;c[m>>2]=l;break;}else{aq();return 0;}}}while(0);l=r<<3;m=l-b|0;c[p+4>>2]=b|3;q=p;e=q+b|0;c[q+(b|4)>>2]=m|1;c[q+l>>2]=m;l=c[1998]|0;if((l|0)!=0){q=c[2001]|0;d=l>>>3;l=d<<1;f=8024+(l<<2)|0;k=c[1996]|0;h=1<>2]|0;if(g>>>0>=(c[2e3]|0)>>>0){s=g;t=d;break;}aq();return 0;}}while(0);c[t>>2]=q;c[s+12>>2]=q;c[q+8>>2]=s;c[q+12>>2]=f;}c[1998]=m;c[2001]=e;n=i;return n|0;}l=c[1997]|0;if((l|0)==0){o=b;break;}h=(l&-l)-1|0;l=h>>>12&16;k=h>>>(l>>>0);h=k>>>5&8;p=k>>>(h>>>0);k=p>>>2&4;r=p>>>(k>>>0);p=r>>>1&2;d=r>>>(p>>>0);r=d>>>1&1;g=c[8288+((h|l|k|p|r)+(d>>>(r>>>0))<<2)>>2]|0;r=g;d=g;p=(c[g+4>>2]&-8)-b|0;while(1){g=c[r+16>>2]|0;if((g|0)==0){k=c[r+20>>2]|0;if((k|0)==0){break;}else{u=k;}}else{u=g;}g=(c[u+4>>2]&-8)-b|0;k=g>>>0

>>0;r=u;d=k?u:d;p=k?g:p;}r=d;i=c[2e3]|0;if(r>>>0>>0){aq();return 0;}e=r+b|0;m=e;if(r>>>0>=e>>>0){aq();return 0;}e=c[d+24>>2]|0;f=c[d+12>>2]|0;do{if((f|0)==(d|0)){q=d+20|0;g=c[q>>2]|0;if((g|0)==0){k=d+16|0;l=c[k>>2]|0;if((l|0)==0){v=0;break;}else{w=l;x=k;}}else{w=g;x=q;}while(1){q=w+20|0;g=c[q>>2]|0;if((g|0)!=0){w=g;x=q;continue;}q=w+16|0;g=c[q>>2]|0;if((g|0)==0){break;}else{w=g;x=q;}}if(x>>>0>>0){aq();return 0;}else{c[x>>2]=0;v=w;break;}}else{q=c[d+8>>2]|0;if(q>>>0>>0){aq();return 0;}g=q+12|0;if((c[g>>2]|0)!=(d|0)){aq();return 0;}k=f+8|0;if((c[k>>2]|0)==(d|0)){c[g>>2]=f;c[k>>2]=q;v=f;break;}else{aq();return 0;}}}while(0);L2304:do{if((e|0)!=0){f=d+28|0;i=8288+(c[f>>2]<<2)|0;do{if((d|0)==(c[i>>2]|0)){c[i>>2]=v;if((v|0)!=0){break;}c[1997]=c[1997]&~(1<>2]);break L2304;}else{if(e>>>0<(c[2e3]|0)>>>0){aq();return 0;}q=e+16|0;if((c[q>>2]|0)==(d|0)){c[q>>2]=v;}else{c[e+20>>2]=v;}if((v|0)==0){break L2304;}}}while(0);if(v>>>0<(c[2e3]|0)>>>0){aq();return 0;}c[v+24>>2]=e;f=c[d+16>>2]|0;do{if((f|0)!=0){if(f>>>0<(c[2e3]|0)>>>0){aq();return 0;}else{c[v+16>>2]=f;c[f+24>>2]=v;break;}}}while(0);f=c[d+20>>2]|0;if((f|0)==0){break;}if(f>>>0<(c[2e3]|0)>>>0){aq();return 0;}else{c[v+20>>2]=f;c[f+24>>2]=v;break;}}}while(0);if(p>>>0<16){e=p+b|0;c[d+4>>2]=e|3;f=r+(e+4)|0;c[f>>2]=c[f>>2]|1;}else{c[d+4>>2]=b|3;c[r+(b|4)>>2]=p|1;c[r+(p+b)>>2]=p;f=c[1998]|0;if((f|0)!=0){e=c[2001]|0;i=f>>>3;f=i<<1;q=8024+(f<<2)|0;k=c[1996]|0;g=1<>2]|0;if(l>>>0>=(c[2e3]|0)>>>0){y=l;z=i;break;}aq();return 0;}}while(0);c[z>>2]=e;c[y+12>>2]=e;c[e+8>>2]=y;c[e+12>>2]=q;}c[1998]=p;c[2001]=m;}f=d+8|0;if((f|0)==0){o=b;break;}else{n=f;}return n|0;}else{if(a>>>0>4294967231){o=-1;break;}f=a+11|0;g=f&-8;k=c[1997]|0;if((k|0)==0){o=g;break;}r=-g|0;i=f>>>8;do{if((i|0)==0){A=0;}else{if(g>>>0>16777215){A=31;break;}f=(i+1048320|0)>>>16&8;l=i<>>16&4;j=l<>>16&2;B=14-(h|f|l)+(j<>>15)|0;A=g>>>((B+7|0)>>>0)&1|B<<1;}}while(0);i=c[8288+(A<<2)>>2]|0;L2352:do{if((i|0)==0){C=0;D=r;E=0;}else{if((A|0)==31){F=0;}else{F=25-(A>>>1)|0;}d=0;m=r;p=i;q=g<>2]&-8;l=B-g|0;if(l>>>0>>0){if((B|0)==(g|0)){C=p;D=l;E=p;break L2352;}else{G=p;H=l;}}else{G=d;H=m;}l=c[p+20>>2]|0;B=c[p+16+(q>>>31<<2)>>2]|0;j=(l|0)==0|(l|0)==(B|0)?e:l;if((B|0)==0){C=G;D=H;E=j;break;}else{d=G;m=H;p=B;q=q<<1;e=j;}}}}while(0);if((E|0)==0&(C|0)==0){i=2<>>12&16;e=i>>>(r>>>0);i=e>>>5&8;q=e>>>(i>>>0);e=q>>>2&4;p=q>>>(e>>>0);q=p>>>1&2;m=p>>>(q>>>0);p=m>>>1&1;I=c[8288+((i|r|e|q|p)+(m>>>(p>>>0))<<2)>>2]|0;}else{I=E;}if((I|0)==0){J=D;K=C;}else{p=I;m=D;q=C;while(1){e=(c[p+4>>2]&-8)-g|0;r=e>>>0>>0;i=r?e:m;e=r?p:q;r=c[p+16>>2]|0;if((r|0)!=0){p=r;m=i;q=e;continue;}r=c[p+20>>2]|0;if((r|0)==0){J=i;K=e;break;}else{p=r;m=i;q=e;}}}if((K|0)==0){o=g;break;}if(J>>>0>=((c[1998]|0)-g|0)>>>0){o=g;break;}q=K;m=c[2e3]|0;if(q>>>0>>0){aq();return 0;}p=q+g|0;k=p;if(q>>>0>=p>>>0){aq();return 0;}e=c[K+24>>2]|0;i=c[K+12>>2]|0;do{if((i|0)==(K|0)){r=K+20|0;d=c[r>>2]|0;if((d|0)==0){j=K+16|0;B=c[j>>2]|0;if((B|0)==0){L=0;break;}else{M=B;N=j;}}else{M=d;N=r;}while(1){r=M+20|0;d=c[r>>2]|0;if((d|0)!=0){M=d;N=r;continue;}r=M+16|0;d=c[r>>2]|0;if((d|0)==0){break;}else{M=d;N=r;}}if(N>>>0>>0){aq();return 0;}else{c[N>>2]=0;L=M;break;}}else{r=c[K+8>>2]|0;if(r>>>0>>0){aq();return 0;}d=r+12|0;if((c[d>>2]|0)!=(K|0)){aq();return 0;}j=i+8|0;if((c[j>>2]|0)==(K|0)){c[d>>2]=i;c[j>>2]=r;L=i;break;}else{aq();return 0;}}}while(0);L2402:do{if((e|0)!=0){i=K+28|0;m=8288+(c[i>>2]<<2)|0;do{if((K|0)==(c[m>>2]|0)){c[m>>2]=L;if((L|0)!=0){break;}c[1997]=c[1997]&~(1<>2]);break L2402;}else{if(e>>>0<(c[2e3]|0)>>>0){aq();return 0;}r=e+16|0;if((c[r>>2]|0)==(K|0)){c[r>>2]=L;}else{c[e+20>>2]=L;}if((L|0)==0){break L2402;}}}while(0);if(L>>>0<(c[2e3]|0)>>>0){aq();return 0;}c[L+24>>2]=e;i=c[K+16>>2]|0;do{if((i|0)!=0){if(i>>>0<(c[2e3]|0)>>>0){aq();return 0;}else{c[L+16>>2]=i;c[i+24>>2]=L;break;}}}while(0);i=c[K+20>>2]|0;if((i|0)==0){break;}if(i>>>0<(c[2e3]|0)>>>0){aq();return 0;}else{c[L+20>>2]=i;c[i+24>>2]=L;break;}}}while(0);do{if(J>>>0<16){e=J+g|0;c[K+4>>2]=e|3;i=q+(e+4)|0;c[i>>2]=c[i>>2]|1;}else{c[K+4>>2]=g|3;c[q+(g|4)>>2]=J|1;c[q+(J+g)>>2]=J;i=J>>>3;if(J>>>0<256){e=i<<1;m=8024+(e<<2)|0;r=c[1996]|0;j=1<>2]|0;if(d>>>0>=(c[2e3]|0)>>>0){O=d;P=i;break;}aq();return 0;}}while(0);c[P>>2]=k;c[O+12>>2]=k;c[q+(g+8)>>2]=O;c[q+(g+12)>>2]=m;break;}e=p;j=J>>>8;do{if((j|0)==0){Q=0;}else{if(J>>>0>16777215){Q=31;break;}r=(j+1048320|0)>>>16&8;i=j<>>16&4;B=i<>>16&2;l=14-(d|r|i)+(B<>>15)|0;Q=J>>>((l+7|0)>>>0)&1|l<<1;}}while(0);j=8288+(Q<<2)|0;c[q+(g+28)>>2]=Q;c[q+(g+20)>>2]=0;c[q+(g+16)>>2]=0;m=c[1997]|0;l=1<>2]=e;c[q+(g+24)>>2]=j;c[q+(g+12)>>2]=e;c[q+(g+8)>>2]=e;break;}if((Q|0)==31){R=0;}else{R=25-(Q>>>1)|0;}l=J<>2]|0;while(1){if((c[m+4>>2]&-8|0)==(J|0)){break;}S=m+16+(l>>>31<<2)|0;j=c[S>>2]|0;if((j|0)==0){T=1913;break;}else{l=l<<1;m=j;}}if((T|0)==1913){if(S>>>0<(c[2e3]|0)>>>0){aq();return 0;}else{c[S>>2]=e;c[q+(g+24)>>2]=m;c[q+(g+12)>>2]=e;c[q+(g+8)>>2]=e;break;}}l=m+8|0;j=c[l>>2]|0;i=c[2e3]|0;if(m>>>0>>0){aq();return 0;}if(j>>>0>>0){aq();return 0;}else{c[j+12>>2]=e;c[l>>2]=e;c[q+(g+8)>>2]=j;c[q+(g+12)>>2]=m;c[q+(g+24)>>2]=0;break;}}}while(0);q=K+8|0;if((q|0)==0){o=g;break;}else{n=q;}return n|0;}}while(0);K=c[1998]|0;if(o>>>0<=K>>>0){S=K-o|0;J=c[2001]|0;if(S>>>0>15){R=J;c[2001]=R+o;c[1998]=S;c[R+(o+4)>>2]=S|1;c[R+K>>2]=S;c[J+4>>2]=o|3;}else{c[1998]=0;c[2001]=0;c[J+4>>2]=K|3;S=J+(K+4)|0;c[S>>2]=c[S>>2]|1;}n=J+8|0;return n|0;}J=c[1999]|0;if(o>>>0>>0){S=J-o|0;c[1999]=S;J=c[2002]|0;K=J;c[2002]=K+o;c[K+(o+4)>>2]=S|1;c[J+4>>2]=o|3;n=J+8|0;return n|0;}do{if((c[1666]|0)==0){J=am(30)|0;if((J-1&J|0)==0){c[1668]=J;c[1667]=J;c[1669]=-1;c[1670]=-1;c[1671]=0;c[2107]=0;c[1666]=(aJ(0)|0)&-16^1431655768;break;}else{aq();return 0;}}}while(0);J=o+48|0;S=c[1668]|0;K=o+47|0;R=S+K|0;Q=-S|0;S=R&Q;if(S>>>0<=o>>>0){n=0;return n|0;}O=c[2106]|0;do{if((O|0)!=0){P=c[2104]|0;L=P+S|0;if(L>>>0<=P>>>0|L>>>0>O>>>0){n=0;}else{break;}return n|0;}}while(0);L2494:do{if((c[2107]&4|0)==0){O=c[2002]|0;L2496:do{if((O|0)==0){T=1943;}else{L=O;P=8432;while(1){U=P|0;M=c[U>>2]|0;if(M>>>0<=L>>>0){V=P+4|0;if((M+(c[V>>2]|0)|0)>>>0>L>>>0){break;}}M=c[P+8>>2]|0;if((M|0)==0){T=1943;break L2496;}else{P=M;}}if((P|0)==0){T=1943;break;}L=R-(c[1999]|0)&Q;if(L>>>0>=2147483647){W=0;break;}m=aS(L|0)|0;e=(m|0)==((c[U>>2]|0)+(c[V>>2]|0)|0);X=e?m:-1;Y=e?L:0;Z=m;_=L;T=1952;}}while(0);do{if((T|0)==1943){O=aS(0)|0;if((O|0)==-1){W=0;break;}g=O;L=c[1667]|0;m=L-1|0;if((m&g|0)==0){$=S;}else{$=S-g+(m+g&-L)|0;}L=c[2104]|0;g=L+$|0;if(!($>>>0>o>>>0&$>>>0<2147483647)){W=0;break;}m=c[2106]|0;if((m|0)!=0){if(g>>>0<=L>>>0|g>>>0>m>>>0){W=0;break;}}m=aS($|0)|0;g=(m|0)==(O|0);X=g?O:-1;Y=g?$:0;Z=m;_=$;T=1952;}}while(0);L2516:do{if((T|0)==1952){m=-_|0;if((X|0)!=-1){aa=Y;ab=X;T=1963;break L2494;}do{if((Z|0)!=-1&_>>>0<2147483647&_>>>0>>0){g=c[1668]|0;O=K-_+g&-g;if(O>>>0>=2147483647){ac=_;break;}if((aS(O|0)|0)==-1){aS(m|0)|0;W=Y;break L2516;}else{ac=O+_|0;break;}}else{ac=_;}}while(0);if((Z|0)==-1){W=Y;}else{aa=ac;ab=Z;T=1963;break L2494;}}}while(0);c[2107]=c[2107]|4;ad=W;T=1960;}else{ad=0;T=1960;}}while(0);do{if((T|0)==1960){if(S>>>0>=2147483647){break;}W=aS(S|0)|0;Z=aS(0)|0;if(!((Z|0)!=-1&(W|0)!=-1&W>>>0>>0)){break;}ac=Z-W|0;Z=ac>>>0>(o+40|0)>>>0;Y=Z?W:-1;if((Y|0)!=-1){aa=Z?ac:ad;ab=Y;T=1963;}}}while(0);do{if((T|0)==1963){ad=(c[2104]|0)+aa|0;c[2104]=ad;if(ad>>>0>(c[2105]|0)>>>0){c[2105]=ad;}ad=c[2002]|0;L2536:do{if((ad|0)==0){S=c[2e3]|0;if((S|0)==0|ab>>>0>>0){c[2e3]=ab;}c[2108]=ab;c[2109]=aa;c[2111]=0;c[2005]=c[1666];c[2004]=-1;S=0;do{Y=S<<1;ac=8024+(Y<<2)|0;c[8024+(Y+3<<2)>>2]=ac;c[8024+(Y+2<<2)>>2]=ac;S=S+1|0;}while(S>>>0<32);S=ab+8|0;if((S&7|0)==0){ae=0;}else{ae=-S&7;}S=aa-40-ae|0;c[2002]=ab+ae;c[1999]=S;c[ab+(ae+4)>>2]=S|1;c[ab+(aa-36)>>2]=40;c[2003]=c[1670];}else{S=8432;while(1){af=c[S>>2]|0;ag=S+4|0;ah=c[ag>>2]|0;if((ab|0)==(af+ah|0)){T=1975;break;}ac=c[S+8>>2]|0;if((ac|0)==0){break;}else{S=ac;}}do{if((T|0)==1975){if((c[S+12>>2]&8|0)!=0){break;}ac=ad;if(!(ac>>>0>=af>>>0&ac>>>0>>0)){break;}c[ag>>2]=ah+aa;ac=c[2002]|0;Y=(c[1999]|0)+aa|0;Z=ac;W=ac+8|0;if((W&7|0)==0){ai=0;}else{ai=-W&7;}W=Y-ai|0;c[2002]=Z+ai;c[1999]=W;c[Z+(ai+4)>>2]=W|1;c[Z+(Y+4)>>2]=40;c[2003]=c[1670];break L2536;}}while(0);if(ab>>>0<(c[2e3]|0)>>>0){c[2e3]=ab;}S=ab+aa|0;Y=8432;while(1){aj=Y|0;if((c[aj>>2]|0)==(S|0)){T=1985;break;}Z=c[Y+8>>2]|0;if((Z|0)==0){break;}else{Y=Z;}}do{if((T|0)==1985){if((c[Y+12>>2]&8|0)!=0){break;}c[aj>>2]=ab;S=Y+4|0;c[S>>2]=(c[S>>2]|0)+aa;S=ab+8|0;if((S&7|0)==0){ak=0;}else{ak=-S&7;}S=ab+(aa+8)|0;if((S&7|0)==0){al=0;}else{al=-S&7;}S=ab+(al+aa)|0;Z=S;W=ak+o|0;ac=ab+W|0;_=ac;K=S-(ab+ak)-o|0;c[ab+(ak+4)>>2]=o|3;do{if((Z|0)==(c[2002]|0)){J=(c[1999]|0)+K|0;c[1999]=J;c[2002]=_;c[ab+(W+4)>>2]=J|1;}else{if((Z|0)==(c[2001]|0)){J=(c[1998]|0)+K|0;c[1998]=J;c[2001]=_;c[ab+(W+4)>>2]=J|1;c[ab+(J+W)>>2]=J;break;}J=aa+4|0;X=c[ab+(J+al)>>2]|0;if((X&3|0)==1){$=X&-8;V=X>>>3;L2571:do{if(X>>>0<256){U=c[ab+((al|8)+aa)>>2]|0;Q=c[ab+(aa+12+al)>>2]|0;R=8024+(V<<1<<2)|0;do{if((U|0)!=(R|0)){if(U>>>0<(c[2e3]|0)>>>0){aq();return 0;}if((c[U+12>>2]|0)==(Z|0)){break;}aq();return 0;}}while(0);if((Q|0)==(U|0)){c[1996]=c[1996]&~(1<>>0<(c[2e3]|0)>>>0){aq();return 0;}m=Q+8|0;if((c[m>>2]|0)==(Z|0)){an=m;break;}aq();return 0;}}while(0);c[U+12>>2]=Q;c[an>>2]=U;}else{R=S;m=c[ab+((al|24)+aa)>>2]|0;P=c[ab+(aa+12+al)>>2]|0;do{if((P|0)==(R|0)){O=al|16;g=ab+(J+O)|0;L=c[g>>2]|0;if((L|0)==0){e=ab+(O+aa)|0;O=c[e>>2]|0;if((O|0)==0){ao=0;break;}else{ap=O;ar=e;}}else{ap=L;ar=g;}while(1){g=ap+20|0;L=c[g>>2]|0;if((L|0)!=0){ap=L;ar=g;continue;}g=ap+16|0;L=c[g>>2]|0;if((L|0)==0){break;}else{ap=L;ar=g;}}if(ar>>>0<(c[2e3]|0)>>>0){aq();return 0;}else{c[ar>>2]=0;ao=ap;break;}}else{g=c[ab+((al|8)+aa)>>2]|0;if(g>>>0<(c[2e3]|0)>>>0){aq();return 0;}L=g+12|0;if((c[L>>2]|0)!=(R|0)){aq();return 0;}e=P+8|0;if((c[e>>2]|0)==(R|0)){c[L>>2]=P;c[e>>2]=g;ao=P;break;}else{aq();return 0;}}}while(0);if((m|0)==0){break;}P=ab+(aa+28+al)|0;U=8288+(c[P>>2]<<2)|0;do{if((R|0)==(c[U>>2]|0)){c[U>>2]=ao;if((ao|0)!=0){break;}c[1997]=c[1997]&~(1<>2]);break L2571;}else{if(m>>>0<(c[2e3]|0)>>>0){aq();return 0;}Q=m+16|0;if((c[Q>>2]|0)==(R|0)){c[Q>>2]=ao;}else{c[m+20>>2]=ao;}if((ao|0)==0){break L2571;}}}while(0);if(ao>>>0<(c[2e3]|0)>>>0){aq();return 0;}c[ao+24>>2]=m;R=al|16;P=c[ab+(R+aa)>>2]|0;do{if((P|0)!=0){if(P>>>0<(c[2e3]|0)>>>0){aq();return 0;}else{c[ao+16>>2]=P;c[P+24>>2]=ao;break;}}}while(0);P=c[ab+(J+R)>>2]|0;if((P|0)==0){break;}if(P>>>0<(c[2e3]|0)>>>0){aq();return 0;}else{c[ao+20>>2]=P;c[P+24>>2]=ao;break;}}}while(0);as=ab+(($|al)+aa)|0;at=$+K|0;}else{as=Z;at=K;}J=as+4|0;c[J>>2]=c[J>>2]&-2;c[ab+(W+4)>>2]=at|1;c[ab+(at+W)>>2]=at;J=at>>>3;if(at>>>0<256){V=J<<1;X=8024+(V<<2)|0;P=c[1996]|0;m=1<>2]|0;if(U>>>0>=(c[2e3]|0)>>>0){au=U;av=J;break;}aq();return 0;}}while(0);c[av>>2]=_;c[au+12>>2]=_;c[ab+(W+8)>>2]=au;c[ab+(W+12)>>2]=X;break;}V=ac;m=at>>>8;do{if((m|0)==0){aw=0;}else{if(at>>>0>16777215){aw=31;break;}P=(m+1048320|0)>>>16&8;$=m<>>16&4;U=$<>>16&2;Q=14-(J|P|$)+(U<<$>>>15)|0;aw=at>>>((Q+7|0)>>>0)&1|Q<<1;}}while(0);m=8288+(aw<<2)|0;c[ab+(W+28)>>2]=aw;c[ab+(W+20)>>2]=0;c[ab+(W+16)>>2]=0;X=c[1997]|0;Q=1<>2]=V;c[ab+(W+24)>>2]=m;c[ab+(W+12)>>2]=V;c[ab+(W+8)>>2]=V;break;}if((aw|0)==31){ax=0;}else{ax=25-(aw>>>1)|0;}Q=at<>2]|0;while(1){if((c[X+4>>2]&-8|0)==(at|0)){break;}ay=X+16+(Q>>>31<<2)|0;m=c[ay>>2]|0;if((m|0)==0){T=2058;break;}else{Q=Q<<1;X=m;}}if((T|0)==2058){if(ay>>>0<(c[2e3]|0)>>>0){aq();return 0;}else{c[ay>>2]=V;c[ab+(W+24)>>2]=X;c[ab+(W+12)>>2]=V;c[ab+(W+8)>>2]=V;break;}}Q=X+8|0;m=c[Q>>2]|0;$=c[2e3]|0;if(X>>>0<$>>>0){aq();return 0;}if(m>>>0<$>>>0){aq();return 0;}else{c[m+12>>2]=V;c[Q>>2]=V;c[ab+(W+8)>>2]=m;c[ab+(W+12)>>2]=X;c[ab+(W+24)>>2]=0;break;}}}while(0);n=ab+(ak|8)|0;return n|0;}}while(0);Y=ad;W=8432;while(1){az=c[W>>2]|0;if(az>>>0<=Y>>>0){aA=c[W+4>>2]|0;aB=az+aA|0;if(aB>>>0>Y>>>0){break;}}W=c[W+8>>2]|0;}W=az+(aA-39)|0;if((W&7|0)==0){aC=0;}else{aC=-W&7;}W=az+(aA-47+aC)|0;ac=W>>>0<(ad+16|0)>>>0?Y:W;W=ac+8|0;_=ab+8|0;if((_&7|0)==0){aD=0;}else{aD=-_&7;}_=aa-40-aD|0;c[2002]=ab+aD;c[1999]=_;c[ab+(aD+4)>>2]=_|1;c[ab+(aa-36)>>2]=40;c[2003]=c[1670];c[ac+4>>2]=27;c[W>>2]=c[2108];c[W+4>>2]=c[2109];c[W+8>>2]=c[2110];c[W+12>>2]=c[2111];c[2108]=ab;c[2109]=aa;c[2111]=0;c[2110]=W;W=ac+28|0;c[W>>2]=7;if((ac+32|0)>>>0>>0){_=W;while(1){W=_+4|0;c[W>>2]=7;if((_+8|0)>>>0>>0){_=W;}else{break;}}}if((ac|0)==(Y|0)){break;}_=ac-ad|0;W=Y+(_+4)|0;c[W>>2]=c[W>>2]&-2;c[ad+4>>2]=_|1;c[Y+_>>2]=_;W=_>>>3;if(_>>>0<256){K=W<<1;Z=8024+(K<<2)|0;S=c[1996]|0;m=1<>2]|0;if(Q>>>0>=(c[2e3]|0)>>>0){aE=Q;aF=W;break;}aq();return 0;}}while(0);c[aF>>2]=ad;c[aE+12>>2]=ad;c[ad+8>>2]=aE;c[ad+12>>2]=Z;break;}K=ad;m=_>>>8;do{if((m|0)==0){aG=0;}else{if(_>>>0>16777215){aG=31;break;}S=(m+1048320|0)>>>16&8;Y=m<>>16&4;W=Y<>>16&2;Q=14-(ac|S|Y)+(W<>>15)|0;aG=_>>>((Q+7|0)>>>0)&1|Q<<1;}}while(0);m=8288+(aG<<2)|0;c[ad+28>>2]=aG;c[ad+20>>2]=0;c[ad+16>>2]=0;Z=c[1997]|0;Q=1<>2]=K;c[ad+24>>2]=m;c[ad+12>>2]=ad;c[ad+8>>2]=ad;break;}if((aG|0)==31){aH=0;}else{aH=25-(aG>>>1)|0;}Q=_<>2]|0;while(1){if((c[Z+4>>2]&-8|0)==(_|0)){break;}aI=Z+16+(Q>>>31<<2)|0;m=c[aI>>2]|0;if((m|0)==0){T=2093;break;}else{Q=Q<<1;Z=m;}}if((T|0)==2093){if(aI>>>0<(c[2e3]|0)>>>0){aq();return 0;}else{c[aI>>2]=K;c[ad+24>>2]=Z;c[ad+12>>2]=ad;c[ad+8>>2]=ad;break;}}Q=Z+8|0;_=c[Q>>2]|0;m=c[2e3]|0;if(Z>>>0>>0){aq();return 0;}if(_>>>0>>0){aq();return 0;}else{c[_+12>>2]=K;c[Q>>2]=K;c[ad+8>>2]=_;c[ad+12>>2]=Z;c[ad+24>>2]=0;break;}}}while(0);ad=c[1999]|0;if(ad>>>0<=o>>>0){break;}_=ad-o|0;c[1999]=_;ad=c[2002]|0;Q=ad;c[2002]=Q+o;c[Q+(o+4)>>2]=_|1;c[ad+4>>2]=o|3;n=ad+8|0;return n|0;}}while(0);c[(aQ()|0)>>2]=12;n=0;return n|0;}// free\nfunction c0(a){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0;if((a|0)==0){return;}b=a-8|0;d=b;e=c[2e3]|0;if(b>>>0>>0){aq();}f=c[a-4>>2]|0;g=f&3;if((g|0)==1){aq();}h=f&-8;i=a+(h-8)|0;j=i;L2753:do{if((f&1|0)==0){k=c[b>>2]|0;if((g|0)==0){return;}l=-8-k|0;m=a+l|0;n=m;o=k+h|0;if(m>>>0>>0){aq();}if((n|0)==(c[2001]|0)){p=a+(h-4)|0;if((c[p>>2]&3|0)!=3){q=n;r=o;break;}c[1998]=o;c[p>>2]=c[p>>2]&-2;c[a+(l+4)>>2]=o|1;c[i>>2]=o;return;}p=k>>>3;if(k>>>0<256){k=c[a+(l+8)>>2]|0;s=c[a+(l+12)>>2]|0;t=8024+(p<<1<<2)|0;do{if((k|0)!=(t|0)){if(k>>>0>>0){aq();}if((c[k+12>>2]|0)==(n|0)){break;}aq();}}while(0);if((s|0)==(k|0)){c[1996]=c[1996]&~(1<>>0>>0){aq();}v=s+8|0;if((c[v>>2]|0)==(n|0)){u=v;break;}aq();}}while(0);c[k+12>>2]=s;c[u>>2]=k;q=n;r=o;break;}t=m;p=c[a+(l+24)>>2]|0;v=c[a+(l+12)>>2]|0;do{if((v|0)==(t|0)){w=a+(l+20)|0;x=c[w>>2]|0;if((x|0)==0){y=a+(l+16)|0;z=c[y>>2]|0;if((z|0)==0){A=0;break;}else{B=z;C=y;}}else{B=x;C=w;}while(1){w=B+20|0;x=c[w>>2]|0;if((x|0)!=0){B=x;C=w;continue;}w=B+16|0;x=c[w>>2]|0;if((x|0)==0){break;}else{B=x;C=w;}}if(C>>>0>>0){aq();}else{c[C>>2]=0;A=B;break;}}else{w=c[a+(l+8)>>2]|0;if(w>>>0>>0){aq();}x=w+12|0;if((c[x>>2]|0)!=(t|0)){aq();}y=v+8|0;if((c[y>>2]|0)==(t|0)){c[x>>2]=v;c[y>>2]=w;A=v;break;}else{aq();}}}while(0);if((p|0)==0){q=n;r=o;break;}v=a+(l+28)|0;m=8288+(c[v>>2]<<2)|0;do{if((t|0)==(c[m>>2]|0)){c[m>>2]=A;if((A|0)!=0){break;}c[1997]=c[1997]&~(1<>2]);q=n;r=o;break L2753;}else{if(p>>>0<(c[2e3]|0)>>>0){aq();}k=p+16|0;if((c[k>>2]|0)==(t|0)){c[k>>2]=A;}else{c[p+20>>2]=A;}if((A|0)==0){q=n;r=o;break L2753;}}}while(0);if(A>>>0<(c[2e3]|0)>>>0){aq();}c[A+24>>2]=p;t=c[a+(l+16)>>2]|0;do{if((t|0)!=0){if(t>>>0<(c[2e3]|0)>>>0){aq();}else{c[A+16>>2]=t;c[t+24>>2]=A;break;}}}while(0);t=c[a+(l+20)>>2]|0;if((t|0)==0){q=n;r=o;break;}if(t>>>0<(c[2e3]|0)>>>0){aq();}else{c[A+20>>2]=t;c[t+24>>2]=A;q=n;r=o;break;}}else{q=d;r=h;}}while(0);d=q;if(d>>>0>=i>>>0){aq();}A=a+(h-4)|0;e=c[A>>2]|0;if((e&1|0)==0){aq();}do{if((e&2|0)==0){if((j|0)==(c[2002]|0)){B=(c[1999]|0)+r|0;c[1999]=B;c[2002]=q;c[q+4>>2]=B|1;if((q|0)!=(c[2001]|0)){return;}c[2001]=0;c[1998]=0;return;}if((j|0)==(c[2001]|0)){B=(c[1998]|0)+r|0;c[1998]=B;c[2001]=q;c[q+4>>2]=B|1;c[d+B>>2]=B;return;}B=(e&-8)+r|0;C=e>>>3;L2856:do{if(e>>>0<256){u=c[a+h>>2]|0;g=c[a+(h|4)>>2]|0;b=8024+(C<<1<<2)|0;do{if((u|0)!=(b|0)){if(u>>>0<(c[2e3]|0)>>>0){aq();}if((c[u+12>>2]|0)==(j|0)){break;}aq();}}while(0);if((g|0)==(u|0)){c[1996]=c[1996]&~(1<>>0<(c[2e3]|0)>>>0){aq();}f=g+8|0;if((c[f>>2]|0)==(j|0)){D=f;break;}aq();}}while(0);c[u+12>>2]=g;c[D>>2]=u;}else{b=i;f=c[a+(h+16)>>2]|0;t=c[a+(h|4)>>2]|0;do{if((t|0)==(b|0)){p=a+(h+12)|0;v=c[p>>2]|0;if((v|0)==0){m=a+(h+8)|0;k=c[m>>2]|0;if((k|0)==0){E=0;break;}else{F=k;G=m;}}else{F=v;G=p;}while(1){p=F+20|0;v=c[p>>2]|0;if((v|0)!=0){F=v;G=p;continue;}p=F+16|0;v=c[p>>2]|0;if((v|0)==0){break;}else{F=v;G=p;}}if(G>>>0<(c[2e3]|0)>>>0){aq();}else{c[G>>2]=0;E=F;break;}}else{p=c[a+h>>2]|0;if(p>>>0<(c[2e3]|0)>>>0){aq();}v=p+12|0;if((c[v>>2]|0)!=(b|0)){aq();}m=t+8|0;if((c[m>>2]|0)==(b|0)){c[v>>2]=t;c[m>>2]=p;E=t;break;}else{aq();}}}while(0);if((f|0)==0){break;}t=a+(h+20)|0;u=8288+(c[t>>2]<<2)|0;do{if((b|0)==(c[u>>2]|0)){c[u>>2]=E;if((E|0)!=0){break;}c[1997]=c[1997]&~(1<>2]);break L2856;}else{if(f>>>0<(c[2e3]|0)>>>0){aq();}g=f+16|0;if((c[g>>2]|0)==(b|0)){c[g>>2]=E;}else{c[f+20>>2]=E;}if((E|0)==0){break L2856;}}}while(0);if(E>>>0<(c[2e3]|0)>>>0){aq();}c[E+24>>2]=f;b=c[a+(h+8)>>2]|0;do{if((b|0)!=0){if(b>>>0<(c[2e3]|0)>>>0){aq();}else{c[E+16>>2]=b;c[b+24>>2]=E;break;}}}while(0);b=c[a+(h+12)>>2]|0;if((b|0)==0){break;}if(b>>>0<(c[2e3]|0)>>>0){aq();}else{c[E+20>>2]=b;c[b+24>>2]=E;break;}}}while(0);c[q+4>>2]=B|1;c[d+B>>2]=B;if((q|0)!=(c[2001]|0)){H=B;break;}c[1998]=B;return;}else{c[A>>2]=e&-2;c[q+4>>2]=r|1;c[d+r>>2]=r;H=r;}}while(0);r=H>>>3;if(H>>>0<256){d=r<<1;e=8024+(d<<2)|0;A=c[1996]|0;E=1<>2]|0;if(h>>>0>=(c[2e3]|0)>>>0){I=h;J=r;break;}aq();}}while(0);c[J>>2]=q;c[I+12>>2]=q;c[q+8>>2]=I;c[q+12>>2]=e;return;}e=q;I=H>>>8;do{if((I|0)==0){K=0;}else{if(H>>>0>16777215){K=31;break;}J=(I+1048320|0)>>>16&8;d=I<>>16&4;A=d<>>16&2;r=14-(E|J|d)+(A<>>15)|0;K=H>>>((r+7|0)>>>0)&1|r<<1;}}while(0);I=8288+(K<<2)|0;c[q+28>>2]=K;c[q+20>>2]=0;c[q+16>>2]=0;r=c[1997]|0;d=1<>2]=e;c[q+24>>2]=I;c[q+12>>2]=q;c[q+8>>2]=q;}else{if((K|0)==31){L=0;}else{L=25-(K>>>1)|0;}A=H<>2]|0;while(1){if((c[J+4>>2]&-8|0)==(H|0)){break;}M=J+16+(A>>>31<<2)|0;E=c[M>>2]|0;if((E|0)==0){N=2270;break;}else{A=A<<1;J=E;}}if((N|0)==2270){if(M>>>0<(c[2e3]|0)>>>0){aq();}else{c[M>>2]=e;c[q+24>>2]=J;c[q+12>>2]=q;c[q+8>>2]=q;break;}}A=J+8|0;B=c[A>>2]|0;E=c[2e3]|0;if(J>>>0>>0){aq();}if(B>>>0>>0){aq();}else{c[B+12>>2]=e;c[A>>2]=e;c[q+8>>2]=B;c[q+12>>2]=J;c[q+24>>2]=0;break;}}}while(0);q=(c[2004]|0)-1|0;c[2004]=q;if((q|0)==0){O=8440;}else{return;}while(1){q=c[O>>2]|0;if((q|0)==0){break;}else{O=q+8|0;}}c[2004]=-1;return;}function c1(b){b=b|0;var c=0;c=b;while(a[c]|0){c=c+1|0;}return c-b|0;}function c2(b,c){b=b|0;c=c|0;var d=0;do{a[b+d|0]=a[c+d|0];d=d+1|0;}while(a[c+(d-1)|0]|0);return b|0;}function c3(b,c){b=b|0;c=c|0;var d=0,e=0;d=b+(c1(b)|0)|0;do{a[d+e|0]=a[c+e|0];e=e+1|0;}while(a[c+(e-1)|0]|0);return b|0;}function c4(a,b,c){a=a|0;b=b|0;c=c|0;var e=0,f=0,g=0;while((e|0)<(c|0)){f=d[a+e|0]|0;g=d[b+e|0]|0;if((f|0)!=(g|0))return((f|0)>(g|0)?1:-1)|0;e=e+1|0;}return 0;}function c5(b,d,e){b=b|0;d=d|0;e=e|0;var f=0,g=0,h=0;f=b+e|0;if((e|0)>=20){d=d&255;e=b&3;g=d|d<<8|d<<16|d<<24;h=f&~3;if(e){e=b+4-e|0;while((b|0)<(e|0)){a[b]=d;b=b+1|0;}}while((b|0)<(h|0)){c[b>>2]=g;b=b+4|0;}}while((b|0)<(f|0)){a[b]=d;b=b+1|0;}}function c6(b,d,e){b=b|0;d=d|0;e=e|0;var f=0;f=b|0;if((b&3)==(d&3)){while(b&3){if((e|0)==0)return f|0;a[b]=a[d]|0;b=b+1|0;d=d+1|0;e=e-1|0;}while((e|0)>=4){c[b>>2]=c[d>>2];b=b+4|0;d=d+4|0;e=e-4|0;}}while((e|0)>0){a[b]=a[d]|0;b=b+1|0;d=d+1|0;e=e-1|0;}return f|0;}function c7(b,c,d){b=b|0;c=c|0;d=d|0;var e=0,f=0;while((e|0)<(d|0)){a[b+e|0]=f?0:a[c+e|0]|0;f=f?1:(a[c+e|0]|0)==0;e=e+1|0;}return b|0;}function c8(a,b){a=a|0;b=b|0;return aW[a&7](b|0)|0;}function c9(a,b){a=a|0;b=b|0;aX[a&1](b|0);}function da(a,b,c,d,e){a=a|0;b=b|0;c=c|0;d=d|0;e=e|0;return aY[a&7](b|0,c|0,d|0,e|0)|0;}function db(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;aZ[a&15](b|0,c|0,d|0);}function dc(a){a=a|0;a_[a&1]();}function dd(a,b,c){a=a|0;b=b|0;c=c|0;return a$[a&1](b|0,c|0)|0;}function de(a){a=a|0;$(0);return 0;}function df(a){a=a|0;$(1);}function dg(a,b,c,d){a=a|0;b=b|0;c=c|0;d=d|0;$(2);return 0;}function dh(a,b,c){a=a|0;b=b|0;c=c|0;$(3);}function di(){$(4);}function dj(a,b){a=a|0;b=b|0;$(5);return 0;}// EMSCRIPTEN_END_FUNCS\nvar aW=[de,de,cL,de,cJ,de,de,de];var aX=[df,df];var aY=[dg,dg,cI,dg,cK,dg,dg,dg];var aZ=[dh,dh,bZ,dh,b$,dh,b_,dh,bY,dh,bX,dh,dh,dh,dh,dh];var a_=[di,di];var a$=[dj,dj];return{_strlen:c1,_strcat:c3,_mid_create_options:cV,_mid_istream_open_mem:cO,_mid_istream_open_file:cN,_mid_song_read_wave:b6,_mid_exit:cZ,_mid_song_note_on:b0,_strncpy:c7,_memset:c5,_memcpy:c6,_mid_song_get_missing_instrument:bu,_mid_istream_close:cR,_mid_song_free:cY,_mid_init:cT,_mid_song_load:cX,_mid_song_start:b3,_mid_song_get_num_missing_instruments:bt,_memcmp:c4,_free:c0,_malloc:c$,_strcpy:c2,runPostSets:bg,stackAlloc:a0,stackSave:a1,stackRestore:a2,setThrew:a3,setTempRet0:a6,setTempRet1:a7,setTempRet2:a8,setTempRet3:a9,setTempRet4:ba,setTempRet5:bb,setTempRet6:bc,setTempRet7:bd,setTempRet8:be,setTempRet9:bf,dynCall_ii:c8,dynCall_vi:c9,dynCall_iiiii:da,dynCall_viii:db,dynCall_v:dc,dynCall_iii:dd};}(// EMSCRIPTEN_END_ASM\n{Math:Math,Int8Array:Int8Array,Int16Array:Int16Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array,Uint32Array:Uint32Array,Float32Array:Float32Array,Float64Array:Float64Array},{abort:abort,assert:assert,asmPrintInt:asmPrintInt,asmPrintFloat:asmPrintFloat,min:Math_min,invoke_ii:invoke_ii,invoke_vi:invoke_vi,invoke_iiiii:invoke_iiiii,invoke_viii:invoke_viii,invoke_v:invoke_v,invoke_iii:invoke_iii,_strncmp:_strncmp,_lseek:_lseek,_sysconf:_sysconf,_fread:_fread,_fclose:_fclose,_strtok_r:_strtok_r,_abort:_abort,_fprintf:_fprintf,_close:_close,_pread:_pread,_fflush:_fflush,_fopen:_fopen,_open:_open,_strtol:_strtol,_strtok:_strtok,___setErrNo:___setErrNo,__reallyNegative:__reallyNegative,_fseek:_fseek,_send:_send,_write:_write,_strrchr:_strrchr,_sin:_sin,_printf:_printf,_strchr:_strchr,_read:_read,_time:_time,__formatString:__formatString,_atoi:_atoi,_recv:_recv,_pwrite:_pwrite,_llvm_pow_f64:_llvm_pow_f64,_fsync:_fsync,___errno_location:___errno_location,_isspace:_isspace,_sbrk:_sbrk,__parseInt:__parseInt,_fwrite:_fwrite,_strcmp:_strcmp,STACKTOP:STACKTOP,STACK_MAX:STACK_MAX,tempDoublePtr:tempDoublePtr,ABORT:ABORT,NaN:NaN,Infinity:Infinity,_stderr:_stderr},buffer);var _strlen=Module['_strlen']=asm['_strlen'];var _strcat=Module['_strcat']=asm['_strcat'];Module['_mid_create_options']=asm['_mid_create_options'];Module['_mid_istream_open_mem']=asm['_mid_istream_open_mem'];Module['_mid_istream_open_file']=asm['_mid_istream_open_file'];Module['_mid_song_read_wave']=asm['_mid_song_read_wave'];Module['_mid_exit']=asm['_mid_exit'];Module['_mid_song_note_on']=asm['_mid_song_note_on'];var _strncpy=Module['_strncpy']=asm['_strncpy'];var _memset=Module['_memset']=asm['_memset'];var _memcpy=Module['_memcpy']=asm['_memcpy'];Module['_mid_song_get_missing_instrument']=asm['_mid_song_get_missing_instrument'];Module['_mid_istream_close']=asm['_mid_istream_close'];Module['_mid_song_free']=asm['_mid_song_free'];Module['_mid_init']=asm['_mid_init'];Module['_mid_song_load']=asm['_mid_song_load'];Module['_mid_song_start']=asm['_mid_song_start'];Module['_mid_song_get_num_missing_instruments']=asm['_mid_song_get_num_missing_instruments'];var _memcmp=Module['_memcmp']=asm['_memcmp'];Module['_free']=asm['_free'];var _malloc=Module._malloc=asm['_malloc'];var _strcpy=Module['_strcpy']=asm['_strcpy'];var runPostSets=Module['runPostSets']=asm['runPostSets'];Module['dynCall_ii']=asm['dynCall_ii'];Module['dynCall_vi']=asm['dynCall_vi'];Module['dynCall_iiiii']=asm['dynCall_iiiii'];Module['dynCall_viii']=asm['dynCall_viii'];Module['dynCall_v']=asm['dynCall_v'];Module['dynCall_iii']=asm['dynCall_iii'];Runtime.stackAlloc=function(size){return asm['stackAlloc'](size);};Runtime.stackSave=function(){return asm['stackSave']();};Runtime.stackRestore=function(top){asm['stackRestore'](top);};// Warning: printing of i64 values may be slightly rounded! No deep i64 math used, so precise i64 code not included\nvar i64Math=null;// === Auto-generated postamble setup entry stuff ===\nif(memoryInitializer){var applyData=function applyData(data){HEAPU8.set(data,STATIC_BASE);};addRunDependency('memory initializer');}var initialStackTop;var calledRun=false;dependenciesFulfilled=function runCaller(){// If run has never been called, and we should call run (INVOKE_RUN is true, and Module.noInitialRun is not false)\nif(!calledRun&&shouldRunNow)run();if(!calledRun)dependenciesFulfilled=runCaller;// try this again later, after new deps are fulfilled\n};Module['callMain']=Module.callMain=function callMain(args){assert(runDependencies==0,'cannot call main when async dependencies remain! (listen on __ATMAIN__)');assert(__ATPRERUN__.length==0,'cannot call main when preRun functions remain to be called');args=args||[];ensureInitRuntime();var argc=args.length+1;function pad(){for(var _i=0;_i<4-1;_i++){argv.push(0);}}var argv=[allocate(intArrayFromString('/bin/this.program'),'i8',ALLOC_NORMAL)];pad();for(var i=0;i0){console.warn('run() called, but dependencies remain, so not running');return FS;}preRun();if(runDependencies>0){// a preRun added a dependency, run will be called later\nreturn FS;}function doRun(){ensureInitRuntime();preMain();calledRun=true;if(Module['_main']&&shouldRunNow){Module['callMain'](args);}postRun();}if(Module['setStatus']){Module['setStatus']('Running...');setTimeout(function(){setTimeout(function(){Module['setStatus']('');},1);if(!ABORT)doRun();},1);}else{doRun();}return FS;}Module.run=run;/**\n * Initializes the library.\n * @function init\n * @memberof LibTiMidity\n * @param {boolean} [throwError = true] Throw an error if file/folder creation failed.\n * @instance\n */Module.init=function(){var throwError=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;// creates folders for instrument patches\nModule.createPath('/',LIBTIMIDITY_PATCH_DIRECTORY,throwError);Module.createPath(\"/\".concat(LIBTIMIDITY_PATCH_DIRECTORY),LIBTIMIDITY_PATCH_DRUM_DIRECTORY,throwError);// creates config file\nModule.createDataFile('/',LIBTIMIDITY_CONFIG_FILE,LIBTIMIDITY_CONFIG_DATA,true,true,undefined,throwError);};// shouldRunNow refers to calling main(), not run().\nvar shouldRunNow=true;if(Module['noInitialRun']){shouldRunNow=false;}Module.FS=run();this.Module=Module;};var libtimidity=new LibTiMidity_LibTiMidity();/* harmony default export */ var src_LibTiMidity = (libtimidity.Module);\n// CONCATENATED MODULE: ./src/events.js\nvar MIDI_INIT = 'MIDI_INIT';\nvar MIDI_ERROR = 'MIDI_ERROR';\nvar MIDI_STATUS = 'MIDI_STATUS';\nvar MIDI_PRELOAD = 'MIDI_PRELOAD';\nvar MIDI_LOAD_FILE = 'MIDI_LOAD_FILE';\nvar MIDI_LOAD_PATCH = 'MIDI_LOAD_PATCH';\nvar MIDI_PLAY = 'MIDI_PLAY';\nvar MIDI_PAUSE = 'MIDI_PAUSE';\nvar MIDI_RESUME = 'MIDI_RESUME';\nvar MIDI_STOP = 'MIDI_STOP';\nvar MIDI_END = 'MIDI_END';\n// CONCATENATED MODULE: ./src/EventHandler.js\n\n\n\n\nfunction ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }\n\nfunction _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { defineProperty_default()(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }\n\n\n\nvar EventHandler_EventHandler =\n/*#__PURE__*/\nfunction () {\n /**\n * @class EventHandler\n * @param {object} [configuration]\n * @param {string} [configuration.playerId = undefined] The ID of the Midi Player that sends events.\n * @param {function} [configuration.eventLogger = undefined] The function that receives event payloads.\n * @param {boolean} [configuration.logging = false] Turns ON or OFF logging to the console.\n * @return {object} An `EventHandler` instance.\n */\n function EventHandler(_ref) {\n var _this = this;\n\n var _ref$eventLogger = _ref.eventLogger,\n eventLogger = _ref$eventLogger === void 0 ? undefined : _ref$eventLogger,\n _ref$logging = _ref.logging,\n logging = _ref$logging === void 0 ? false : _ref$logging,\n _ref$playerId = _ref.playerId,\n playerId = _ref$playerId === void 0 ? undefined : _ref$playerId;\n\n classCallCheck_default()(this, EventHandler);\n\n defineProperty_default()(this, \"emitLoadFile\", function (_ref2) {\n var _ref2$message = _ref2.message,\n message = _ref2$message === void 0 ? 'Loading MIDI file...' : _ref2$message;\n\n _this.emitEvent({\n event: MIDI_LOAD_FILE,\n message: message\n });\n });\n\n defineProperty_default()(this, \"emitLoadPatch\", function (_ref3) {\n var _ref3$message = _ref3.message,\n message = _ref3$message === void 0 ? 'Loading instrument patch...' : _ref3$message;\n\n _this.emitEvent({\n event: MIDI_LOAD_PATCH,\n message: message\n });\n });\n\n defineProperty_default()(this, \"emitError\", function (_ref4) {\n var _ref4$message = _ref4.message,\n message = _ref4$message === void 0 ? 'An error occurred.' : _ref4$message,\n _ref4$error = _ref4.error,\n error = _ref4$error === void 0 ? '' : _ref4$error;\n\n _this.emitEvent({\n event: MIDI_ERROR,\n message: message,\n error: error\n });\n });\n\n defineProperty_default()(this, \"emitEvent\", function (payload) {\n var payloadWithId = _objectSpread({}, payload, {\n playerId: _this.playerId\n });\n\n if (_this.eventLogger) {\n _this.eventLogger(payloadWithId);\n } else if (_this.logging) {\n if (payloadWithId.event === MIDI_ERROR) {\n console.error(payloadWithId);\n } else {\n console.log(payloadWithId);\n }\n }\n });\n\n this.playerId = playerId;\n this.logging = logging;\n this.eventLogger = eventLogger;\n }\n /**\n * Emits an event that indicates that the MIDI player is initialized.\n * @function\n * @param {undefined}\n */\n\n\n createClass_default()(EventHandler, [{\n key: \"emitInit\",\n value: function emitInit() {\n this.emitEvent({\n event: MIDI_INIT,\n message: 'MIDI player initialized.'\n });\n }\n /**\n * Emits an event that indicates that a MIDI file is being loaded.\n * @function\n * @param {object} payload\n * @param {string} [payload.message] A message about the MIDI file being loaded.\n */\n\n }, {\n key: \"emitPlay\",\n\n /**\n * Emits an event that indicates that the MIDI player currently playing a MIDI file.\n * @function\n * @param {object} payload\n * @param {string} [payload.time] The playback position.\n */\n value: function emitPlay(_ref5) {\n var time = _ref5.time;\n this.emitEvent({\n event: MIDI_PLAY,\n time: time\n });\n }\n /**\n * Emits an event that indicates that the MIDI player has paused the playback of a file.\n * @function\n * @param {object} payload\n * @param {string} [payload.time] The playback position.\n */\n\n }, {\n key: \"emitPause\",\n value: function emitPause(_ref6) {\n var time = _ref6.time;\n this.emitEvent({\n event: MIDI_PAUSE,\n time: time\n });\n }\n /**\n * Emits an event that indicates that the MIDI player has resumed the playback of a file.\n * @function\n * @param {object} payload\n * @param {string} [payload.time] The playback position.\n */\n\n }, {\n key: \"emitResume\",\n value: function emitResume(_ref7) {\n var time = _ref7.time;\n this.emitEvent({\n event: MIDI_RESUME,\n time: time\n });\n }\n /**\n * Emits an event that indicates that the MIDI player has stopped the playback of a file.\n * @function\n * @param {undefined}\n */\n\n }, {\n key: \"emitStop\",\n value: function emitStop() {\n this.emitEvent({\n event: MIDI_STOP,\n time: 0\n });\n }\n /**\n * Emits an event that indicates that the MIDI player has reached the end of a file.\n * @function\n * @param {object} payload\n * @param {string} [payload.time] The playback position.\n */\n\n }, {\n key: \"emitEnd\",\n value: function emitEnd(_ref8) {\n var time = _ref8.time;\n this.emitEvent({\n event: MIDI_END,\n time: time\n });\n }\n /**\n * Emits an event that indicates that an error prevented the MIDI player to continue.\n * @function\n * @param {object} payload\n * @param {string} [payload.message] A message that indicates that an error occurred.\n * @param {string} [payload.error] A message that describes the details of the error.\n */\n\n }, {\n key: \"setLogger\",\n\n /**\n * Updates the configuration of the logger.\n * @function\n * @param {object} [configuration]\n * @param {function} [configuration.eventLogger = undefined] The function that receives event payloads.\n * @param {boolean} [configuration.logging = false] Turns ON or OFF logging to the console.\n */\n value: function setLogger(_ref9) {\n var _ref9$eventLogger = _ref9.eventLogger,\n eventLogger = _ref9$eventLogger === void 0 ? undefined : _ref9$eventLogger,\n _ref9$logging = _ref9.logging,\n logging = _ref9$logging === void 0 ? false : _ref9$logging;\n this.eventLogger = eventLogger;\n this.logging = logging;\n }\n }]);\n\n return EventHandler;\n}();\n\n\n// CONCATENATED MODULE: ./src/MidiPlayer.js\n\n\n\n\n\n\n\n\n\nvar isFirstInstance = true;\n\nvar MidiPlayer_MidiPlayer =\n/*#__PURE__*/\nfunction () {\n /**\n * @class MidiPlayer\n * @param {object} [configuration]\n * @param {function} [configuration.eventLogger = undefined] The function that receives event payloads.\n * @param {boolean} [configuration.logging = false] Turns ON or OFF logging to the console.\n * @param {string} [configuration.patchUrl = https://cdn.jsdelivr.net/npm/midi-instrument-patches@latest/] The public path where MIDI instrument patches can be found.\n * @param {number} [configuration.volume = 80] Set playback volume when initializing the player.\n * @property {object} context The AudioContext instance.\n * @property {function} eventLogger The function that is called to emit events.\n * @property {boolean} logging Whether console logging is ON or OFF.\n * @property {boolean} isFirstInstance Whether this is the first instance of the Midi Player or \n * @property {arrayBuffer} midiFileArray A typed array that represents the content of the MIDI.\n * @property {*} midiFileBuffer The buffer with the MIDI data.\n * @property {string} patchUrl The URL used to load MIDI instrument patches.\n * @property {string} playerId ID of this instance of Midi Player.\n * @property {number} sampleRate The sample rate of the AudioContext.\n * @property {object} source The source that plays the audio signal.\n * @property {number} startTime The time when MIDI playback started.\n * @property {number} stream The MIDI stream.\n * @property {number} volume Playback volume.\n * @property {*} waveBuffer The buffer with the MIDI data converted to WAV.\n not.\n *\n * @return {object} A `MidiPlayer` instance.\n * @example\n * import MidiPlayer from 'web-midi-player';\n *\n * const eventLogger = (payload) => {\n * console.log('Received event:', payload.event);\n * }\n *\n * const midiPlayer = new MidiPlayer({ eventLogger });\n */\n function MidiPlayer() {\n var _this = this;\n\n var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},\n _ref$eventLogger = _ref.eventLogger,\n eventLogger = _ref$eventLogger === void 0 ? undefined : _ref$eventLogger,\n _ref$logging = _ref.logging,\n logging = _ref$logging === void 0 ? false : _ref$logging,\n _ref$patchUrl = _ref.patchUrl,\n patchUrl = _ref$patchUrl === void 0 ? MIDI_DEFAULT_PATCH_URL : _ref$patchUrl,\n _ref$volume = _ref.volume,\n volume = _ref$volume === void 0 ? 80 : _ref$volume;\n\n classCallCheck_default()(this, MidiPlayer);\n\n defineProperty_default()(this, \"initPlayback\", function () {\n src_LibTiMidity.call('mid_song_start', 'void', ['number'], [_this.song]);\n\n try {\n _this.connectSource();\n\n _this.waveBuffer = src_LibTiMidity._malloc(MIDI_AUDIO_BUFFER_SIZE * 2);\n _this.startTime = _this.context.currentTime;\n } catch (error) {\n _this.eventHandler.emitError({\n message: 'Could not initialize playback.',\n error: error\n });\n\n return;\n }\n\n _this.eventHandler.emitPlay({\n time: 0\n });\n });\n\n defineProperty_default()(this, \"connectSource\", function () {\n // Warning! This feature has been marked as deprecated: https://developer.mozilla.org/en-US/docs/Web/API/BaseAudioContext/createScriptProcessor\n // See issue: https://github.com/yvesgurcan/web-midi-player/issues/29\n // However, the replacement \"AudioWorklet\" is still experimental (https://caniuse.com/#search=audioworklet)\n _this.source = _this.context.createScriptProcessor(MIDI_AUDIO_BUFFER_SIZE, 0, 1); // event handler for next buffer full of audio data\n\n _this.source.onaudioprocess = function (event) {\n return _this.handleOutput(event);\n };\n\n _this.createGainNode();\n });\n\n defineProperty_default()(this, \"emitEvent\", function (payload) {\n return _this.eventHandler.emitEvent(payload);\n });\n\n try {\n var playerId = v4_default()();\n this.playerId = playerId;\n this.eventHandler = new EventHandler_EventHandler({\n eventLogger: eventLogger,\n logging: logging,\n playerId: playerId\n });\n } catch (error) {\n console.error('Fatal error. Could not initialize event handler.');\n return;\n }\n\n try {\n this.eventLogger = eventLogger;\n this.logging = logging;\n this.patchUrl = patchUrl;\n this.volume = volume;\n this.startTime = 0;\n src_LibTiMidity.init(isFirstInstance);\n this.isFirstInstance = isFirstInstance;\n\n if (isFirstInstance) {\n isFirstInstance = false;\n }\n\n this.eventHandler.emitInit();\n } catch (error) {\n this.eventHandler.emitError({\n message: 'Could not initialize instance of MidiPlayer.',\n error: error\n });\n }\n }\n /**\n * Formats the name of a MIDI for display purposes.\n * @param {String} name Name of the MIDI song.\n * @return {String}\n */\n\n\n createClass_default()(MidiPlayer, [{\n key: \"preload\",\n\n /**\n * Loads instrument patches for a list of MIDI input.\n *\n * Please note that you can not use `parameters.items.arrayBuffer` and `parameters.items.url` concurrently.\n * @param {object} parameters\n * @param {object} [parameters.items] An array.\n * @param {arrayBuffer} [parameters.items.arrayBuffer] An array buffer containing MIDI data to play.\n * @param {string} [parameters.items.url] The URL where the MIDI file to play is located.\n * @param {object} [parameters.audioContext] An instance of the Web Audio API AudioContext interface.\n * @return {boolean} Whether instrument patches were successfully preloaded or not.\n * @example\n * const name1 = 'My MIDI file from URL';\n * const url = 'media/file.midi';\n * const name2 = 'My MIDI file from ArrayBuffer';\n * const arrayBuffer = new ArrayBuffer();\n *\n * midiPlayer.preload({\n * items: [\n * { url, name: name1 },\n * { arrayBuffer, name: name2 }\n * ]\n * });\n */\n value: function () {\n var _preload = asyncToGenerator_default()(\n /*#__PURE__*/\n regenerator_default.a.mark(function _callee() {\n var _ref2,\n _ref2$items,\n items,\n audioContext,\n i,\n item,\n url,\n arrayBuffer,\n initialized,\n data,\n _args = arguments;\n\n return regenerator_default.a.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n _ref2 = _args.length > 0 && _args[0] !== undefined ? _args[0] : {}, _ref2$items = _ref2.items, items = _ref2$items === void 0 ? [] : _ref2$items, audioContext = _ref2.audioContext;\n i = 0;\n\n case 2:\n if (!(i < items.length)) {\n _context.next = 22;\n break;\n }\n\n item = items[i];\n url = item.url, arrayBuffer = item.arrayBuffer;\n initialized = this.initAudioContext({\n audioContext: audioContext\n });\n\n if (initialized) {\n _context.next = 8;\n break;\n }\n\n return _context.abrupt(\"return\", false);\n\n case 8:\n if (this.isSourceValid({\n url: url,\n arrayBuffer: arrayBuffer\n })) {\n _context.next = 10;\n break;\n }\n\n return _context.abrupt(\"return\", false);\n\n case 10:\n _context.next = 12;\n return this.getSource({\n url: url,\n arrayBuffer: arrayBuffer\n });\n\n case 12:\n data = _context.sent;\n\n if (data) {\n _context.next = 15;\n break;\n }\n\n return _context.abrupt(\"return\", false);\n\n case 15:\n this.midiFileArray = new Int8Array(data);\n this.handleStream();\n _context.next = 19;\n return this.getInstrumentPatches();\n\n case 19:\n i++;\n _context.next = 2;\n break;\n\n case 22:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this);\n }));\n\n function preload() {\n return _preload.apply(this, arguments);\n }\n\n return preload;\n }()\n /**\n * Starts playback of MIDI input.\n *\n * Please note that you can not use `input.arrayBuffer` and `input.url` concurrently.\n * @param {object} input\n * @param {arrayBuffer} [input.arrayBuffer] An array buffer containing MIDI data to play.\n * @param {string} [input.url] The URL where the MIDI file to play is located.\n * @param {string} [input.name] A human-friendly name for the song.\n * @param {object} [input.audioContext] An instance of the Web Audio API AudioContext interface.\n * @return {boolean} Whether playback was successfully initiated or not.\n * @example\n * const name1 = 'My MIDI file from URL';\n * const url = 'media/file.midi';\n * midiPlayer.play({ url, name: name1 });\n *\n * const name2 = 'My MIDI file from ArrayBuffer';\n * const arrayBuffer = new ArrayBuffer();\n * midiPlayer.play({ arrayBuffer, name: name2 });\n */\n\n }, {\n key: \"play\",\n value: function () {\n var _play = asyncToGenerator_default()(\n /*#__PURE__*/\n regenerator_default.a.mark(function _callee2() {\n var _ref3,\n arrayBuffer,\n url,\n name,\n audioContext,\n initialized,\n data,\n loaded,\n _args2 = arguments;\n\n return regenerator_default.a.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n _ref3 = _args2.length > 0 && _args2[0] !== undefined ? _args2[0] : {}, arrayBuffer = _ref3.arrayBuffer, url = _ref3.url, name = _ref3.name, audioContext = _ref3.audioContext;\n this.stop();\n initialized = this.initAudioContext({\n audioContext: audioContext\n });\n\n if (initialized) {\n _context2.next = 5;\n break;\n }\n\n return _context2.abrupt(\"return\", false);\n\n case 5:\n if (this.isSourceValid({\n url: url,\n arrayBuffer: arrayBuffer\n })) {\n _context2.next = 7;\n break;\n }\n\n return _context2.abrupt(\"return\", false);\n\n case 7:\n this.eventHandler.emitLoadFile({\n message: \"Loading\".concat(MidiPlayer.formatMidiName(name), \"...\")\n });\n _context2.next = 10;\n return this.getSource({\n url: url,\n arrayBuffer: arrayBuffer\n });\n\n case 10:\n data = _context2.sent;\n\n if (data) {\n _context2.next = 13;\n break;\n }\n\n return _context2.abrupt(\"return\", false);\n\n case 13:\n _context2.next = 15;\n return this.loadSong({\n arrayBuffer: data\n });\n\n case 15:\n loaded = _context2.sent;\n\n if (!loaded) {\n _context2.next = 18;\n break;\n }\n\n return _context2.abrupt(\"return\", this.initPlayback());\n\n case 18:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function play() {\n return _play.apply(this, arguments);\n }\n\n return play;\n }()\n }, {\n key: \"initAudioContext\",\n value: function initAudioContext(_ref4) {\n var audioContext = _ref4.audioContext;\n\n try {\n // AudioContext must be fired close to the touch/click event initiated by the user to work in Safari\n this.context = audioContext || new (window.AudioContext || window.webkitAudioContext)();\n this.sampleRate = this.context.sampleRate;\n return true;\n } catch (error) {\n this.eventHandler.emitError({\n message: \"Could not set AudioContext.\",\n error: error\n });\n return false;\n }\n }\n }, {\n key: \"isSourceValid\",\n value: function isSourceValid(_ref5) {\n var arrayBuffer = _ref5.arrayBuffer,\n url = _ref5.url;\n\n if (!arrayBuffer && !url) {\n this.eventHandler.emitError({\n message: \"Unknown source. URL or array buffer can't be both undefined to start playback.\"\n });\n return false;\n }\n\n if (arrayBuffer && url) {\n this.eventHandler.emitError({\n message: 'Ambiguous source. MIDI data must originate either from a URL or an array buffer to start playback. Not both.'\n });\n return false;\n }\n\n return true;\n }\n }, {\n key: \"getSource\",\n value: function () {\n var _getSource = asyncToGenerator_default()(\n /*#__PURE__*/\n regenerator_default.a.mark(function _callee3(_ref6) {\n var arrayBuffer, url, response;\n return regenerator_default.a.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n arrayBuffer = _ref6.arrayBuffer, url = _ref6.url;\n\n if (!arrayBuffer) {\n _context3.next = 3;\n break;\n }\n\n return _context3.abrupt(\"return\", arrayBuffer);\n\n case 3:\n _context3.prev = 3;\n _context3.next = 6;\n return fetch(url);\n\n case 6:\n response = _context3.sent;\n\n if (!(response.status !== 200)) {\n _context3.next = 10;\n break;\n }\n\n this.eventHandler.emitError({\n message: \"Could not retrieve MIDI\".concat(MidiPlayer.formatMidiName(name), \".\"),\n error: \"Status code: \".concat(response.status, \".\")\n });\n return _context3.abrupt(\"return\", false);\n\n case 10:\n return _context3.abrupt(\"return\", response.arrayBuffer());\n\n case 13:\n _context3.prev = 13;\n _context3.t0 = _context3[\"catch\"](3);\n this.eventHandler.emitError({\n message: \"Could not retrieve MIDI\".concat(MidiPlayer.formatMidiName(name), \".\"),\n error: _context3.t0\n });\n return _context3.abrupt(\"return\", null);\n\n case 17:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this, [[3, 13]]);\n }));\n\n function getSource(_x) {\n return _getSource.apply(this, arguments);\n }\n\n return getSource;\n }()\n }, {\n key: \"loadSong\",\n value: function () {\n var _loadSong = asyncToGenerator_default()(\n /*#__PURE__*/\n regenerator_default.a.mark(function _callee4(_ref7) {\n var arrayBuffer, options;\n return regenerator_default.a.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n arrayBuffer = _ref7.arrayBuffer;\n this.midiFileArray = new Int8Array(arrayBuffer);\n _context4.prev = 2;\n options = this.handleStream();\n _context4.next = 6;\n return this.getInstrumentPatches();\n\n case 6:\n // we need to reload the MIDI once the instrument patches have been loaded\n this.stream = src_LibTiMidity.call('mid_istream_open_mem', 'number', ['number', 'number', 'number'], [this.midiFileBuffer, this.midiFileArray.length, false]);\n this.song = src_LibTiMidity.call('mid_song_load', 'number', ['number', 'number'], [this.stream, options]);\n src_LibTiMidity.call('mid_istream_close', 'number', ['number'], [this.stream]);\n _context4.next = 15;\n break;\n\n case 11:\n _context4.prev = 11;\n _context4.t0 = _context4[\"catch\"](2);\n this.eventHandler.emitError({\n message: 'Could not load song.',\n error: _context4.t0\n });\n return _context4.abrupt(\"return\", false);\n\n case 15:\n return _context4.abrupt(\"return\", true);\n\n case 16:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this, [[2, 11]]);\n }));\n\n function loadSong(_x2) {\n return _loadSong.apply(this, arguments);\n }\n\n return loadSong;\n }()\n }, {\n key: \"handleStream\",\n value: function handleStream() {\n this.midiFileBuffer = src_LibTiMidity._malloc(this.midiFileArray.length);\n src_LibTiMidity.writeArrayToMemory(this.midiFileArray, this.midiFileBuffer);\n src_LibTiMidity.call('mid_init', 'number', [], []);\n this.stream = src_LibTiMidity.call('mid_istream_open_mem', 'number', ['number', 'number', 'number'], [this.midiFileBuffer, this.midiFileArray.length, false]);\n var options = src_LibTiMidity.call('mid_create_options', 'number', ['number', 'number', 'number', 'number'], [this.sampleRate, MIDI_AUDIO_S16LSB, 1, MIDI_AUDIO_BUFFER_SIZE * 2]);\n this.song = src_LibTiMidity.call('mid_song_load', 'number', ['number', 'number'], [this.stream, options]);\n src_LibTiMidity.call('mid_istream_close', 'number', ['number'], [this.stream]);\n return options;\n }\n }, {\n key: \"getInstrumentPatches\",\n value: function () {\n var _getInstrumentPatches = asyncToGenerator_default()(\n /*#__PURE__*/\n regenerator_default.a.mark(function _callee5() {\n var missingPatchCount, i, missingPatch;\n return regenerator_default.a.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n missingPatchCount = src_LibTiMidity.call('mid_song_get_num_missing_instruments', 'number', ['number'], [this.song]);\n\n if (!(missingPatchCount > 0)) {\n _context5.next = 18;\n break;\n }\n\n this.eventHandler.emitLoadPatch({\n message: \"Loading \".concat(missingPatchCount, \" instrument patches...\")\n });\n i = 0;\n\n case 4:\n if (!(i < missingPatchCount)) {\n _context5.next = 18;\n break;\n }\n\n missingPatch = src_LibTiMidity.call('mid_song_get_missing_instrument', 'string', ['number', 'number'], [this.song, i]);\n _context5.prev = 6;\n _context5.next = 9;\n return src_LibTiMidity.loadPatchFromUrl(this.patchUrl, missingPatch);\n\n case 9:\n _context5.next = 15;\n break;\n\n case 11:\n _context5.prev = 11;\n _context5.t0 = _context5[\"catch\"](6);\n this.eventHandler.emitError({\n message: \"Could not retrieve missing instrument patch \".concat(missingPatch ? \"'\".concat(missingPatch, \"'\") : \"#\".concat(i), \".\"),\n error: _context5.t0\n });\n return _context5.abrupt(\"return\", false);\n\n case 15:\n i++;\n _context5.next = 4;\n break;\n\n case 18:\n case \"end\":\n return _context5.stop();\n }\n }\n }, _callee5, this, [[6, 11]]);\n }));\n\n function getInstrumentPatches() {\n return _getInstrumentPatches.apply(this, arguments);\n }\n\n return getInstrumentPatches;\n }()\n }, {\n key: \"createGainNode\",\n value: function createGainNode() {\n this.gainNode = this.context.createGain();\n this.gainNode.gain.value = this.volume / 100; // connects the gain node (controls volume) to the context's destination (the speakers)\n\n this.gainNode.connect(this.context.destination); // connects the source to the gain node\n\n this.source.connect(this.gainNode);\n }\n }, {\n key: \"handleOutput\",\n value: function handleOutput(_ref8) {\n var outputBuffer = _ref8.outputBuffer;\n\n try {\n var time = this.context.currentTime - this.startTime;\n this.eventHandler.emitPlay({\n time: time\n }); // collect new wave data from LibTiMidity into waveBuffer\n\n var readWaveBytes = src_LibTiMidity.call('mid_song_read_wave', 'number', ['number', 'number', 'number', 'number'], [this.song, this.waveBuffer, MIDI_AUDIO_BUFFER_SIZE * 2, false]);\n\n if (readWaveBytes === 0) {\n this.stop();\n this.eventHandler.emitEnd({\n time: time\n });\n return;\n } // loop through the samples\n\n\n for (var i = 0; i < MIDI_AUDIO_BUFFER_SIZE; i++) {\n if (i < readWaveBytes) {\n // converts PCM data from sint16 in C to number in JavaScript (range: -1.0 .. +1.0)\n // this is where the data is converted to waveform audio signal\n outputBuffer.getChannelData(0)[i] = src_LibTiMidity.getValue(this.waveBuffer + 2 * i, 'i16') / MAX_I16;\n } else {\n // fill end of buffer with zeroes, may happen at the end of a piece\n outputBuffer.getChannelData(0)[i] = 0;\n }\n }\n } catch (error) {\n this.eventHandler.emitError({\n message: 'Could not process audio.',\n error: error\n });\n }\n }\n /**\n * Pauses playback of MIDI input.\n * @param {undefined}\n * @return {boolean} Whether playback was successfully paused or not.\n * @example\n * midiPlayer.pause();\n */\n\n }, {\n key: \"pause\",\n value: function pause() {\n try {\n var time = 0;\n\n if (this.context) {\n this.context.suspend();\n time = this.context.currentTime - this.startTime;\n }\n\n this.eventHandler.emitPause({\n time: time\n });\n return true;\n } catch (error) {\n this.eventHandler.emitError({\n message: 'Could not pause playback.',\n error: error\n });\n return false;\n }\n }\n /**\n * Resumes playback of MIDI input.\n * @param {undefined}\n * @return {boolean} Whether playback was successfully ressumed or not.\n * @example\n * midiPlayer.resume();\n */\n\n }, {\n key: \"resume\",\n value: function resume() {\n try {\n var time = 0;\n\n if (this.context) {\n this.context.resume();\n time = this.context.currentTime - this.startTime;\n }\n\n this.eventHandler.emitResume({\n time: time\n });\n return true;\n } catch (error) {\n this.eventHandler.emitError({\n message: 'Could not resume playback.',\n error: error\n });\n return false;\n }\n }\n /**\n * Stops playback of MIDI input.\n * @param {undefined}\n * @return {boolean} Whether playback was successfully stopped or not.\n * @example\n * midiPlayer.stop();\n */\n\n }, {\n key: \"stop\",\n value: function stop() {\n try {\n if (this.source) {\n this.context.close();\n this.disconnectSource();\n this.freeMemory();\n src_LibTiMidity.call('mid_exit', 'void', [], []);\n this.song = 0;\n }\n\n this.startTime = 0;\n this.eventHandler.emitStop();\n return true;\n } catch (error) {\n this.eventHandler.emitError({\n message: 'Could not stop playback.',\n error: error\n });\n return false;\n }\n }\n /**\n * Gets the current volume of the playback.\n * @function\n * @param {undefined}\n * @return {number} The current volume.\n * @example\n * const volume = midiPlayer.getVolume();\n */\n\n }, {\n key: \"getVolume\",\n value: function getVolume() {\n return this.volume;\n }\n /**\n * Sets the current volume of the playback.\n * @function\n * @param {object} input\n * @param {number} input.volume The new value for the volume (also known as gain). Typically, a whole number between 0 and 100 but can actually be negative, greater, or even a decimal number.\n * @example\n * midiPlayer.setVolume({ volume: 80 });\n */\n\n }, {\n key: \"setVolume\",\n value: function setVolume(_ref9) {\n var volume = _ref9.volume;\n\n if (Number.isNaN(parseFloat(volume))) {\n this.eventHandler.emitError({\n message: \"Volume must be parsable into a number. Got '\".concat(volume, \"' instead.\")\n });\n return;\n }\n\n this.volume = volume;\n this.gainNode.gain.value = volume / 100;\n }\n }, {\n key: \"freeMemory\",\n value: function freeMemory() {\n src_LibTiMidity._free(this.waveBuffer);\n\n src_LibTiMidity._free(this.midiFileBuffer);\n\n src_LibTiMidity.call('mid_song_free', 'void', ['number'], [this.song]);\n } // terminate playback\n\n }, {\n key: \"disconnectSource\",\n value: function disconnectSource() {\n this.source.disconnect();\n this.source = null;\n }\n /**\n * Send custom payloads to the event logger.\n * @function\n * @param {object} payload\n * @param {string} [payload.event] The name of the event.\n * @param {string} [payload.message] A message that described the event.\n * @example\n * const event = 'MIDI_CUSTOM_EVENT';\n * const message = 'Something happened.';\n * midiPlayer.emitEvent({ event, message });\n */\n\n }, {\n key: \"setLogger\",\n\n /**\n * Updates the configuration of the logger.\n * @param {object} [configuration]\n * @param {function} [configuration.eventLogger = undefined] The function that receives event payloads.\n * @param {boolean} [configuration.logging = false] Turns ON or OFF logging to the console.\n * @example\n * const eventLogger = (payload) => {\n * console.log('Received event:', payload.event);\n * }\n * midiPlayer.setLogger({ eventLogger });\n */\n value: function setLogger(_ref10) {\n var _ref10$eventLogger = _ref10.eventLogger,\n eventLogger = _ref10$eventLogger === void 0 ? undefined : _ref10$eventLogger,\n _ref10$logging = _ref10.logging,\n logging = _ref10$logging === void 0 ? false : _ref10$logging;\n this.eventLogger = eventLogger;\n this.logging = logging;\n this.eventHandler.setLogger({\n eventLogger: eventLogger,\n logging: logging\n });\n }\n }], [{\n key: \"formatMidiName\",\n value: function formatMidiName(name) {\n return name ? \" '\".concat(name, \"'\") : '';\n }\n }]);\n\n return MidiPlayer;\n}();\n\n\n// CONCATENATED MODULE: ./src/index.js\n\n/* harmony default export */ var src = __webpack_exports__[\"default\"] = (MidiPlayer_MidiPlayer);//# sourceURL=[module]\n//# sourceMappingURL=data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wLFxuICAgIDY2LFxuICAgIDI0NixcbiAgICA4LFxuICAgIDAsXG4gICAgMTc0LFxuICAgIDEyNixcbiAgICA5LFxuICAgIDAsXG4gICAgNTUsXG4gICAgMTUsXG4gICAgMTAsXG4gICAgMCxcbiAgICA4OCxcbiAgICAxNjgsXG4gICAgMTAsXG4gICAgMCxcbiAgICAxNDksXG4gICAgNzQsXG4gICAgMTEsXG4gICAgMCxcbiAgICAxMTksXG4gICAgMjQ2LFxuICAgIDExLFxuICAgIDAsXG4gICAgMTQ1LFxuICAgIDE3MixcbiAgICAxMixcbiAgICAwLFxuICAgIDEyOCxcbiAgICAxMDksXG4gICAgMTMsXG4gICAgMCxcbiAgICAyMzIsXG4gICAgNTcsXG4gICAgMTQsXG4gICAgMCxcbiAgICAxMTksXG4gICAgMTgsXG4gICAgMTUsXG4gICAgMCxcbiAgICAyMzAsXG4gICAgMjQ3LFxuICAgIDE1LFxuICAgIDAsXG4gICAgMjUxLFxuICAgIDIzNCxcbiAgICAxNixcbiAgICAwLFxuICAgIDEzMSxcbiAgICAyMzYsXG4gICAgMTcsXG4gICAgMCxcbiAgICA5MixcbiAgICAyNTMsXG4gICAgMTgsXG4gICAgMCxcbiAgICAxMTAsXG4gICAgMzAsXG4gICAgMjAsXG4gICAgMCxcbiAgICAxNzcsXG4gICAgODAsXG4gICAgMjEsXG4gICAgMCxcbiAgICA0MixcbiAgICAxNDksXG4gICAgMjIsXG4gICAgMCxcbiAgICAyMzgsXG4gICAgMjM2LFxuICAgIDIzLFxuICAgIDAsXG4gICAgMzUsXG4gICAgODksXG4gICAgMjUsXG4gICAgMCxcbiAgICAwLFxuICAgIDIxOSxcbiAgICAyNixcbiAgICAwLFxuICAgIDIwNyxcbiAgICAxMTUsXG4gICAgMjgsXG4gICAgMCxcbiAgICAyMzcsXG4gICAgMzYsXG4gICAgMzAsXG4gICAgMCxcbiAgICAyMDUsXG4gICAgMjM5LFxuICAgIDMxLFxuICAgIDAsXG4gICAgMjQ1LFxuIC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SxcbiAgICAxMTksXG4gICAgODQsXG4gICAgNjMsXG4gICAgMjQwLFxuICAgIDYzLFxuICAgIDE4MixcbiAgICAxMDYsXG4gICAgMTM3LFxuICAgIDE5MCxcbiAgICA2OCxcbiAgICA2NCxcbiAgICAyNDAsXG4gICAgNjMsXG4gICAgMCxcbiAgICA2NyxcbiAgICAyNDMsXG4gICAgMTksXG4gICAgNTMsXG4gICAgNjUsXG4gICAgMjQwLFxuICAgIDYzLFxuICAgIDIxMixcbiAgICA5MCxcbiAgICA2MyxcbiAgICAxMTksXG4gICAgMzcsXG4gICAgNjYsXG4gICAgMjQwLFxuICAgIDYzLFxuICAgIDEzMyxcbiAgICAxMjcsXG4gICAgMTEwLFxuICAgIDIzMixcbiAgICAyMSxcbiAgICA2NyxcbiAgICAyNDAsXG4gICAgNjMsXG4gICAgMTE0LFxuICAgIDEyNixcbiAgICAxMjksXG4gICAgMTAzLFxuICAgIDYsXG4gICAgNjgsXG4gICAgMjQwLFxuICAgIDYzLFxuICAgIDcsXG4gICAgMzcsXG4gICAgMTIxLFxuICAgIDI0NCxcbiAgICAyNDYsXG4gICAgNjgsXG4gICAgMjQwLFxuICAgIDYzLFxuICAgIDE4NSxcbiAgICA2NCxcbiAgICA4NixcbiAgICAxNDMsXG4gICAgMjMxLFxuICAgIDY5LFxuICAgIDI0MCxcbiAgICA2MyxcbiAgICAxMixcbiAgICAxNTksXG4gICAgMjUsXG4gICAgNTYsXG4gICAgMjE2LFxuICAgIDcwLFxuICAgIDI0MCxcbiAgICA2MyxcbiAgICAxNDEsXG4gICAgMTMsXG4gICAgMTk2LFxuICAgIDIzOCxcbiAgICAyMDAsXG4gICAgNzEsXG4gICAgMjQwLFxuICAgIDYzLFxuICAgIDIxNixcbiAgICA4OSxcbiAgICA4NixcbiAgICAxNzksXG4gICAgMTg1LFxuICAgIDcyLFxuICAgIDI0MCxcbiAgICA2MyxcbiAgICAxNDYsXG4gICAgODEsXG4gICAgMjA5LFxuICAgIDEzMyxcbi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cyLFxuICAgIDg0LFxuICAgIDg0LFxuICAgIDgwLFxuICAgIDExMixcbiAgICAxMTQsXG4gICAgMTExLFxuICAgIDEyMCxcbiAgICAxMjEsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICA5OSxcbiAgICAxMTEsXG4gICAgMTA5LFxuICAgIDEwOSxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDM1LFxuICAgIDEwMSxcbiAgICAxMjAsXG4gICAgMTE2LFxuICAgIDEwMSxcbiAgICAxMTAsXG4gICAgMTE1LFxuICAgIDEwNSxcbiAgICAxMTEsXG4gICAgMTEwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDc4LFxuICAgIDExNyxcbiAgICAxMDksXG4gICAgMzIsXG4gICAgNzcsXG4gICAgMTA1LFxuICAgIDExNSxcbiAgICAxMTUsXG4gICAgMTA1LFxuICAgIDExMCxcbiAgICAxMDMsXG4gICAgMzIsXG4gICAgMTEyLFxuICAgIDk3LFxuICAgIDExNixcbiAgICA5OSxcbiAgICAxMDQsXG4gICAgMTAxLFxuICAgIDExNSxcbiAgICA1OCxcbiAgICAzMixcbiAgICAzNyxcbiAgICAxMDAsXG4gICAgMTAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDM3LFxuICAgIDExNSxcbiAgICA1OCxcbiAgICAzMixcbiAgICAxMDgsXG4gICAgMTA1LFxuICAgIDExMCxcbiAgICAxMDEsXG4gICAgMzIsXG4gICAgMzcsXG4gICAgMTAwLFxuICAgIDU4LFxuICAgIDMyLFxuICAgIDExNSxcbiAgICAxMTYsXG4gICAgMTE0LFxuICAgIDEwNSxcbiAgICAxMTIsXG4gICAgMzIsXG4gICAgMTA5LFxuICAgIDExNyxcbiAgICAxMTUsXG4gICAgMTE2LFxuICAgIDMyLFxuICAgIDk4LFxuICAgIDEwMSxcbiAgICAzMixcbiAgICAxMDEsXG4gICAgMTEwLFxuICAgIDExOCxcbiAgICA0NCxcbiAgICAzMixcbiAgICAxMDgsXG4gICAgMTExLFxuICAgIDExMSxcbiAgICAxMTIsXG4gICAgNDQsXG4gICAgMzIsXG4gICAgMTExLFxuICAgIDExNCxcbiAgICAzMixcbiAgICAxMTYsXG4gICAgOTcsXG4gICAgMTA1LFxuICAgIDEwOCxcbiAgICAxMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMTE2LFxuICAgIDk3LFxuICAgIDEwNSxcbiAgICAxMDgsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAxMTUsXG4gICAgMTE2LFxuICAgIDExNCxcbiAgICAxMDUsXG4gICAgMTEyLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDM3LFxuICAgIDExNSxcbiAgICA1OCxcbiAgICAzMixcbiAgICAxMDgsXG4gICAgMTA1LFxuICAgIDExMCxcbiAgICAxMDEsXG4gICAgMzIsXG4gICAgMzcsXG4gICAgMTAwLFxuICAgIDU4LFxuICAgIDMyLFxuICAgIDEwNyxcbiAgICAxMDEsXG4gICAgMTAxLFxuICAgIDExMixcbiAgICAzMixcbiAgICAxMDksXG4gICAgMTE3LFxuICAgIDExNSxcbiAgICAxMTYsXG4gICAgMzIsXG4gICAgOTgsXG4gICAgMTAxLFxuICAgIDMyLFxuICAgIDEwMSxcbiAgICAxMTAsXG4gICAgMTE4LFxuICAgIDMyLFxuICAgIDExMSxcbiAgICAxMTQsXG4gICAgMzIsXG4gICAgMTA4LFxuICAgIDExMSxcbiAgICAxMTEsXG4gICAgMTEyLFxuICAgIDEwLFxuICAgIDAsXG4gICAgMCxcbiAgICAxMDgsXG4gICAgMTExLFxuICAgIDExMSxcbiAgICAxMTIsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAxMDEsXG4gICAgMTEwLFxuICAgIDExOCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMTA3LFxuICAgIDEwMSxcbiAgICAxMDEsXG4gICAgMTEyLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMzcsXG4gICAgMTE1LFxuICAgIDU4LFxuICAgIDMyLFxuICAgIDEwOCxcbiAgICAxMDUsXG4gICAgMTEwLFxuICAgIDEwMSxcbiAgICAzMixcbiAgICAzNyxcbiAgICAxMDAsXG4gICAgNTgsXG4gICAgMzIsXG4gICAgMTEyLFxuICAgIDk3LFxuICAgIDExMCxcbiAgICAxMTAsXG4gICAgMTA1LFxuICAgIDExMCxcbiAgICAxMDMsXG4gICAgMzIsXG4gICAgMTA5LFxuICAgIDExNyxcbiAgICAxMTUsXG4gICAgMTE2LFxuICAgIDMyLFxuICAgIDk4LFxuICAgIDEwMSxcbiAgICAzMixcbiAgICAxMDgsXG4gICAgMTAxLFxuICAgIDEwMixcbiAgICAxMTYsXG4gICAgNDQsXG4gICAgMzIsXG4gICAgMTE0LFxuICAgIDEwNSxcbiAgICAxMDMsXG4gICAgMTA0LFxuICAgIDExNixcbiAgICA0NCxcbiAgICAzMixcbiAgICA5OSxcbiAgICAxMDEsXG4gICAgMTEwLFxuICAgIDExNixcbiAgICAxMDEsXG4gICAgMTE0LFxuICAgIDQ0LFxuICAgIDMyLFxuICAgIDExMSxcbiAgICAxMTQsXG4gICAgMzIsXG4gICAgOTgsXG4gICAgMTAxLFxuICAgIDExNixcbiAgICAxMTksXG4gICAgMTAxLFxuICAgIDEwMSxcbiAgICAxMTAsXG4gICAgMzIsXG4gICAgNDUsXG4gICAgNDksXG4gICAgNDgsXG4gICAgNDgsXG4gICAgMzIsXG4gICAgOTcsXG4gICAgMTEwLFxuICAgIDEwMCxcbiAgICAzMixcbiAgICA0OSxcbiAgICA0OCxcbiAgICA0OCxcbiAgICAxMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAzMixcbiAgICA5LFxuICAgIDE2MCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMTE0LFxuICAgIDEwNSxcbiAgICAxMDMsXG4gICAgMTA0LFxuICAgIDExNixcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAxMDgsXG4gICAgMTAxLFxuICAgIDEwMixcbiAgICAxMTYsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICA3NyxcbiAgICAxMDUsXG4gICAgMTE1LFxuICAgIDExNSxcbiAgICAxMDUsXG4gICAgMTEwLFxuICAgIDEwMyxcbiAgICAzMixcbiAgICAxMTIsXG4gICAgOTcsXG4gICAgMTE2LFxuICAgIDk5LFxuICAgIDEwNCxcbiAgICA1OCxcbiAgICAzMixcbiAgICAzNyxcbiAgICAxMTUsXG4gICAgMTAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgOTksXG4gICAgMTAxLFxuICAgIDExMCxcbiAgICAxMTYsXG4gICAgMTAxLFxuICAgIDExNCxcbiAgICAwLFxuICAgIDAsXG4gICAgMTEyLFxuICAgIDk3LFxuICAgIDExMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMzcsXG4gICAgMTE1LFxuICAgIDU4LFxuICAgIDMyLFxuICAgIDEwOCxcbiAgICAxMDUsXG4gICAgMTEwLFxuICAgIDEwMSxcbiAgICAzMixcbiAgICAzNyxcbiAgICAxMDAsXG4gICAgNTgsXG4gICAgMzIsXG4gICAgMTEwLFxuICAgIDExMSxcbiAgICAxMTYsXG4gICAgMTAxLFxuICAgIDMyLFxuICAgIDEwOSxcbiAgICAxMTcsXG4gICAgMTE1LFxuICAgIDExNixcbiAgICAzMixcbiAgICA5OCxcbiAgICAxMDEsXG4gICAgMzIsXG4gICAgOTgsXG4gICAgMTAxLFxuICAgIDExNixcbiAgICAxMTksXG4gICAgMTAxLFxuICAgIDEwMSxcbiAgICAxMTAsXG4gICAgMzIsXG4gICAgNDgsXG4gICAgMzIsXG4gICAgOTcsXG4gICAgMTEwLFxuICAgIDEwMCxcbiAgICAzMixcbiAgICA0OSxcbiAgICA1MCxcbiAgICA1NSxcbiAgICAxMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDExMCxcbiAgICAxMTEsXG4gICAgMTE2LFxuICAgIDEwMSxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDM3LFxuICAgIDExNSxcbiAgICA1OCxcbiAgICAzMixcbiAgICAxMDgsXG4gICAgMTA1LFxuICAgIDExMCxcbiAgICAxMDEsXG4gICAgMzIsXG4gICAgMzcsXG4gICAgMTAwLFxuICAgIDU4LFxuICAgIDMyLFxuICAgIDk3LFxuICAgIDEwOSxcbiAgICAxMTIsXG4gICAgMTA4LFxuICAgIDEwNSxcbiAgICAxMDIsXG4gICAgMTA1LFxuICAgIDk5LFxuICAgIDk3LFxuICAgIDExNixcbiAgICAxMDUsXG4gICAgMTExLFxuICAgIDExMCxcbiAgICAzMixcbiAgICAxMDksXG4gICAgMTE3LFxuICAgIDExNSxcbiAgICAxMTYsXG4gICAgMzIsXG4gICAgOTgsXG4gICAgMTAxLFxuICAgIDMyLFxuICAgIDk4LFxuICAgIDEwMSxcbiAgICAxMTYsXG4gICAgMTE5LFxuICAgIDEwMSxcbiAgICAxMDEsXG4gICAgMTEwLFxuICAgIDMyLFxuICAgIDQ4LFxuICAgIDMyLFxuICAgIDk3LFxuICAgIDExMCxcbiAgICAxMDAsXG4gICAgMzIsXG4gICAgMzcsXG4gICAgMTAwLFxuICAgIDEwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgOTcsXG4gICAgMTA5LFxuICAgIDExMixcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMzcsXG4gICAgMTE1LFxuICAgIDU4LFxuICAgIDMyLFxuICAgIDEwOCxcbiAgICAxMDUsXG4gICAgMTEwLFxuICAgIDEwMSxcbiAgICAzMixcbiAgICAzNyxcbiAgICAxMDAsXG4gICAgNTgsXG4gICAgMzIsXG4gICAgOTgsXG4gICAgOTcsXG4gICAgMTAwLFxuICAgIDMyLFxuICAgIDExMixcbiAgICA5NyxcbiAgICAxMTYsXG4gICAgOTksXG4gICAgMTA0LFxuICAgIDMyLFxuICAgIDExMSxcbiAgICAxMTIsXG4gICAgMTE2LFxuICAgIDEwNSxcbiAgICAxMTEsXG4gICAgMTEwLFxuICAgIDMyLFxuICAgIDM3LFxuICAgIDExNSxcbiAgICAxMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDM3LFxuICAgIDExNSxcbiAgICA1OCxcbiAgICAzMixcbiAgICAxMDgsXG4gICAgMTA1LFxuICAgIDExMCxcbiAgICAxMDEsXG4gICAgMzIsXG4gICAgMzcsXG4gICAgMTAwLFxuICAgIDU4LFxuICAgIDMyLFxuICAgIDc3LFxuICAgIDExNyxcbiAgICAxMTUsXG4gICAgMTE2LFxuICAgIDMyLFxuICAgIDExNSxcbiAgICAxMTIsXG4gICAgMTAxLFxuICAgIDk5LFxuICAgIDEwNSxcbiAgICAxMDIsXG4gICAgMTIxLFxuICAgIDMyLFxuICAgIDExNixcbiAgICAxMTEsXG4gICAgMTEwLFxuICAgIDEwMSxcbiAgICAzMixcbiAgICA5OCxcbiAgICA5NyxcbiAgICAxMTAsXG4gICAgMTA3LFxuICAgIDMyLFxuICAgIDExMSxcbiAgICAxMTQsXG4gICAgMzIsXG4gICAgMTAwLFxuICAgIDExNCxcbiAgICAxMTcsXG4gICAgMTA5LFxuICAgIDMyLFxuICAgIDExNSxcbiAgICAxMDEsXG4gICAgMTE2LFxuICAgIDMyLFxuICAgIDk4LFxuICAgIDEwMSxcbiAgICAxMDIsXG4gICAgMTExLFxuICAgIDExNCxcbiAgICAxMDEsXG4gICAgMzIsXG4gICAgOTcsXG4gICAgMTE1LFxuICAgIDExNSxcbiAgICAxMDUsXG4gICAgMTAzLFxuICAgIDExMCxcbiAgICAxMDksXG4gICAgMTAxLFxuICAgIDExMCxcbiAgICAxMTYsXG4gICAgMTAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgNjcsXG4gICAgMTExLFxuICAgIDExMCxcbiAgICAxMDIsXG4gICAgMTA1LFxuICAgIDEwMyxcbiAgICAxMTcsXG4gICAgMTE0LFxuICAgIDk3LFxuICAgIDExNixcbiAgICAxMDUsXG4gICAgMTExLFxuICAgIDExMCxcbiAgICAzMixcbiAgICAxMDIsXG4gICAgMTA1LFxuICAgIDEwOCxcbiAgICAxMDEsXG4gICAgMzIsXG4gICAgMzcsXG4gICAgMTE1LFxuICAgIDMyLFxuICAgIDExMCxcbiAgICAxMTEsXG4gICAgMTE2LFxuICAgIDMyLFxuICAgIDEwMixcbiAgICAxMTEsXG4gICAgMTE3LFxuICAgIDExMCxcbiAgICAxMDAsXG4gICAgMTAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDM3LFxuICAgIDExNSxcbiAgICA1OCxcbiAgICAzMixcbiAgICAxMDgsXG4gICAgMTA1LFxuICAgIDExMCxcbiAgICAxMDEsXG4gICAgMzIsXG4gICAgMzcsXG4gICAgMTAwLFxuICAgIDU4LFxuICAgIDMyLFxuICAgIDgwLFxuICAgIDExNCxcbiAgICAxMTEsXG4gICAgMTAzLFxuICAgIDExNCxcbiAgICA5NyxcbiAgICAxMDksXG4gICAgMzIsXG4gICAgMTA5LFxuICAgID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csXG4gICAgMTE1LFxuICAgIDExNixcbiAgICAzMixcbiAgICA5OCxcbiAgICAxMDEsXG4gICAgMzIsXG4gICAgOTgsXG4gICAgMTAxLFxuICAgIDExNixcbiAgICAxMTksXG4gICAgMTAxLFxuICAgIDEwMSxcbiAgICAxMTAsXG4gICAgMzIsXG4gICAgNDgsXG4gICAgMzIsXG4gICAgOTcsXG4gICAgMTEwLFxuICAgIDEwMCxcbiAgICAzMixcbiAgICA0OSxcbiAgICA1MCxcbiAgICA1NSxcbiAgICAxMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDM3LFxuICAgIDExNSxcbiAgICA1OCxcbiAgICAzMixcbiAgICAxMDgsXG4gICAgMTA1LFxuICAgIDExMCxcbiAgICAxMDEsXG4gICAgMzIsXG4gICAgMzcsXG4gICAgMTAwLFxuICAgIDU4LFxuICAgIDMyLFxuICAgIDc4LFxuICAgIDExMSxcbiAgICAzMixcbiAgICA5OCxcbiAgICA5NyxcbiAgICAxMTAsXG4gICAgMTA3LFxuICAgIDMyLFxuICAgIDExMCxcbiAgICAxMTcsXG4gICAgMTA5LFxuICAgIDk4LFxuICAgIDEwMSxcbiAgICAxMTQsXG4gICAgMzIsXG4gICAgMTAzLFxuICAgIDEwNSxcbiAgICAxMTgsXG4gICAgMTAxLFxuICAgIDExMCxcbiAgICAxMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICA5OCxcbiAgICA5NyxcbiAgICAxMTAsXG4gICAgMTA3LFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMzcsXG4gICAgMTE1LFxuICAgIDU4LFxuICAgIDMyLFxuICAgIDEwOCxcbiAgICAxMDUsXG4gICAgMTEwLFxuICAgIDEwMSxcbiAgICAzMixcbiAgICAzNyxcbiAgICAxMDAsXG4gICAgNTgsXG4gICAgMzIsXG4gICAgNjgsXG4gICAgMTE0LFxuICAgIDExNyxcbiAgICAxMDksXG4gICAgMzIsXG4gICAgMTE1LFxuICAgIDEwMSxcbiAgICAxMTYsXG4gICAgMzIsXG4gICAgMTA5LFxuICAgIDExNyxcbiAgICAxMTUsXG4gICAgMTE2LFxuICAgIDMyLFxuICAgIDk4LFxuICAgIDEwMSxcbiAgICAzMixcbiAgICA5OCxcbiAgICAxMDEsXG4gICAgMTE2LFxuICAgIDExOSxcbiAgICAxMDEsXG4gICAgMTAxLFxuICAgIDExMCxcbiAgICAzMixcbiAgICA0OCxcbiAgICAzMixcbiAgICA5NyxcbiAgICAxMTAsXG4gICAgMTAwLFxuICAgIDMyLFxuICAgIDQ5LFxuICAgIDUwLFxuICAgIDU1LFxuICAgIDEwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAzNyxcbiAgICAxMTUsXG4gICAgNTgsXG4gICAgMzIsXG4gICAgMTA4LFxuICAgIDEwNSxcbiAgICAxMTAsXG4gICAgMTAxLFxuICAgIDMyLFxuICAgIDM3LFxuICAgIDEwMCxcbiAgICA1OCxcbiAgICAzMixcbiAgICA3OCxcbiAgICAxMTEsXG4gICAgMzIsXG4gICAgMTAwLFxuICAgIDExNCxcbiAgICAxMTcsXG4gICAgMTA5LFxuICAgIDMyLFxuICAgIDExNSxcbiAgICAxMDEsXG4gICAgMTE2LFxuICAgIDMyLFxuICAgIDExMCxcbiAgICAxMTcsXG4gICAgMTA5LFxuICAgIDk4LFxuICAgIDEwMSxcbiAgICAxMTQsXG4gICAgMzIsXG4gICAgMTAzLFxuICAgIDEwNSxcbiAgICAxMTgsXG4gICAgMTAxLFxuICAgIDExMCxcbiAgICAxMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMTAwLFxuICAgIDExNCxcbiAgICAxMTcsXG4gICAgMTA5LFxuICAgIDExNSxcbiAgICAxMDEsXG4gICAgMTE2LFxuICAgIDAsXG4gICAgMzcsXG4gICAgMTE1LFxuICAgIDU4LFxuICAgIDMyLFxuICAgIDEwOCxcbiAgICAxMDUsXG4gICAgMTEwLFxuICAgIDEwMSxcbiAgICAzMixcbiAgICAzNyxcbiAgICAxMDAsXG4gICAgNTgsXG4gICAgMzIsXG4gICAgNzcsXG4gICAgMTE3LFxuICAgIDExNSxcbiAgICAxMTYsXG4gICAgMzIsXG4gICAgMTE1LFxuICAgIDExMixcbiAgICAxMDEsXG4gICAgOTksXG4gICAgMTA1LFxuICAgIDEwMixcbiAgICAxMjEsXG4gICAgMzIsXG4gICAgMTAxLFxuICAgIDEyMCxcbiAgICA5NyxcbiAgICA5OSxcbiAgICAxMTYsXG4gICAgMTA4LFxuICAgIDEyMSxcbiAgICAzMixcbiAgICAxMTEsXG4gICAgMTEwLFxuICAgIDEwMSxcbiAgICAzMixcbiAgICAxMTIsXG4gICAgOTcsXG4gICAgMTE2LFxuICAgIDk5LFxuICAgIDEwNCxcbiAgICAzMixcbiAgICAxMTAsXG4gICAgOTcsXG4gICAgMTA5LFxuICAgIDEwMSxcbiAgICAxMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDEwMCxcbiAgICAxMDEsXG4gICAgMTAyLFxuICAgIDk3LFxuICAgIDExNyxcbiAgICAxMDgsXG4gICAgMTE2LFxuICAgIDAsXG4gICAgODAsXG4gICAgMTE0LFxuICAgIDExMSxcbiAgICA5OCxcbiAgICA5NyxcbiAgICA5OCxcbiAgICAxMDgsXG4gICAgMTAxLFxuICAgIDMyLFxuICAgIDExNSxcbiAgICAxMTEsXG4gICAgMTE3LFxuICAgIDExNCxcbiAgICA5OSxcbiAgICAxMDEsXG4gICAgMzIsXG4gICAgMTA4LFxuICAgIDExMSxcbiAgICAxMTEsXG4gICAgMTEyLFxuICAgIDMyLFxuICAgIDEwNSxcbiAgICAxMTAsXG4gICAgMzIsXG4gICAgOTksXG4gICAgMTExLFxuICAgIDExMCxcbiAgICAxMDIsXG4gICAgMTA1LFxuICAgIDEwMyxcbiAgICAxMTcsXG4gICAgMTE0LFxuICAgIDk3LFxuICAgIDExNixcbiAgICAxMDUsXG4gICAgMTExLFxuICAgIDExMCxcbiAgICAzMixcbiAgICAxMDIsXG4gICAgMTA1LFxuICAgIDEwOCxcbiAgICAxMDEsXG4gICAgMTE1LFxuICAgIDEwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMzcsXG4gICAgMTE1LFxuICAgIDU4LFxuICAgIDMyLFxuICAgIDEwOCxcbiAgICAxMDUsXG4gICAgMTEwLFxuICAgIDEwMSxcbiAgICAzMixcbiAgICAzNyxcbiAgICAxMDAsXG4gICAgNTgsXG4gICAgMzIsXG4gICAgNzgsXG4gICAgMTExLFxuICAgIDMyLFxuICAgIDEwMixcbiAgICAxMDUsXG4gICAgMTA4LFxuICAgIDEwMSxcbiAgICAzMixcbiAgICAxMTAsXG4gICAgOTcsXG4gICAgMTA5LFxuICAgIDEwMSxcbiAgICAzMixcbiAgICAxMDMsXG4gICAgMTA1LFxuICAgIDExOCxcbiAgICAxMDEsXG4gICAgMTEwLFxuICAgIDEwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAxMTUsXG4gICAgMTExLFxuICAgIDExNyxcbiAgICAxMTQsXG4gICAgOTksXG4gICAgMTAxLFxuICAgIDAsXG4gICAgMCxcbiAgICA3MSxcbiAgICA3MCxcbiAgICA0OSxcbiAgICA4MCxcbiAgICA2NSxcbiAgICA4NCxcbiAgICA2NyxcbiAgICA3MixcbiAgICA0OSxcbiAgICA0OCxcbiAgICA0OCxcbiAgICAwLFxuICAgIDczLFxuICAgIDY4LFxuICAgIDM1LFxuICAgIDQ4LFxuICAgIDQ4LFxuICAgIDQ4LFxuICAgIDQ4LFxuICAgIDQ4LFxuICAgIDUwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDM3LFxuICAgIDExNSxcbiAgICA1OCxcbiAgICAzMixcbiAgICAxMDgsXG4gICAgMTA1LFxuICAgIDExMCxcbiAgICAxMDEsXG4gICAgMzIsXG4gICAgMzcsXG4gICAgMTAwLFxuICAgIDU4LFxuICAgIDMyLFxuICAgIDc4LFxuICAgIDExMSxcbiAgICAzMixcbiAgICAxMDAsXG4gICAgMTA1LFxuICAgIDExNCxcbiAgICAxMDEsXG4gICAgOTksXG4gICAgMTE2LFxuICAgIDExMSxcbiAgICAxMTQsXG4gICAgMTIxLFxuICAgIDMyLFxuICAgIDEwMyxcbiAgICAxMDUsXG4gICAgMTE4LFxuICAgIDEwMSxcbiAgICAxMTAsXG4gICAgMTAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDEwMCxcbiAgICAxMDUsXG4gICAgMTE0LFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICA3MCxcbiAgICA3MyxcbiAgICA4OCxcbiAgICA3NyxcbiAgICA2OSxcbiAgICA1OCxcbiAgICAzMixcbiAgICA3MyxcbiAgICAxMDksXG4gICAgMTEyLFxuICAgIDEwOCxcbiAgICAxMDEsXG4gICAgMTA5LFxuICAgIDEwMSxcbiAgICAxMTAsXG4gICAgMTE2LFxuICAgIDMyLFxuICAgIDM0LFxuICAgIDEwOSxcbiAgICA5NyxcbiAgICAxMTIsXG4gICAgMzQsXG4gICAgMzIsXG4gICAgMTA1LFxuICAgIDExMCxcbiAgICAzMixcbiAgICA4NCxcbiAgICAxMDUsXG4gICAgNzcsXG4gICAgMTA1LFxuICAgIDEwMCxcbiAgICAxMDUsXG4gICAgMTE2LFxuICAgIDEyMSxcbiAgICAzMixcbiAgICA5OSxcbiAgICAxMTEsXG4gICAgMTEwLFxuICAgIDEwMixcbiAgICAxMDUsXG4gICAgMTAzLFxuICAgIDQ2LFxuICAgIDEwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAxMDksXG4gICAgOTcsXG4gICAgMTEyLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICA3MCxcbiAgICA3MyxcbiAgICA4OCxcbiAgICA3NyxcbiAgICA2OSxcbiAgICA1OCxcbiAgICAzMixcbiAgICA3MyxcbiAgICAxMDksXG4gICAgMTEyLFxuICAgIDEwOCxcbiAgICAxMDEsXG4gICAgMTA5LFxuICAgIDEwMSxcbiAgICAxMTAsXG4gICAgMTE2LFxuICAgIDMyLFxuICAgIDM0LFxuICAgIDExMixcbiAgICAxMTQsXG4gICAgMTExLFxuICAgIDEwMyxcbiAgICA5OCxcbiAgICA5NyxcbiAgICAxMTUsXG4gICAgMTAxLFxuICAgIDM0LFxuICAgIDMyLFxuICAgIDEwNSxcbiAgICAxMTAsXG4gICAgMzIsXG4gICAgODQsXG4gICAgMTA1LFxuICAgIDc3LFxuICAgIDEwNSxcbiAgICAxMDAsXG4gICAgMTA1LFxuICAgIDExNixcbiAgICAxMjEsXG4gICAgMzIsXG4gICAgOTksXG4gICAgMTExLFxuICAgIDExMCxcbiAgICAxMDIsXG4gICAgMTA1LFxuICAgIDEwMyxcbiAgICA0NixcbiAgICAxMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMTEyLFxuICAgIDExNCxcbiAgICAxMTEsXG4gICAgMTAzLFxuICAgIDk4LFxuICAgIDk3LFxuICAgIDExNSxcbiAgICAxMDEsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDcwLFxuICAgIDczLFxuICAgIDg4LFxuICAgIDc3LFxuICAgIDY5LFxuICAgIDU4LFxuICAgIDMyLFxuICAgIDczLFxuICAgIDEwOSxcbiAgICAxMTIsXG4gICAgMTA4LFxuICAgIDEwOSxcbiAgICAxMDEsXG4gICAgMTA5LFxuICAgIDEwMSxcbiAgICAxMTAsXG4gICAgMTE2LFxuICAgIDMyLFxuICAgIDM0LFxuICAgIDM3LFxuICAgIDExNSxcbiAgICAzNCxcbiAgICAzMixcbiAgICAxMDUsXG4gICAgMTEwLFxuICAgIDMyLFxuICAgIDg0LFxuICAgIDEwNSxcbiAgICA3NyxcbiAgICAxMDUsXG4gICAgMTAwLFxuICAgIDEwNSxcbiAgICAxMTYsXG4gICAgMTIxLFxuICAgIDMyLFxuICAgIDk5LFxuICAgIDExMSxcbiAgICAxMTAsXG4gICAgMTAyLFxuICAgIDEwNSxcbiAgICAxMDMsXG4gICAgNDYsXG4gICAgMTAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDEwMixcbiAgICAxMTEsXG4gICAgMTEwLFxuICAgIDExNixcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDg1LFxuICAgIDExMCxcbiAgICAxMTUsXG4gICAgMTE3LFxuICAgIDExMixcbiAgICAxMTIsXG4gICAgMTExLFxuICAgIDExNCxcbiAgICAxMTYsXG4gICAgMTAxLFxuICAgIDEwMCxcbiAgICAzMixcbiAgICA5NyxcbiAgICAxMTcsXG4gICAgMTAwLFxuICAgIDEwNSxcbiAgICAxMTEsXG4gICAgMzIsXG4gICAgMTAyLFxuICAgIDExMSxcbiAgICAxMTQsXG4gICAgMTA5LFxuICAgIDk3LFxuICAgIDExNixcbiAgICAxMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDExNSxcbiAgICAxMTEsXG4gICAgMTE3LFxuICAgIDExMCxcbiAgICAxMDAsXG4gICAgMTAyLFxuICAgIDExMSxcbiAgICAxMTAsXG4gICAgMTE2LFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgNzAsXG4gICAgNzMsXG4gICAgODgsXG4gICAgNzcsXG4gICAgNjksXG4gICAgNTgsXG4gICAgMzIsXG4gICAgNzMsXG4gICAgMTA5LFxuICAgIDExMixcbiAgICAxMDgsXG4gICAgMTAxLFxuICAgIDEwOSxcbiAgICAxMDEsXG4gICAgMTEwLFxuICAgIDExNixcbiAgICAzMixcbiAgICAzNCxcbiAgICA5NyxcbiAgICAxMDgsXG4gICAgMTE2LFxuICAgIDk3LFxuICAgIDExNSxcbiAgICAxMTUsXG4gICAgMTA1LFxuICAgIDEwMyxcbiAgICAxMTAsXG4gICAgMzQsXG4gICAgMzIsXG4gICAgMTA1LFxuICAgIDExMCxcbiAgICAzMixcbiAgICA4NCxcbiAgICAxMDUsXG4gICAgNzcsXG4gICAgMTA1LFxuICAgIDEwMCxcbiAgICAxMDUsXG4gICAgMTE2LFxuICAgIDEyMSxcbiAgICAzMixcbiAgICA5OSxcbiAgICAxMTEsXG4gICAgMTEwLFxuICAgIDEwMixcbiAgICAxMDUsXG4gICAgMTAzLFxuICAgIDQ2LFxuICAgIDEwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgNzEsXG4gICAgNzAsXG4gICAgNDksXG4gICAgODAsXG4gICAgNjUsXG4gICAgODQsXG4gICAgNjcsXG4gICAgNzIsXG4gICAgNDksXG4gICAgNDksXG4gICAgNDgsXG4gICAgMCxcbiAgICA3MyxcbiAgICA2OCxcbiAgICAzNSxcbiAgICA0OCxcbiAgICA0OCxcbiAgICA0OCxcbiAgICA0OCxcbiAgICA0OCxcbiAgICA1MCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICA3NyxcbiAgICA4NCxcbiAgICAxMTQsXG4gICAgMTA3LFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgOTcsXG4gICAgMTA4LFxuICAgIDExNixcbiAgICA5NyxcbiAgICAxMTUsXG4gICAgMTE1LFxuICAgIDEwNSxcbiAgICAxMDMsXG4gICAgMTEwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgNzAsXG4gICAgNzMsXG4gICAgODgsXG4gICAgNzcsXG4gICAgNjksXG4gICAgNTgsXG4gICAgMzIsXG4gICAgNzMsXG4gICAgMTA5LFxuICAgIDExMixcbiAgICAxMDgsXG4gICAgMTAxLFxuICAgIDEwOSxcbiAgICAxMDEsXG4gICAgMTEwLFxuICAgIDExNixcbiAgICAzMixcbiAgICAzNCxcbiAgICAxMTcsXG4gICAgMTEwLFxuICAgIDEwMCxcbiAgICAxMDEsXG4gICAgMTAyLFxuICAgIDM0LFxuICAgIDMyLFxuICAgIDEwNSxcbiAgICAxMTAsXG4gICAgMzIsXG4gICAgODQsXG4gICAgMTA1LFxuICAgIDc3LFxuICAgIDEwNSxcbiAgICAxMDAsXG4gICAgMTA1LFxuICAgIDExNixcbiAgICAxMjEsXG4gICAgMzIsXG4gICAgOTksXG4gICAgMTExLFxuICAgIDExMCxcbiAgICAxMDIsXG4gICAgMTA1LFxuICAgIDEwMyxcbiAgICA0NixcbiAgICAxMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAxMTcsXG4gICAgMTEwLFxuICAgIDEwMCxcbiAgICAxMDEsXG4gICAgMTAyLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDcwLFxuICAgIDczLFxuICAgIDg4LFxuICAgIDc3LFxuICAgIDY5LFxuICAgIDU4LFxuICAgIDMyLFxuICAgIDczLFxuICAgIDEwOSxcbiAgICAxMTIsXG4gICAgMTA4LFxuICAgIDEwMSxcbiAgICAxMDksXG4gICAgMTAxLFxuICAgIDExMCxcbiAgICAxMTYsXG4gICAgMzIsXG4gICAgMzQsXG4gICAgMzcsXG4gICAgMTE1LFxuICAgIDM0LFxuICAgIDMyLFxuICAgIDEwNSxcbiAgICAxMTAsXG4gICAgMzIsXG4gICAgODQsXG4gICAgMTA1LFxuICAgIDc3LFxuICAgIDEwNSxcbiAgICAxMDAsXG4gICAgMTA1LFxuICAgIDExNixcbiAgICAxMjEsXG4gICAgMzIsXG4gICAgOTksXG4gICAgMTExLFxuICAgIDExMCxcbiAgICAxMDIsXG4gICAgMTA1LFxuICAgIDEwMyxcbiAgICA0NixcbiAgICAxMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICA5OSxcbiAgICAxMTEsXG4gICAgMTEyLFxuICAgIDEyMSxcbiAgICA5OCxcbiAgICA5NyxcbiAgICAxMTAsXG4gICAgMTA3LFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICA5OSxcbiAgICAxMTEsXG4gICAgMTEyLFxuICAgIDEyMSxcbiAgICAxMDAsXG4gICAgMTE0LFxuICAgIDExNyxcbiAgICAxMDksXG4gICAgMTE1LFxuICAgIDEwMSxcbiAgICAxMTYsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDcwLFxuICAgIDczLFxuICAgIDg4LFxuICAgIDc3LFxuICAgIDY5LFxuICAgIDU4LFxuICAgIDMyLFxuICAgIDczLFxuICAgIDEwOSxcbiAgICAxMTIsXG4gICAgMTA4LFxuICAgIDEwMSxcbiAgICAxMDksXG4gICAgMTAxLFxuICAgIDExMCxcbiAgICAxMTYsXG4gICAgMzIsXG4gICAgMzQsXG4gICAgMTE2LFxuICAgIDEwNSxcbiAgICAxMDksXG4gICAgMTAxLFxuICAgIDExMSxcbiAgICAxMTcsXG4gICAgMTE2LFxuICAgIDM0LFxuICAgIDMyLFxuICAgIDEwNSxcbiAgICAxMTAsXG4gICAgMzIsXG4gICAgODQsXG4gICAgMTA1LFxuICAgIDc3LFxuICAgIDEwNSxcbiAgICAxMDAsXG4gICAgMTA1LFxuICAgIDExNixcbiAgICAxMjEsXG4gICAgMzIsXG4gICAgOTksXG4gICAgMTExLFxuICAgIDExMCxcbiAgICAxMDIsXG4gICAgMTA1LFxuICAgIDEwMyxcbiAgICA0NixcbiAgICAxMCxcbiAgICAwLFxuICAgIDk3LFxuICAgIDEwMCxcbiAgICAxMDAsXG4gICAgMzIsXG4gICAgMTE2LFxuICAgIDExMSxcbiAgICAzMixcbiAgICAxMTIsXG4gICAgOTcsXG4gICAgMTE2LFxuICAgIDEwNCxcbiAgICAxMDgsXG4gICAgMTA1LFxuICAgIDExNSxcbiAgICAxMTYsXG4gICAgNTgsXG4gICAgMzIsXG4gICAgMzcsXG4gICAgMTE1LFxuICAgIDEwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMTE2LFxuICAgIDEwNSxcbiAgICAxMDksXG4gICAgMTAxLFxuICAgIDExMSxcbiAgICAxMTcsXG4gICAgMTE2LFxuICAgIDAsXG4gICAgNDYsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAxMTYsXG4gICAgMTA1LFxuICAgIDEwOSxcbiAgICAxMDUsXG4gICAgMTAwLFxuICAgIDEwNSxcbiAgICAxMTYsXG4gICAgMTIxLFxuICAgIDQ2LFxuICAgIDk5LFxuICAgIDEwMixcbiAgICAxMDMsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAxMTEsXG4gICAgMTEyLFxuICAgIDExNixcbiAgICAwLFxuICAgIDAsXG4gICAgMCxcbiAgICAwLFxuICAgIDAsXG4gICAgMTE0LFxuICAgIDk4LFxuICAgIDAsXG4gICAgMCxcbiAgICAwL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XNBcnJheVR5cGUodHlwZSkpIHJldHVybiB0cnVlO1xuICAgICAgICAgICAgICAgIGlmICgvPD97ID9bXn1dKiA/fT4/Ly50ZXN0KHR5cGUpKSByZXR1cm4gdHJ1ZTsgLy8geyBpMzIsIGk4IH0gZXRjLiAtIGFub255bW91cyBzdHJ1Y3QgdHlwZXNcbiAgICAgICAgICAgICAgICAvLyBTZWUgY29tbWVudCBpbiBpc1N0cnVjdFBvaW50ZXJUeXBlKClcbiAgICAgICAgICAgICAgICByZXR1cm4gdHlwZVswXSA9PSAnJSc7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZ2V0TmF0aXZlVHlwZVNpemU6IGZ1bmN0aW9uKHR5cGUpIHtcbiAgICAgICAgICAgICAgICBzd2l0Y2ggKHR5cGUpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnaTEnOlxuICAgICAgICAgICAgICAgICAgICBjYXNlICdpOCc6XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnaTE2JzpcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAyO1xuICAgICAgICAgICAgICAgICAgICBjYXNlICdpMzInOlxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDQ7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ2k2NCc6XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gODtcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAnZmxvYXQnOlxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDQ7XG4gICAgICAgICAgICAgICAgICAgIGNhc2UgJ2RvdWJsZSc6XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gODtcbiAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVbdHlwZS5sZW5ndGggLSAxXSA9PT0gJyonKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFJ1bnRpbWUuUVVBTlRVTV9TSVpFOyAvLyBBIHBvaW50ZXJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAodHlwZVswXSA9PT0gJ2knKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgYml0cyA9IHBhcnNlSW50KHR5cGUuc3Vic3RyKDEpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhc3NlcnQoYml0cyAlIDggPT09IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBiaXRzIC8gODtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBnZXROYXRpdmVGaWVsZFNpemU6IGZ1bmN0aW9uKHR5cGUpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gTWF0aC5tYXgoXG4gICAgICAgICAgICAgICAgICAgIFJ1bnRpbWUuZ2V0TmF0aXZlVHlwZVNpemUodHlwZSksXG4gICAgICAgICAgICAgICAgICAgIFJ1bnRpbWUuUVVBTlRVTV9TSVpFXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBkZWR1cDogZnVuY3Rpb24gZGVkdXAoaXRlbXMsIGlkZW50KSB7XG4gICAgICAgICAgICAgICAgY29uc3Qgc2VlbiA9IHt9O1xuICAgICAgICAgICAgICAgIGlmIChpZGVudCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gaXRlbXMuZmlsdGVyKGZ1bmN0aW9uKGl0ZW0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWVuW2l0ZW1baWRlbnRdXSkgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgc2VlbltpdGVtW2lkZW50XV0gPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBpdGVtcy5maWx0ZXIoZnVuY3Rpb24oaXRlbSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNlZW5baXRlbV0pIHJldHVybiBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNlZW5baXRlbV0gPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzZXQ6IGZ1bmN0aW9uIHNldCgpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBhcmdzID1cbiAgICAgICAgICAgICAgICAgICAgdHlwZW9mIGFyZ3VtZW50c1swXSA9PT0gJ29iamVjdCcgPyBhcmd1bWVudHNbMF0gOiBhcmd1bWVudHM7XG4gICAgICAgICAgICAgICAgY29uc3QgcmV0ID0ge307XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcmdzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldFthcmdzW2ldXSA9IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiByZXQ7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZ2V0QWxpZ25TaXplOiBmdW5jdGlvbih0eXBlLCBzaXplLCB2YXJhcmcpIHtcbiAgICAgICAgICAgICAgICAvLyB3ZSBhbGlnbiBpNjRzIGFuZCBkb3VibGVzIG9uIDY0LWJpdCBib3VuZGFyaWVzLCB1bmxpa2UgeDg2XG4gICAgICAgICAgICAgICAgaWYgKHR5cGUgPT0gJ2k2NCcgfHwgdHlwZSA9PSAnZG91YmxlJyB8fCB2YXJhcmcpIHJldHVybiA4O1xuICAgICAgICAgICAgICAgIGlmICghdHlwZSkgcmV0dXJuIE1hdGgubWluKHNpemUsIDgpOyAvLyBhbGlnbiBzdHJ1Y3R1cmVzIGludGVybmFsbHkgdG8gNjQgYml0c1xuICAgICAgICAgICAgICAgIHJldHVybiBNYXRoLm1pbihcbiAgICAgICAgICAgICAgICAgICAgc2l6ZSB8fCAodHlwZSA/IFJ1bnRpbWUuZ2V0TmF0aXZlRmllbGRTaXplKHR5cGUpIDogMCksXG4gICAgICAgICAgICAgICAgICAgIFJ1bnRpbWUuUVVBTlRVTV9TSVpFXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBjYWxjdWxhdGVTdHJ1Y3RBbGlnbm1lbnQ6IGZ1bmN0aW9uIGNhbGN1bGF0ZVN0cnVjdEFsaWdubWVudCh0eXBlKSB7XG4gICAgICAgICAgICAgICAgdHlwZS5mbGF0U2l6ZSA9IDA7XG4gICAgICAgICAgICAgICAgdHlwZS5hbGlnblNpemUgPSAwO1xuICAgICAgICAgICAgICAgIGNvbnN0IGRpZmZzID0gW107XG4gICAgICAgICAgICAgICAgbGV0IHByZXYgPSAtMTtcbiAgICAgICAgICAgICAgICB0eXBlLmZsYXRJbmRleGVzID0gdHlwZS5maWVsZHMubWFwKGZ1bmN0aW9uKGZpZWxkKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCBzaXplLCBhbGlnblNpemU7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgIFJ1bnRpbWUuaXNOdW1iZXJUeXBlKGZpZWxkKSB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgUnVudGltZS5pc1BvaW50ZXJUeXBlKGZpZWxkKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNpemUgPSBSdW50aW1lLmdldE5hdGl2ZVR5cGVTaXplKGZpZWxkKTsgLy8gcGFjayBjaGFyOyBjaGFyOyBpbiBzdHJ1Y3RzLCBhbHNvIGNoYXJbWF1zLlxuICAgICAgICAgICAgICAgICAgICAgICAgYWxpZ25TaXplID0gUnVudGltZS5nZXRBbGlnblNpemUoZmllbGQsIHNpemUpO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKFJ1bnRpbWUuaXNTdHJ1Y3RUeXBlKGZpZWxkKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZpZWxkWzFdID09PSAnMCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB0aGlzIGlzIFswIHggc29tZXRoaW5nXS4gV2hlbiBpbnNpZGUgYW5vdGhlciBzdHJ1Y3R1cmUgbGlrZSBoZXJlLCBpdCBtdXN0IGJlIGF0IHRoZSBlbmQsIGFuZCBpdCBhZGRzIG5vIHNpemVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyB0aGlzIGhhcHBlbnMgaW4gamF2YS1uYm9keSBmb3IgZXhhbXBsZS4uLiBhc3NlcnQoaW5kZXggPT09IHR5cGUuZmllbGRzLmxlbmd0aCwgJ3plcm8tbGVuZ3RoIGluIHRoZSBtaWRkbGUhJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFR5cGVzLnR5cGVzW2ZpZWxkXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGlnblNpemUgPSBSdW50aW1lLmdldEFsaWduU2l6ZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG51bGwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUeXBlcy50eXBlc1tmaWVsZF0uYWxpZ25TaXplXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWxpZ25TaXplID0gdHlwZS5hbGlnblNpemUgfHwgUVVBTlRVTV9TSVpFO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZSA9IFR5cGVzLnR5cGVzW2ZpZWxkXS5mbGF0U2l6ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbGlnblNpemUgPSBSdW50aW1lLmdldEFsaWduU2l6ZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVHlwZXMudHlwZXNbZmllbGRdLmFsaWduU2l6ZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoZmllbGRbMF0gPT0gJ2InKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBiTiwgbGFyZ2UgbnVtYmVyIGZpZWxkLCBsaWtlIGEgW04geCBpOF1cbiAgICAgICAgICAgICAgICAgICAgICAgIHNpemUgPSBmaWVsZC5zdWJzdHIoMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgYWxpZ25TaXplID0gMTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93ICdVbmNsZWFyIHR5cGUgaW4gc3RydWN0OiAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmaWVsZCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJywgaW4gJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZS5uYW1lXyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJyA6OiAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkdW1wKFR5cGVzLnR5cGVzW3R5cGUubmFtZV9dKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZS5wYWNrZWQpIGFsaWduU2l6ZSA9IDE7XG4gICAgICAgICAgICAgICAgICAgIHR5cGUuYWxpZ25TaXplID0gTWF0aC5tYXgodHlwZS5hbGlnblNpemUsIGFsaWduU2l6ZSk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGN1cnIgPSBSdW50aW1lLmFsaWduTWVtb3J5KHR5cGUuZmxhdFNpemUsIGFsaWduU2l6ZSk7IC8vIGlmIG5lY2Vzc2FyeSwgcGxhY2UgdGhpcyBvbiBhbGlnbmVkIG1lbW9yeVxuICAgICAgICAgICAgICAgICAgICB0eXBlLmZsYXRTaXplID0gY3VyciArIHNpemU7XG4gICAgICAgICAgICAgICAgICAgIGlmIChwcmV2ID49IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRpZmZzLnB1c2goY3VyciAtIHByZXYpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHByZXYgPSBjdXJyO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gY3VycjtcbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICB0eXBlLmZsYXRTaXplID0gUnVudGltZS5hbGlnbk1lbW9yeShcbiAgICAgICAgICAgICAgICAgICAgdHlwZS5mbGF0U2l6ZSxcbiAgICAgICAgICAgICAgICAgICAgdHlwZS5hbGlnblNpemVcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIGlmIChkaWZmcy5sZW5ndGggPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICB0eXBlLmZsYXRGYWN0b3IgPSB0eXBlLmZsYXRTaXplO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoUnVudGltZS5kZWR1cChkaWZmcykubGVuZ3RoID09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZS5mbGF0RmFjdG9yID0gZGlmZnNbMF07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHR5cGUubmVlZHNGbGF0dGVuaW5nID0gdHlwZS5mbGF0RmFjdG9yICE9IDE7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHR5cGUuZmxhdEluZGV4ZXM7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZ2VuZXJhdGVTdHJ1Y3RJbmZvOiBmdW5jdGlvbihzdHJ1Y3QsIHR5cGVOYW1lLCBvZmZzZXQpIHtcbiAgICAgICAgICAgICAgICB2YXIgdHlwZSwgYWxpZ25tZW50O1xuICAgICAgICAgICAgICAgIGlmICh0eXBlTmFtZSkge1xuICAgICAgICAgICAgICAgICAgICBvZmZzZXQgPSBvZmZzZXQgfHwgMDtcbiAgICAgICAgICAgICAgICAgICAgdHlwZSA9ICh0eXBlb2YgVHlwZXMgPT09ICd1bmRlZmluZWQnXG4gICAgICAgICAgICAgICAgICAgICAgICA/IFJ1bnRpbWUudHlwZUluZm9cbiAgICAgICAgICAgICAgICAgICAgICAgIDogVHlwZXMudHlwZXMpW3R5cGVOYW1lXTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0eXBlKSByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGUuZmllbGRzLmxlbmd0aCAhPSBzdHJ1Y3QubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLndhcm4oXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgJ051bWJlciBvZiBuYW1lZCBmaWVsZHMgbXVzdCBtYXRjaCB0aGUgdHlwZSBmb3IgJyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVOYW1lICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJzogcG9zc2libHkgZHVwbGljYXRlIHN0cnVjdCBuYW1lcy4gQ2Fubm90IHJldHVybiBzdHJ1Y3RJbmZvJ1xuICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGFsaWdubWVudCA9IHR5cGUuZmxhdEluZGV4ZXM7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIHR5cGUgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmaWVsZHM6IHN0cnVjdC5tYXAoZnVuY3Rpb24oaXRlbSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBpdGVtWzBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgYWxpZ25tZW50ID0gUnVudGltZS5jYWxjdWxhdGVTdHJ1Y3RBbGlnbm1lbnQodHlwZSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNvbnN0IHJldCA9IHtcbiAgICAgICAgICAgICAgICAgICAgX19zaXplX186IHR5cGUuZmxhdFNpemVcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGlmICh0eXBlTmFtZSkge1xuICAgICAgICAgICAgICAgICAgICBzdHJ1Y3QuZm9yRWFjaChmdW5jdGlvbihpdGVtLCBpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGl0ZW0gPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0W2l0ZW1dID0gYWxpZ25tZW50W2ldICsgb2Zmc2V0O1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBlbWJlZGRlZCBzdHJ1Y3RcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQga2V5O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoY29uc3QgayBpbiBpdGVtKSBrZXkgPSBrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldFtrZXldID0gUnVudGltZS5nZW5lcmF0ZVN0cnVjdEluZm8oXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGl0ZW1ba2V5XSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdHlwZS5maWVsZHNbaV0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsaWdubWVudFtpXVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHN0cnVjdC5mb3JFYWNoKGZ1bmN0aW9uKGl0ZW0sIGkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldFtpdGVtWzFdXSA9IGFsaWdubWVudFtpXTtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiByZXQ7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZHluQ2FsbDogZnVuY3Rpb24oc2lnLCBwdHIsIGFyZ3MpIHtcbiAgICAgICAgICAgICAgICBpZiAoYXJncyAmJiBhcmdzLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIWFyZ3Muc3BsaWNlKSBhcmdzID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJncyk7XG4gICAgICAgICAgICAgICAgICAgIGFyZ3Muc3BsaWNlKDAsIDAsIHB0cik7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBNb2R1bGVbJ2R5bkNhbGxfJyArIHNpZ10uYXBwbHkobnVsbCwgYXJncyk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIE1vZHVsZVsnZHluQ2FsbF8nICsgc2lnXS5jYWxsKG51bGwsIHB0cik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIFVURjhQcm9jZXNzb3I6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGJ1ZmZlciA9IFtdO1xuICAgICAgICAgICAgICAgIGxldCBuZWVkZWQgPSAwO1xuICAgICAgICAgICAgICAgIHRoaXMucHJvY2Vzc0NDaGFyID0gZnVuY3Rpb24oY29kZSkge1xuICAgICAgICAgICAgICAgICAgICBjb2RlID0gY29kZSAmIDB4ZmY7XG4gICAgICAgICAgICAgICAgICAgIGlmIChidWZmZXIubGVuZ3RoID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY29kZSAmIDB4ODApID09IDB4MDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAweHh4eHh4eFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBTdHJpbmcuZnJvbUNoYXJDb2RlKGNvZGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgYnVmZmVyLnB1c2goY29kZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGNvZGUgJiAweGUwKSA9PSAweGMwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gMTEweHh4eHhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZWVkZWQgPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgoY29kZSAmIDB4ZjApID09IDB4ZTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAxMTEweHh4eFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5lZWRlZCA9IDI7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIDExMTEweHh4XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmVlZGVkID0gMztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAnJztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAobmVlZGVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBidWZmZXIucHVzaChjb2RlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5lZWRlZC0tO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5lZWRlZCA+IDApIHJldHVybiAnJztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBjMSA9IGJ1ZmZlclswXTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgYzIgPSBidWZmZXJbMV07XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGMzID0gYnVmZmVyWzJdO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjNCA9IGJ1ZmZlclszXTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHJldDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGJ1ZmZlci5sZW5ndGggPT0gMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0ID0gU3RyaW5nLmZyb21DaGFyQ29kZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGMxICYgMHgxZikgPDwgNikgfCAoYzIgJiAweDNmKVxuICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChidWZmZXIubGVuZ3RoID09IDMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldCA9IFN0cmluZy5mcm9tQ2hhckNvZGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjMSAmIDB4MGYpIDw8IDEyKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoYzIgJiAweDNmKSA8PCA2KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjMyAmIDB4M2YpXG4gICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gaHR0cDovL21hdGhpYXNieW5lbnMuYmUvbm90ZXMvamF2YXNjcmlwdC1lbmNvZGluZyNzdXJyb2dhdGUtZm9ybXVsYWVcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvZGVQb2ludCA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjMSAmIDB4MDcpIDw8IDE4KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjMiAmIDB4M2YpIDw8IDEyKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjMyAmIDB4M2YpIDw8IDYpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYzQgJiAweDNmKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldCA9IFN0cmluZy5mcm9tQ2hhckNvZGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTWF0aC5mbG9vcigoY29kZVBvaW50IC0gMHgxMDAwMCkgLyAweDQwMCkgKyAweGQ4MDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjb2RlUG9pbnQgLSAweDEwMDAwKSAlIDB4NDAwKSArIDB4ZGMwMFxuICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBidWZmZXIubGVuZ3RoID0gMDtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJldDtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHRoaXMucHJvY2Vzc0pTU3RyaW5nID0gZnVuY3Rpb24oc3RyaW5nKSB7XG4gICAgICAgICAgICAgICAgICAgIHN0cmluZyA9IHVuZXNjYXBlKGVuY29kZVVSSUNvbXBvbmVudChzdHJpbmcpKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcmV0ID0gW107XG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgc3RyaW5nLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXQucHVzaChzdHJpbmcuY2hhckNvZGVBdChpKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHJldDtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHN0YWNrQWxsb2M6IGZ1bmN0aW9uKHNpemUpIHtcbiAgICAgICAgICAgICAgICBjb25zdCByZXQgPSBTVEFDS1RPUDtcbiAgICAgICAgICAgICAgICBTVEFDS1RPUCA9IChTVEFDS1RPUCArIHNpemUpIHwgMDtcbiAgICAgICAgICAgICAgICBTVEFDS1RPUCA9IChTVEFDS1RPUCArIDcpICYgLTg7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJldDtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzdGF0aWNBbGxvYzogZnVuY3Rpb24oc2l6ZSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHJldCA9IFNUQVRJQ1RPUDtcbiAgICAgICAgICAgICAgICBTVEFUSUNUT1AgPSAoU1RBVElDVE9QICsgc2l6ZSkgfCAwO1xuICAgICAgICAgICAgICAgIFNUQVRJQ1RPUCA9IChTVEFUSUNUT1AgKyA3KSAmIC04O1xuICAgICAgICAgICAgICAgIHJldHVybiByZXQ7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZHluYW1pY0FsbG9jOiBmdW5jdGlvbihzaXplKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgcmV0ID0gRFlOQU1JQ1RPUDtcbiAgICAgICAgICAgICAgICBEWU5BTUlDVE9QID0gKERZTkFNSUNUT1AgKyBzaXplKSB8IDA7XG4gICAgICAgICAgICAgICAgRFlOQU1JQ1RPUCA9IChEWU5BTUlDVE9QICsgNykgJiAtODtcblxuICAgICAgICAgICAgICAgIGlmIChEWU5BTUlDVE9QID49IFRPVEFMX01FTU9SWSkge1xuICAgICAgICAgICAgICAgICAgICBhYm9ydCgnT3V0IG9mIG1lbW9yeS4nKTtcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGFsaWduTWVtb3J5OiBmdW5jdGlvbihzaXplLCBxdWFudHVtKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgcmV0ID0gKHNpemUgPVxuICAgICAgICAgICAgICAgICAgICBNYXRoLmNlaWwoc2l6ZSAvIChxdWFudHVtID8gcXVhbnR1bSA6IDgpKSAqXG4gICAgICAgICAgICAgICAgICAgIChxdWFudHVtID8gcXVhbnR1bSA6IDgpKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG1ha2VCaWdJbnQ6IGZ1bmN0aW9uKGxvdywgaGlnaCwgdW5zaWduZWQpIHtcbiAgICAgICAgICAgICAgICBjb25zdCByZXQgPSB1bnNpZ25lZFxuICAgICAgICAgICAgICAgICAgICA/ICsobG93ID4+PiAwKSArICsoaGlnaCA+Pj4gMCkgKiArNDI5NDk2NzI5NlxuICAgICAgICAgICAgICAgICAgICA6ICsobG93ID4+PiAwKSArICsoaGlnaCB8IDApICogKzQyOTQ5NjcyOTY7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJldDtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBHTE9CQUxfQkFTRTogOCxcbiAgICAgICAgICAgIFFVQU5UVU1fU0laRTogNFxuICAgICAgICB9O1xuXG4gICAgICAgIC8qIEluaXRpYWxpemUgdGhlIHJ1bnRpbWUgbWVtb3J5ICovXG5cbiAgICAgICAgLy8gVE9ETzogQWxsb3cgdXNlciB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GUpXG4gICAgICAgICAqL1xuXG4gICAgICAgIE1vZHVsZS5jYWxsID0gZnVuY3Rpb24gY2FsbChpZGVudCwgcmV0dXJuVHlwZSwgYXJnVHlwZXMsIGFyZ3MpIHtcbiAgICAgICAgICAgIGNvbnN0IGZ1bmMgPSBNb2R1bGVbJ18nICsgaWRlbnRdO1xuICAgICAgICAgICAgaWYgKCFmdW5jKSB7XG4gICAgICAgICAgICAgICAgYWJvcnQoYFVua25vd24gZnVuY3Rpb246IFwiJHtpZGVudH1cIi5gKTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgbGV0IHN0YWNrID0gMDtcbiAgICAgICAgICAgIGZ1bmN0aW9uIHRvQyh2YWx1ZSwgdHlwZSkge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlID09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh2YWx1ZSA9PT0gbnVsbCB8fCB2YWx1ZSA9PT0gdW5kZWZpbmVkIHx8IHZhbHVlID09PSAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7IC8vIG51bGwgc3RyaW5nXG4gICAgICAgICAgICAgICAgICAgIHZhbHVlID0gaW50QXJyYXlGcm9tU3RyaW5nKHZhbHVlKTtcbiAgICAgICAgICAgICAgICAgICAgdHlwZSA9ICdhcnJheSc7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICh0eXBlID09ICdhcnJheScpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFzdGFjaykgc3RhY2sgPSBSdW50aW1lLnN0YWNrU2F2ZSgpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCByZXQgPSBSdW50aW1lLnN0YWNrQWxsb2ModmFsdWUubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgICAgd3JpdGVBcnJheVRvTWVtb3J5KHZhbHVlLCByZXQpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gdmFsdWU7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGZ1bmN0aW9uIGZyb21DKHZhbHVlLCB0eXBlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGUgPT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFBvaW50ZXJfc3RyaW5naWZ5KHZhbHVlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYXNzZXJ0KHR5cGUgIT0gJ2FycmF5Jyk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHZhbHVlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgICAgICBjb25zdCBjQXJncyA9IGFyZ3NcbiAgICAgICAgICAgICAgICA/IGFyZ3MubWFwKGZ1bmN0aW9uKGFyZykge1xuICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0b0MoYXJnLCBhcmdUeXBlc1tpKytdKTtcbiAgICAgICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgICAgOiBbXTtcbiAgICAgICAgICAgIHZhciByZXQgPSBmcm9tQyhmdW5jLmFwcGx5KG51bGwsIGNBcmdzKSwgcmV0dXJuVHlwZSk7XG4gICAgICAgICAgICBpZiAoc3RhY2spIFJ1bnRpbWUuc3RhY2tSZXN0b3JlKHN0YWNrKTtcbiAgICAgICAgICAgIHJldHVybiByZXQ7XG4gICAgICAgIH07XG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIER5bmFtaWNhbGx5IHNldHMgYSB2YWx1ZSBpbiBtZW1vcnkgYXQgcnVudGltZS4gT25seSBkb2VzICphbGlnbmVkKiB3cml0ZXMuIFRoaXMgaXMgYSBsb3dlci1sZXZlbCBvcGVyYXRpb24uXG4gICAgICAgICAqIEBmdW5jdGlvbiBzZXRWYWx1ZVxuICAgICAgICAgKiBAbWVtYmVyb2YgTGliVGlNaWRpdHlcbiAgICAgICAgICogQGluc3RhbmNlXG4gICAgICAgICAqIEBwYXJhbSBwdHIgUG9pbnRlci5cbiAgICAgICAgICogQHBhcmFtIHZhbHVlXG4gICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSB0eXBlIExMVk0gdHlwZSAoJ2k4JywgLCAnaTE2JywgJ2kzMicsICdpNjQnLCAnZmxvYXQnLCAnZG91YmxlJylcbiAgICAgICAgICovXG4gICAgICAgIGZ1bmN0aW9uIHNldFZhbHVlKHB0ciwgdmFsdWUsIHR5cGUpIHtcbiAgICAgICAgICAgIHR5cGUgPSB0eXBlIHx8ICdpOCc7XG4gICAgICAgICAgICBpZiAodHlwZS5jaGFyQXQodHlwZS5sZW5ndGggLSAxKSA9PT0gJyonKSB0eXBlID0gJ2kzMic7IC8vIHBvaW50ZXJzIGFyZSAzMi1iaXRcbiAgICAgICAgICAgIHN3aXRjaCAodHlwZSkge1xuICAgICAgICAgICAgICAgIGNhc2UgJ2kxJzpcbiAgICAgICAgICAgICAgICAgICAgSEVBUDhbcHRyXSA9IHZhbHVlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlICdpOCc6XG4gICAgICAgICAgICAgICAgICAgIEhFQVA4W3B0cl0gPSB2YWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSAnaTE2JzpcbiAgICAgICAgICAgICAgICAgICAgSEVBUDE2W3B0ciA+PiAxXSA9IHZhbHVlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlICdpMzInOlxuICAgICAgICAgICAgICAgICAgICBIRUFQMzJbcHRyID4+IDJdID0gdmFsdWU7XG4gICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgIGNhc2UgJ2k2NCc6XG4gICAgICAgICAgICAgICAgICAgICh0ZW1wSTY0ID0gW1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFsdWUgPj4+IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAoKHRlbXBEb3VibGUgPSB2YWx1ZSksXG4gICAgICAgICAgICAgICAgICAgICAgICArTWF0aF9hYnModGVtcERvdWJsZSkgPj0gKzFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHRlbXBEb3VibGUgPiArMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IChNYXRoX21pbihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgK01hdGhfZmxvb3IodGVtcERvdWJsZSAvICs0Mjk0OTY3Mjk2KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKzQyOTQ5NjcyOTVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPj4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IH5+K01hdGhfY2VpbChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHRlbXBEb3VibGUgLSArKH5+dGVtcERvdWJsZSA+Pj4gMCkpIC9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICs0Mjk0OTY3Mjk2XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSA+Pj4gMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogMClcbiAgICAgICAgICAgICAgICAgICAgXSksXG4gICAgICAgICAgICAgICAgICAgICAgICAoSEVBUDMyW3B0ciA+PiAyXSA9IHRlbXBJNjRbMF0pLFxuICAgICAgICAgICAgICAgICAgICAgICAgKEhFQVAzMlsocHRyICsgNCkgPj4gMl0gPSB0ZW1wSTY0WzFdKTtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgY2FzZSAnZmxvYXQnOlxuICAgICAgICAgICAgICAgICAgICBIRUFQRjMyW3B0ciA+PiAyXSA9IHZhbHVlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBjYXNlICdkb3VibGUnOlxuICAgICAgICAgICAgICAgICAgICBIRUFQRjY0W3B0ciA+PiAzXSA9IHZhbHVlO1xuICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICBhYm9ydCgnaW52YWxpZCB0eXBlIGZvciBzZXRWYWx1ZTogJyArIHR5cGUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIE1vZHVsZS5zZXRWYWx1ZSA9IHNldFZhbHVlO1xuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBEeW5hbWljYWxseSBnZXRzIGEgdmFsdWUgaW4gbWVtb3J5IGF0IHJ1bnRpbWUuIE9ubHkgZG9lcyAqYWxpZ25lZCogcmVhZHMuIFRoaXMgaXMgYSBsb3dlci1sZXZlbCBvcGVyYXRpb24uXG4gICAgICAgICAqIEBmdW5jdGlvbiBnZXRWYWx1ZVxuICAgICAgICAgKiBAbWVtYmVyb2YgTGliVGlNaWRpdHlcbiAgICAgICAgICogQGluc3RhbmNlXG4gICAgICAgICAqIEBwYXJhbSBwdHIgUG9pbnRlci5cbiAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IHR5cGUgTExWTSB0eXBlICgnaTgnLCAsICdpMTYnLCAnaTMyJywgJ2k2NCcsICdmbG9hdCcsICdkb3VibGUnKVxuICAgICAgICAgKi9cbiAgICAgICAgZnVuY3Rpb24gZ2V0VmFsdWUocHRyLCB0eXBlKSB7XG4gICAgICAgICAgICB0eXBlID0gdHlwZSB8fCAnaTgnO1xuICAgICAgICAgICAgaWYgKHR5cGUuY2hhckF0KHR5cGUubGVuZ3RoIC0gMSkgPT09ICcqJykgdHlwZSA9ICdpMzInOyAvLyBwb2ludGVycyBhcmUgMzItYml0XG4gICAgICAgICAgICBzd2l0Y2ggKHR5cGUpIHtcbiAgICAgICAgICAgICAgICBjYXNlICdpMSc6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBIRUFQOFtwdHJdO1xuICAgICAgICAgICAgICAgIGNhc2UgJ2k4JzpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEhFQVA4W3B0cl07XG4gICAgICAgICAgICAgICAgY2FzZSAnaTE2JzpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEhFQVAxNltwdHIgPj4gMV07XG4gICAgICAgICAgICAgICAgY2FzZSAnaTMyJzpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEhFQVAzMltwdHIgPj4gMl07XG4gICAgICAgICAgICAgICAgY2FzZSAnaTY0JzpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEhFQVAzMltwdHIgPj4gMl07XG4gICAgICAgICAgICAgICAgY2FzZSAnZmxvYXQnOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gSEVBUEYzMltwdHIgPj4gMl07XG4gICAgICAgICAgICAgICAgY2FzZSAnZG91YmxlJzpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEhFQVBGNjRbcHRyID4+IDNdO1xuICAgICAgICAgICAgICAgIGRlZmF1bHQ6XG4gICAgICAgICAgICAgICAgICAgIGFib3J0KCdpbnZhbGlkIHR5cGUgZm9yIGdldFZhbHVlOiAnICsgdHlwZSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuXG4gICAgICAgIE1vZHVsZVsnZ2V0VmFsdWUnXSA9IGdldFZhbHVlO1xuXG4gICAgICAgIGNvbnN0IEFMTE9DX05PUk1BTCA9IDA7IC8vIFRyaWVzIHRvIHVzZSBfbWFsbG9jKClcbiAgICAgICAgY29uc3QgQUxMT0NfU1RBQ0sgPSAxOyAvLyBMaXZlcyBmb3IgdGhlIGR1cmF0aW9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eXBlcyA9PT0gJ3N0cmluZycgPyB0eXBlcyA6IG51bGw7XG4gICAgICAgICAgICBsZXQgcmV0O1xuICAgICAgICAgICAgaWYgKGFsbG9jYXRvciA9PSBBTExPQ19OT05FKSB7XG4gICAgICAgICAgICAgICAgcmV0ID0gcHRyO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICByZXQgPSBbXG4gICAgICAgICAgICAgICAgICAgIF9tYWxsb2MsXG4gICAgICAgICAgICAgICAgICAgIFJ1bnRpbWUuc3RhY2tBbGxvYyxcbiAgICAgICAgICAgICAgICAgICAgUnVudGltZS5zdGF0aWNBbGxvYyxcbiAgICAgICAgICAgICAgICAgICAgUnVudGltZS5keW5hbWljQWxsb2NcbiAgICAgICAgICAgICAgICBdW2FsbG9jYXRvciA9PT0gdW5kZWZpbmVkID8gQUxMT0NfU1RBVElDIDogYWxsb2NhdG9yXShcbiAgICAgICAgICAgICAgICAgICAgTWF0aC5tYXgoc2l6ZSwgc2luZ2xlVHlwZSA/IDEgOiB0eXBlcy5sZW5ndGgpXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmICh6ZXJvaW5pdCkge1xuICAgICAgICAgICAgICAgIHZhciBwdHIgPSByZXQsXG4gICAgICAgICAgICAgICAgICAgIHN0b3A7XG4gICAgICAgICAgICAgICAgYXNzZXJ0KChyZXQgJiAzKSA9PSAwKTtcbiAgICAgICAgICAgICAgICBzdG9wID0gcmV0ICsgKHNpemUgJiB+Myk7XG4gICAgICAgICAgICAgICAgZm9yICg7IHB0ciA8IHN0b3A7IHB0ciArPSA0KSB7XG4gICAgICAgICAgICAgICAgICAgIEhFQVAzMltwdHIgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBzdG9wID0gcmV0ICsgc2l6ZTtcbiAgICAgICAgICAgICAgICB3aGlsZSAocHRyIDwgc3RvcCkge1xuICAgICAgICAgICAgICAgICAgICBIRUFQOFtwdHIrKyB8IDBdID0gMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJldDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChzaW5nbGVUeXBlID09PSAnaTgnKSB7XG4gICAgICAgICAgICAgICAgaWYgKHNsYWIuc3ViYXJyYXkgfHwgc2xhYi5zbGljZSkge1xuICAgICAgICAgICAgICAgICAgICBIRUFQVTguc2V0KHNsYWIsIHJldCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgSEVBUFU4LnNldChuZXcgVWludDhBcnJheShzbGFiKSwgcmV0KTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJldDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGxldCBpID0gMCxcbiAgICAgICAgICAgICAgICB0eXBlLFxuICAgICAgICAgICAgICAgIHR5cGVTaXplLFxuICAgICAgICAgICAgICAgIHByZXZpb3VzVHlwZTtcbiAgICAgICAgICAgIHdoaWxlIChpIDwgc2l6ZSkge1xuICAgICAgICAgICAgICAgIGxldCBjdXJyID0gc2xhYltpXTtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGN1cnIgPT09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgICAgICAgICAgY3VyciA9IFJ1bnRpbWUuZ2V0RnVuY3Rpb25JbmRleChjdXJyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgdHlwZSA9IHNpbmdsZVR5cGUgfHwgdHlwZXNbaV07XG4gICAgICAgICAgICAgICAgaWYgKHR5cGUgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgaSsrO1xuICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHR5cGUgPT0gJ2k2NCcpIHR5cGUgPSAnaTMyJzsgLy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hc1V0ZiA9IGZhbHNlO1xuICAgICAgICAgICAgbGV0IHQ7XG4gICAgICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgIHQgPSBIRUFQVThbKHB0ciArIGkpIHwgMF07XG4gICAgICAgICAgICAgICAgaWYgKHQgPj0gMTI4KSBoYXNVdGYgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGVsc2UgaWYgKHQgPT0gMCAmJiAhbGVuZ3RoKSBicmVhaztcbiAgICAgICAgICAgICAgICBpKys7XG4gICAgICAgICAgICAgICAgaWYgKGxlbmd0aCAmJiBpID09IGxlbmd0aCkgYnJlYWs7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIWxlbmd0aCkgbGVuZ3RoID0gaTtcbiAgICAgICAgICAgIGxldCByZXQgPSAnJztcbiAgICAgICAgICAgIGlmICghaGFzVXRmKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgTUFYX0NIVU5LID0gMTAyNDsgLy8gc3BsaXQgdXAgaW50byBjaHVua3MsIGJlY2F1c2UgLmFwcGx5IG9uIGEgaHVnZSBzdHJpbmcgY2FuIG92ZXJmbG93IHRoZSBzdGFja1xuICAgICAgICAgICAgICAgIGxldCBjdXJyO1xuICAgICAgICAgICAgICAgIHdoaWxlIChsZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGN1cnIgPSBTdHJpbmcuZnJvbUNoYXJDb2RlLmFwcGx5KFxuICAgICAgICAgICAgICAgICAgICAgICAgU3RyaW5nLFxuICAgICAgICAgICAgICAgICAgICAgICAgSEVBUFU4LnN1YmFycmF5KHB0ciwgcHRyICsgTWF0aC5taW4obGVuZ3RoLCBNQVhfQ0hVTkspKVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICByZXQgPSByZXQgPyByZXQgKyBjdXJyIDogY3VycjtcbiAgICAgICAgICAgICAgICAgICAgcHRyICs9IE1BWF9DSFVOSztcbiAgICAgICAgICAgICAgICAgICAgbGVuZ3RoIC09IE1BWF9DSFVOSztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJldDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IHV0ZjggPSBuZXcgUnVudGltZS5VVEY4UHJvY2Vzc29yKCk7XG4gICAgICAgICAgICBmb3IgKGkgPSAwOyBpIDwgbGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICB0ID0gSEVBUFU4WyhwdHIgKyBpKSB8IDBdO1xuICAgICAgICAgICAgICAgIHJldCArPSB1dGY4LnByb2Nlc3NDQ2hhcih0KTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXQ7XG4gICAgICAgIH1cblxuICAgICAgICBNb2R1bGVbJ1BvaW50ZXJfc3RyaW5naWZ5J10gPSBQb2ludGVyX3N0cmluZ2lmeTtcblxuICAgICAgICAvKipcbiAgICAgICAgICogQGZ1bmN0aW9uIFVURjE2VG9TdHJpbmdcbiAgICAgICAgICogQG1lbWJlcm9mIExpYlRpTWlkaXR5XG4gICAgICAgICAqIEBpbnN0YW5jZVxuICAgICAgICAgKiBAcGFyYW0gcHRyIFBvaW50ZXIgdG8gYSBudWxsLXRlcm1pbmF0ZWQgVVRGMTZMRS1lbmNvZGVkIHN0cmluZyBpbiB0aGUgZW1zY3JpcHRlbiBIRUFQLlxuICAgICAgICAgKi9cblxuICAgICAgICBmdW5jdGlvbiBVVEYxNlRvU3RyaW5nKHB0cikge1xuICAgICAgICAgICAgbGV0IGkgPSAwO1xuICAgICAgICAgICAgbGV0IHN0ciA9ICcnO1xuICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBjb2RlVW5pdCA9IEhFQVAxNlsocHRyICsgaSAqIDIpID4+IDFdO1xuICAgICAgICAgICAgICAgIGlmIChjb2RlVW5pdCA9PSAwKSByZXR1cm4gc3RyO1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lmICh1dGYzMiA9PSAwKSByZXR1cm4gc3RyO1xuICAgICAgICAgICAgICAgICsraTtcbiAgICAgICAgICAgICAgICAvLyBHb3RjaGE6IGZyb21DaGFyQ29kZSBjb25zdHJ1Y3RzIGEgY2hhcmFjdGVyIGZyb20gYSBVVEYtMTYgZW5jb2RlZCBjb2RlIChwYWlyKSwgbm90IGZyb20gYSBVbmljb2RlIGNvZGUgcG9pbnQhIFNvIGVuY29kZSB0aGUgY29kZSBwb2ludCB0byBVVEYtMTYgZm9yIGNvbnN0cnVjdGluZy5cbiAgICAgICAgICAgICAgICBpZiAodXRmMzIgPj0gMHgxMDAwMCkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBjaCA9IHV0ZjMyIC0gMHgxMDAwMDtcbiAgICAgICAgICAgICAgICAgICAgc3RyICs9IFN0cmluZy5mcm9tQ2hhckNvZGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAweGQ4MDAgfCAoY2ggPj4gMTApLFxuICAgICAgICAgICAgICAgICAgICAgICAgMHhkYzAwIHwgKGNoICYgMHgzZmYpXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgc3RyICs9IFN0cmluZy5mcm9tQ2hhckNvZGUodXRmMzIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIE1vZHVsZVsnVVRGMzJUb1N0cmluZyddID0gVVRGMzJUb1N0cmluZztcblxuICAgICAgICAvKipcbiAgICAgICAgICogQ29waWVzIGEgSmF2YVNjcmlwdCBzdHJpbmcgdG8gdGhlIGVtc2NyaXB0ZW4gSEVBUC4gVGhlIGNvcHkgaXMgbnVsbC10ZXJtaW5hdGVkIGFuZCBlbmNvZGVkIGluIFVURjMyTEUgZm9ybS4gVGhlIGNvcHkgd2lsbCByZXF1aXJlIGF0IG1vc3QgKHN0ci5sZW5ndGgrMSkqNCBieXRlc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VxuICAgICAgICAgICAgICAgICAgICAgICAgKDB4MTAwMDAgKyAoKGNvZGVVbml0ICYgMHgzZmYpIDw8IDEwKSkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgKHRyYWlsU3Vycm9nYXRlICYgMHgzZmYpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBIRUFQMzJbKG91dFB0ciArIGlDaGFyICogNCkgPj4gMl0gPSBjb2RlVW5pdDtcbiAgICAgICAgICAgICAgICArK2lDaGFyO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gTnVsbC10ZXJtaW5hdGUgdGhlIHBvaW50ZXIgdG8gdGhlIEhFQVAuXG4gICAgICAgICAgICBIRUFQMzJbKG91dFB0ciArIGlDaGFyICogNCkgPj4gMl0gPSAwO1xuICAgICAgICB9XG5cbiAgICAgICAgTW9kdWxlWydzdHJpbmdUb1VURjMyJ10gPSBzdHJpbmdUb1VURjMyO1xuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBAZnVuY3Rpb24gY2FsbFJ1bnRpbWVDYWxsYmFja3NcbiAgICAgICAgICogQG1lbWJlcm9mIExpYlRpTWlkaXR5XG4gICAgICAgICAqIEBpbnN0YW5jZVxuICAgICAgICAgKiBAcGFyYW0gY2FsbGJhY2tzXG4gICAgICAgICAqL1xuXG4gICAgICAgIGZ1bmN0aW9uIGNhbGxSdW50aW1lQ2FsbGJhY2tzKGNhbGxiYWNrcykge1xuICAgICAgICAgICAgd2hpbGUgKGNhbGxiYWNrcy5sZW5ndGggPiAwKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgY2FsbGJhY2sgPSBjYWxsYmFja3Muc2hpZnQoKTtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIGNhbGxiYWNrID09ICdmdW5jdGlvbicpIHtcbiAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2soKTtcbiAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICA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WRcbiAgICAgICAgbGV0IHJ1bnRpbWVJbml0aWFsaXplZCA9IGZhbHNlO1xuXG4gICAgICAgIGZ1bmN0aW9uIHByZVJ1bigpIHtcbiAgICAgICAgICAgIC8vIGNvbXBhdGliaWxpdHkgLSBtZXJnZSBpbiBhbnl0aGluZyBmcm9tIE1vZHVsZVsncHJlUnVuJ10gYXQgdGhpcyB0aW1lXG4gICAgICAgICAgICBpZiAoTW9kdWxlWydwcmVSdW4nXSkge1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgTW9kdWxlWydwcmVSdW4nXSA9PSAnZnVuY3Rpb24nKVxuICAgICAgICAgICAgICAgICAgICBNb2R1bGVbJ3ByZVJ1biddID0gW01vZHVsZVsncHJlUnVuJ11dO1xuICAgICAgICAgICAgICAgIHdoaWxlIChNb2R1bGVbJ3ByZVJ1biddLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBhZGRPblByZVJ1bihNb2R1bGVbJ3ByZVJ1biddLnNoaWZ0KCkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNhbGxSdW50aW1lQ2FsbGJhY2tzKF9fQVRQUkVSVU5fXyk7XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBlbnN1cmVJbml0UnVudGltZSgpIHtcbiAgICAgICAgICAgIGlmIChydW50aW1lSW5pdGlhbGl6ZWQpIHJldHVybjtcbiAgICAgICAgICAgIHJ1bnRpbWVJbml0aWFsaXplZCA9IHRydWU7XG4gICAgICAgICAgICBjYWxsUnVudGltZUNhbGxiYWNrcyhfX0FUSU5JVF9fKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIHByZU1haW4oKSB7XG4gICAgICAgICAgICBjYWxsUnVudGltZUNhbGxiYWNrcyhfX0FUTUFJTl9fKTtcbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIGV4aXRSdW50aW1lKCkge1xuICAgICAgICAgICAgY2FsbFJ1bnRpbWVDYWxsYmFja3MoX19BVEVYSVRfXyk7XG4gICAgICAgIH1cblxuICAgICAgICBmdW5jdGlvbiBwb3N0UnVuKCkge1xuICAgICAgICAgICAgLy8gY29tcGF0aWJpbGl0eSAtIG1lcmdlIGluIGFueXRoaW5nIGZyb20gTW9kdWxlWydwb3N0UnVuJ10gYXQgdGhpcyB0aW1lXG4gICAgICAgICAgICBpZiAoTW9kdWxlWydwb3N0UnVuJ10pIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIE1vZHVsZVsncG9zdFJ1biddID09ICdmdW5jdGlvbicpXG4gICAgICAgICAgICAgICAgICAgIE1vZHVsZVsncG9zdFJ1biddID0gW01vZHVsZVsncG9zdFJ1biddXTtcbiAgICAgICAgICAgICAgICB3aGlsZSAoTW9kdWxlWydwb3N0UnVuJ10ubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIGFkZE9uUG9zdFJ1bihNb2R1bGVbJ3Bvc3RSdW4nXS5zaGlmdCgpKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjYWxsUnVudGltZUNhbGxiYWNrcyhfX0FUUE9TVFJVTl9fKTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBAZnVuY3Rpb24gYWRkT25QcmVSdW5cbiAgICAgICAgICogQG1lbWJlcm9mIExpYlRpTWlkaXR5XG4gICAgICAgICAqIEBpbnN0YW5jZVxuICAgICAgICAgKiBAcGFyYW0gY2IgQ2FsbGJhY2suXG4gICAgICAgICAqL1xuXG4gICAgICAgIGZ1bmN0aW9uIGFkZE9uUHJlUnVuKGNiKSB7XG4gICAgICAgICAgICBfX0FUUFJFUlVOX18udW5zaGlmdChjYik7XG4gICAgICAgIH1cblxuICAgICAgICBNb2R1bGVbJ2FkZE9uUHJlUnVuJ10gPSBNb2R1bGUuYWRkT25QcmVSdW4gPSBhZGRPblByZVJ1bjtcblxuICAgICAgICAvKipcbiAgICAgICAgICogQGZ1bmN0aW9uIGFkZE9uSW5pdFxuICAgICAgICAgKiBAbWVtYmVyb2YgTGliVGlNaWRpdHlcbiAgICAgICAgICogQGluc3RhbmNlXG4gICAgICAgICAqIEBwYXJhbSBjYiBDYWxsYmFjay5cbiAgICAgICAgICovXG5cbiAgICAgICAgZnVuY3Rpb24gYWRkT25Jbml0KGNiKSB7XG4gICAgICAgICAgICBfX0FUSU5JVF9fLnVuc2hpZnQoY2IpO1xuICAgICAgICB9XG5cbiAgICAgICAgTW9kdWxlWydhZGRPbkluaXQnXSA9IGFkZE9uSW5pdDtcblxuICAgICAgICAvKipcbiAgICAgICAgICogQGZ1bmN0aW9uIGFkZE9uUHJlTWFpblxuICAgICAgICAgKiBAbWVtYmVyb2YgTGliVGlNaWRpdHlcbiAgICAgICAgICogQGluc3RhbmNlXG4gICAgICAgICAqIEBwYXJhbSBjYiBDYWxsYmFjay5cbiAgICAgICAgICovXG5cbiAgICAgICAgZnVuY3Rpb24gYWRkT25QcmVNYWluKGNiKSB7XG4gICAgICAgICAgICBfX0FUTUFJTl9fLnVuc2hpZnQoY2IpO1xuICAgICAgICB9XG5cbiAgICAgICAgTW9kdWxlWydhZGRPblByZU1haW4nXSA9IGFkZE9uUHJlTWFpbjtcblxuICAgICAgICAvKipcbiAgICAgICAgICogQGZ1bmN0aW9uIGFkZE9uRXhpdFxuICAgICAgICAgKiBAbWVtYmVyb2YgTGliVGlNaWRpdHlcbiAgICAgICAgICogQGluc3RhbmNlXG4gICAgICAgICAqIEBwYXJhbSBjYiBDYWxsYmFjay5cbiAgICAgICAgICovXG5cbiAgICAgICAgZnVuY3Rpb24gYWRkT25FeGl0KGNiKSB7XG4gICAgICAgICAgICBfX0FURVhJVF9fLnVuc2hpZnQoY2IpO1xuICAgICAgICB9XG5cbiAgICAgICAgTW9kdWxlWydhZGRPbkV4aXQnXSA9IGFkZE9uRXhpdDtcblxuICAgICAgICAvKipcbiAgICAgICAgICogQGZ1bmN0aW9uIGFkZE9uUG9zdFJ1blxuICAgICAgICAgKiBAbWVtYmVyb2YgTGliVGlNaWRpdHlcbiAgICAgICAgICogQGluc3RhbmNlXG4gICAgICAgICAqIEBwYXJhbSBjYiBDYWxsYmFjay5cbiAgICAgICAgICovXG5cbiAgICAgICAgZnVuY3Rpb24gYWRkT25Qb3N0UnVuKGNiKSB7XG4gICAgICAgICAgICBfX0FUUE9TVFJVTl9fLnVuc2hpZnQoY2IpO1xuICAgICAgICB9XG5cbiAgICAgICAgTW9kdWxlWydhZGRPblBvc3RSdW4nXSA9IGFkZE9uUG9zdFJ1bjtcblxuICAgICAgICAvKipcbiAgICAgICAgICogQGZ1bmN0aW9uIGludEFycmF5RnJvbVN0cmluZ1xuICAgICAgICAgKiBAbWVtYmVyb2YgTGliVGlNaWRpdHlcbiAgICAgICAgICogQGluc3RhbmNlXG4gICAgICAgICAqIEBwYXJhbSBzdHJpbmd5XG4gICAgICAgICAqIEBwYXJhbSBkb250QWRkTnVsbFxuICAgICAgICAgKiBAcGFyYW0gbGVuZ3RoXG4gICAgICAgICAqL1xuXG4gICAgICAgIC8vIFRvb2xzXG4gICAgICAgIC8vIFRoaXMgcHJvY2Vzc2VzIGEgSlMgc3RyaW5nIGludG8gYSBDLWxpbmUgYXJyYXkgb2YgbnVtYmVycywgMC10ZXJtaW5hdGVkLlxuICAgICAgICAvLyBGb3IgTExWTS1vcmlnaW5hdGluZyBzdHJpbmdzLCBzZWUgcGFyc2VyLmpzOnBhcnNlTExWTVN0cmluZyBmdW5jdGlvblxuICAgICAgICBmdW5jdGlvbiBpbnRBcnJheUZyb21TdHJpbmcoXG4gICAgICAgICAgICBzdHJpbmd5LFxuICAgICAgICAgICAgZG9udEFkZE51bGwsXG4gICAgICAgICAgICBsZW5ndGggLyogb3B0aW9uYWwgKi9cbiAgICAgICAgKSB7XG4gICAgICAgICAgICBjb25zdCByZXQgPSBuZXcgUnVudGltZS5VVEY4UHJvY2Vzc29yKCkucHJvY2Vzc0pTU3RyaW5nKHN0cmluZ3kpO1xuICAgICAgICAgICAgaWYgKGxlbmd0aCkge1xuICAgICAgICAgICAgICAgIHJldC5sZW5ndGggPSBsZW5ndGg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIWRvbnRBZGROdWxsKSB7XG4gICAgICAgICAgICAgICAgcmV0LnB1c2goMCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgICB9XG5cbiAgICAgICAgTW9kdWxlWydpbnRBcnJheUZyb21TdHJpbmcnXSA9IGludEFycmF5RnJvbVN0cmluZztcblxuICAgICAgICAvKipcbiAgICAgICAgICogQGZ1bmN0aW9uIGludEFycmF5VG9TdHJpbmdcbiAgICAgICAgICogQG1lbWJlcm9mIExpYlRpTWlkaXR5XG4gICAgICAgICAqIEBpbnN0YW5jZVxuICAgICAgICAgKiBAcGFyYW0gYXJyYXlcbiAgICAgICAgICovXG5cbiAgICAgICAgZnVuY3Rpb24gaW50QXJyYXlUb1N0cmluZyhhcnJheSkge1xuICAgICAgICAgICAgY29uc3QgcmV0ID0gW107XG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IGFycmF5Lmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgbGV0IGNociA9IGFycmF5W2ldO1xuICAgICAgICAgICAgICAgIGlmIChjaHIgPiAweGZmKSB7XG4gICAgICAgICAgICAgICAgICAgIGNociAmPSAweGZmO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXQucHVzaChTdHJpbmcuZnJvbUNoYXJDb2RlKGNocikpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgcmV0dXJuIHJldC5qb2luKCcnKTtcbiAgICAgICAgfVxuXG4gICAgICAgIE1vZHVsZVsnaW50QXJyYXlUb1N0cmluZyddID0gaW50QXJyYXlUb1N0cmluZztcblxuICAgICAgICAvKipcbiAgICAgICAgICogQGZ1bmN0aW9uIHdyaXRlU3RyaW5nVG9NZW1vcnlcbiAgICAgICAgICogQG1lbWJlcm9mIExpYlRpTWlkaXR5XG4gICAgICAgICAqIEBpbnN0YW5jZVxuICAgICAgICAgKiBAcGFyYW0gc3RyaW5nXG4gICAgICAgICAqIEBwYXJhbSBidWZmZXJcbiAgICAgICAgICogQHBhcmFtIGRvbnRBZGROdWxsXG4gICAgICAgICAqL1xuXG4gICAgICAgIC8vIFdyaXRlIGEgSmF2YXNjcmlwdCBhcnJheSB0byBzb21ld2hlcmUgaW4gdGhlIGhlYXBcbiAgICAgICAgZnVuY3Rpb24gd3JpdGVTdHJpbmdUb01lbW9yeShzdHJpbmcsIGJ1ZmZlciwgZG9udEFkZE51bGwpIHtcbiAgICAgICAgICAgIGNvbnN0IGFycmF5ID0gaW50QXJyYXlGcm9tU3RyaW5nKHN0cmluZywgZG9udEFkZE51bGwpO1xuICAgICAgICAgICAgbGV0IGkgPSAwO1xuICAgICAgICAgICAgd2hpbGUgKGkgPCBhcnJheS5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBjaHIgPSBhcnJheVtpXTtcbiAgICAgICAgICAgICAgICBIRUFQOFsoYnVmZmVyICsgaSkgfCAwXSA9IGNocjtcbiAgICAgICAgICAgICAgICBpID0gaSArIDE7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBNb2R1bGVbJ3dyaXRlU3RyaW5nVG9NZW1vcnknXSA9IHdyaXRlU3RyaW5nVG9NZW1vcnk7XG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIEBmdW5jdGlvbiB3cml0ZUFycmF5VG9NZW1vcnlcbiAgICAgICAgICogQG1lbWJlcm9mIExpYlRpTWlkaXR5XG4gICAgICAgICAqIEBpbnN0YW5jZVxuICAgICAgICAgKiBAcGFyYW0gYXJyYXlcbiAgICAgICAgICogQHBhcmFtIGJ1ZmZlclxuICAgICAgICAgKi9cblxuICAgICAgICBmdW5jdGlvbiB3cml0ZUFycmF5VG9NZW1vcnkoYXJyYXksIGJ1ZmZlcikge1xuICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBhcnJheS5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIEhFQVA4WyhidWZmZXIgKyBpKSB8IDBdID0gYXJyYXlbaV07XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBNb2R1bGVbJ3dyaXRlQXJyYXlUb01lbW9yeSddID0gd3JpdGVBcnJheVRvTWVtb3J5O1xuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBAZnVuY3Rpb24gd3JpdGVBc2NpaVRvTWVtb3J5XG4gICAgICAgICAqIEBtZW1iZXJvZiBMaWJUaU1pZGl0eVxuICAgICAgICAgKiBAaW5zdGFuY2VcbiAgICAgICAgICogQHBhcmFtIHN0clxuICAgICAgICAgKiBAcGFyYW0gYnVmZmVyXG4gICAgICAgICAqIEBwYXJhbSBkb250QWRkTnVsbFxuICAgICAgICAgKi9cblxuICAgICAgICBmdW5jdGlvbiB3cml0ZUFzY2lpVG9NZW1vcnkoc3RyLCBidWZmZXIsIGRvbnRBZGROdWxsKSB7XG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHN0ci5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgIEhFQVA4WyhidWZmZXIgKyBpKSB8IDBdID0gc3RyLmNoYXJDb2RlQXQoaSk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoIWRvbnRBZGROdWxsKSBIRUFQOFsoYnVmZmVyICsgc3RyLmxlbmd0aCkgfCAwXSA9IDA7XG4gICAgICAgIH1cblxuICAgICAgICBNb2R1bGVbJ3dyaXRlQXNjaWlUb01lbW9yeSddID0gd3JpdGVBc2NpaVRvTWVtb3J5O1xuXG4gICAgICAgIGZ1bmN0aW9uIHVuU2lnbih2YWx1ZSwgYml0cywgaWdub3JlLCBzaWcpIHtcbiAgICAgICAgICAgIGlmICh2YWx1ZSA+PSAwKSB7XG4gICAgICAgIC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gICAgICAgICAqIEBpbnN0YW5jZVxuICAgICAgICAgKiBAcGFyYW0gaWRcbiAgICAgICAgICovXG5cbiAgICAgICAgZnVuY3Rpb24gYWRkUnVuRGVwZW5kZW5jeShpZCkge1xuICAgICAgICAgICAgcnVuRGVwZW5kZW5jaWVzKys7XG4gICAgICAgICAgICBpZiAoTW9kdWxlWydtb25pdG9yUnVuRGVwZW5kZW5jaWVzJ10pIHtcbiAgICAgICAgICAgICAgICBNb2R1bGVbJ21vbml0b3JSdW5EZXBlbmRlbmNpZXMnXShydW5EZXBlbmRlbmNpZXMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGlkKSB7XG4gICAgICAgICAgICAgICAgYXNzZXJ0KCFydW5EZXBlbmRlbmN5VHJhY2tpbmdbaWRdKTtcbiAgICAgICAgICAgICAgICBydW5EZXBlbmRlbmN5VHJhY2tpbmdbaWRdID0gMTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY29uc29sZS53YXJuKCd3YXJuaW5nOiBydW4gZGVwZW5kZW5jeSBhZGRlZCB3aXRob3V0IElEJyk7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBNb2R1bGVbJ2FkZFJ1bkRlcGVuZGVuY3knXSA9IGFkZFJ1bkRlcGVuZGVuY3k7XG5cbiAgICAgICAgLyoqXG4gICAgICAgICAqIEBmdW5jdGlvbiByZW1vdmVSdW5EZXBlbmRlbmN5XG4gICAgICAgICAqIEBtZW1iZXJvZiBMaWJUaU1pZGl0eVxuICAgICAgICAgKiBAaW5zdGFuY2VcbiAgICAgICAgICogQHBhcmFtIGlkXG4gICAgICAgICAqL1xuXG4gICAgICAgIGZ1bmN0aW9uIHJlbW92ZVJ1bkRlcGVuZGVuY3koaWQpIHtcbiAgICAgICAgICAgIHJ1bkRlcGVuZGVuY2llcy0tO1xuICAgICAgICAgICAgaWYgKE1vZHVsZVsnbW9uaXRvclJ1bkRlcGVuZGVuY2llcyddKSB7XG4gICAgICAgICAgICAgICAgTW9kdWxlWydtb25pdG9yUnVuRGVwZW5kZW5jaWVzJ10ocnVuRGVwZW5kZW5jaWVzKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChpZCkge1xuICAgICAgICAgICAgICAgIGFzc2VydChydW5EZXBlbmRlbmN5VHJhY2tpbmdbaWRdKTtcbiAgICAgICAgICAgICAgICBkZWxldGUgcnVuRGVwZW5kZW5jeVRyYWNraW5nW2lkXTtcbiAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgY29uc29sZS53YXJuKCd3YXJuaW5nOiBydW4gZGVwZW5kZW5jeSByZW1vdmVkIHdpdGhvdXQgSUQnKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChydW5EZXBlbmRlbmNpZXMgPT0gMCkge1xuICAgICAgICAgICAgICAgIGlmIChydW5EZXBlbmRlbmN5V2F0Y2hlciAhPT0gbnVsbCkge1xuICAgICAgICAgICAgICAgICAgICBjbGVhckludGVydmFsKHJ1bkRlcGVuZGVuY3lXYXRjaGVyKTtcbiAgICAgICAgICAgICAgICAgICAgcnVuRGVwZW5kZW5jeVdhdGNoZXIgPSBudWxsO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoZGVwZW5kZW5jaWVzRnVsZmlsbGVkKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGNhbGxiYWNrID0gZGVwZW5kZW5jaWVzRnVsZmlsbGVkO1xuICAgICAgICAgICAgICAgICAgICBkZXBlbmRlbmNpZXNGdWxmaWxsZWQgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICBjYWxsYmFjaygpOyAvLyBjYW4gYWRkIGFub3RoZXIgZGVwZW5kZW5jaWVzRnVsZmlsbGVkXG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgTW9kdWxlWydyZW1vdmVSdW5EZXBlbmRlbmN5J10gPSByZW1vdmVSdW5EZXBlbmRlbmN5O1xuXG4gICAgICAgIGNvbnN0IG1lbW9yeUluaXRpYWxpemVyID0gbnVsbDtcbiAgICAgICAgLy8gPT09IEJvZHkgPT09XG4gICAgICAgIFNUQVRJQ19CQVNFID0gODtcbiAgICAgICAgU1RBVElDVE9QID0gU1RBVElDX0JBU0UgKyA4NDQ4O1xuICAgICAgICAvKiBnbG9iYWwgaW5pdGlhbGl6ZXJzICovIF9fQVRJTklUX18ucHVzaCh7XG4gICAgICAgICAgICBmdW5jOiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICBydW5Qb3N0U2V0cygpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgdmFyIF9zdGRlcnI7XG4gICAgICAgIHZhciBfc3RkZXJyID0gKF9zdGRlcnIgPSBhbGxvY2F0ZShcbiAgICAgICAgICAgIFswLCAwLCAwLCAwLCAwLCAwLCAwLCAwXSxcbiAgICAgICAgICAgICdpOCcsXG4gICAgICAgICAgICBBTExPQ19TVEFUSUNcbiAgICAgICAgKSk7XG4gICAgICAgIC8qIG1lbW9yeSBpbml0aWFsaXplciAqL1xuICAgICAgICAvLyBwcmV0dGllci1pZ25vcmVcbiAgICAgICAgYWxsb2NhdGUoTUVNT1JZX0FMTE9DQVRJT04sIFwiaThcIiwgQUxMT0NfTk9ORSwgUnVudGltZS5HTE9CQUxfQkFTRSlcbiAgICAgICAgY29uc3QgdGVtcERvdWJsZVB0ciA9IFJ1bnRpbWUuYWxpZ25NZW1vcnkoXG4gICAgICAgICAgICBhbGxvY2F0ZSgxMiwgJ2k4JywgQUxMT0NfU1RBVElDKSxcbiAgICAgICAgICAgIDhcbiAgICAgICAgKTtcbiAgICAgICAgYXNzZXJ0KHRlbXBEb3VibGVQdHIgJSA4ID09IDApO1xuXG4gICAgICAgIGxldCBfX19lcnJub19zdGF0ZSA9IDA7XG4gICAgICAgIGZ1bmN0aW9uIF9fX3NldEVyck5vKHZhbHVlKSB7XG4gICAgICAgICAgICAvLyBGb3IgY29udmVuaWVudCBzZXR0aW5nIGFuZCByZXR1cm5pbmcgb2YgZXJybm8uXG4gICAgICAgICAgICBIRUFQMzJbX19fZXJybm9fc3RhdGUgPj4gMl0gPSB2YWx1ZTtcbiAgICAgICAgICAgIHJldHVybiB2YWx1ZTtcbiAgICAgICAgfVxuXG4gICAgICAgIGNvbnN0IFBBVEggPSB7XG4gICAgICAgICAgICBzcGxpdFBhdGg6IGZ1bmN0aW9uKGZpbGVuYW1lKSB7XG4gICAgICAgICAgICAgICAgY29uc3Qgc3BsaXRQYXRoUmUgPSAvXihcXC8/fCkoW1xcc1xcU10qPykoKD86XFwuezEsMn18W15cXC9dKz98KShcXC5bXi5cXC9dKnwpKSg/OltcXC9dKikkLztcbiAgICAgICAgICAgICAgICByZXR1cm4gc3BsaXRQYXRoUmUuZXhlYyhmaWxlbmFtZSkuc2xpY2UoMSk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbm9ybWFsaXplQXJyYXk6IGZ1bmN0aW9uKHBhcnRzLCBhbGxvd0Fib3ZlUm9vdCkge1xuICAgICAgICAgICAgICAgIC8vIGlmIHRoZSBwYXRoIHRyaWVzIHRvIGdvIGFib3ZlIHRoZSByb290LCBgdXBgIGVuZHMgdXAgPiAwXG4gICAgICAgICAgICAgICAgbGV0IHVwID0gMDtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gcGFydHMubGVuZ3RoIC0gMTsgaSA+PSAwOyBpLS0pIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgbGFzdCA9IHBhcnRzW2ldO1xuICAgICAgICAgICAgICAgICAgICBpZiAobGFzdCA9PT0gJy4nKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJ0cy5zcGxpY2UoaSwgMSk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobGFzdCA9PT0gJy4uJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFydHMuc3BsaWNlKGksIDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdXArKztcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICh1cCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFydHMuc3BsaWNlKGksIDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdXAtLTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBpZiB0aGUgcGF0aCBpcyBhbGxvd2VkIHRvIGdvIGFib3ZlIHRoZSByb290LCByZXN0b3JlIGxlYWRpbmcgLi5zXG4gICAgICAgICAgICAgICAgaWYgKGFsbG93QWJvdmVSb290KSB7XG4gICAgICAgICAgICAgICAgICAgIGZvciAoOyB1cC0tOyB1cCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcGFydHMudW5zaGlmdCgnLi4nKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gcGFydHM7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbm9ybWFsaXplOiBmdW5jdGlvbihwYXRoKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgaXNBYnNvbHV0ZSA9IHBhdGguY2hhckF0KDApID09PSAnLycsXG4gICAgICAgICAgICAgICAgICAgIHRyYWlsaW5nU2xhc2ggPSBwYXRoLnN1YnN0cigtMSkgPT09ICcvJztcbiAgICAgICAgICAgICAgICAvLyBOb3JtYWxpemUgdGhlIHBhdGhcbiAgICAgICAgICAgICAgICBwYXRoID0gUEFUSC5ub3JtYWxpemVBcnJheShcbiAgICAgICAgICAgICAgICAgICAgcGF0aC5zcGxpdCgnLycpLmZpbHRlcihmdW5jdGlvbihwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gISFwO1xuICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgIWlzQWJzb2x1dGVcbiAgICAgICAgICAgICAgICApLmpvaW4oJy8nKTtcbiAgICAgICAgICAgICAgICBpZiAoIXBhdGggJiYgIWlzQWJzb2x1dGUpIHtcbiAgICAgICAgICAgICAgICAgICAgcGF0aCA9ICcuJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKHBhdGggJiYgdHJhaWxpbmdTbGFzaCkge1xuICAgICAgICAgICAgICAgICAgICBwYXRoICs9ICcvJztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIChpc0Fic29sdXRlID8gJy8nIDogJycpICsgcGF0aDtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBkaXJuYW1lOiBmdW5jdGlvbihwYXRoKSB7XG4gICAgICAgICAgICAgICAgbGV0IHJlc3VsdCA9IFBBVEguc3BsaXRQYXRoKHBhdGgpLFxuICAgICAgICAgICAgICAgICAgICByb290ID0gcmVzdWx0WzBdLFxuICAgICAgICAgICAgICAgICAgICBkaXIgPSByZXN1bHRbMV07XG4gICAgICAgICAgICAgICAgaWYgKCFyb290ICYmICFkaXIpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gTm8gZGlybmFtZSB3aGF0c29ldmVyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAnLic7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChkaXIpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gSXQgaGFzIGEgZGlybmFtZSwgc3RyaXAgdHJhaWxpbmcgc2xhc2hcbiAgICAgICAgICAgICAgICAgICAgZGlyID0gZGlyLnN1YnN0cigwLCBkaXIubGVuZ3RoIC0gMSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiByb290ICsgZGlyO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGJhc2VuYW1lOiBmdW5jdGlvbihwYXRoLCBleHQpIHtcbiAgICAgICAgICAgICAgICAvLyBFTVNDUklQVEVOIHJldHVybiAnLycnIGZvciAnLycsIG5vdCBhbiBlbXB0eSBzdHJpbmdcbiAgICAgICAgICAgICAgICBpZiAocGF0aCA9PT0gJy8nKSByZXR1cm4gJy8nO1xuICAgICAgICAgICAgICAgIGxldCBmID0gUEFUSC5zcGxpdFBhdGgocGF0aClbMl07XG4gICAgICAgICAgICAgICAgaWYgKGV4dCAmJiBmLnN1YnN0cigtMSAqIGV4dC5sZW5ndGgpID09PSBleHQpIHtcbiAgICAgICAgICAgICAgICAgICAgZiA9IGYuc3Vic3RyKDAsIGYubGVuZ3RoIC0gZXh0Lmxlbmd0aCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBmO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGV4dG5hbWU6IGZ1bmN0aW9uKHBhdGgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gUEFUSC5zcGxpdFBhdGgocGF0aClbM107XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgam9pbjogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgcGF0aHMgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChhcmd1bWVudHMsIDApO1xuICAgICAgICAgICAgICAgIHJldHVybiBQQVRILm5vcm1hbGl6ZShcbiAgICAgICAgICAgICAgICAgICAgcGF0aHNcbiAgICAgICAgICAgICAgICAgICAgICAgIC5maWx0ZXIoZnVuY3Rpb24ocCwgaW5kZXgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHAgIT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBUeXBlRXJyb3IoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnQXJndW1lbnRzIHRvIHBhdGguam9pbiBtdXN0IGJlIHN0cmluZ3MnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBwO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSlcbiAgICAgICAgICAgICAgICAgICAgICAgIC5qb2luKCcvJylcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHJlc29sdmU6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgIGxldCByZXNvbHZlZFBhdGggPSAnJyxcbiAgICAgICAgICAgICAgICAgICAgcmVzb2x2ZWRBYnNvbHV0ZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIGZvciAoXG4gICAgICAgICAgICAgICAgICAgIGxldCBpID0gYXJndW1lbnRzLmxlbmd0aCAtIDE7XG4gICAgICAgICAgICAgICAgICAgIGkgPj0gLTEgJiYgIXJlc29sdmVkQWJzb2x1dGU7XG4gICAgICAgICAgICAgICAgICAgIGktLVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBwYXRoID0gaSA+PSAwID8gYXJndW1lbnRzW2ldIDogRlMuY3dkKCk7XG4gICAgICAgICAgICAgICAgICAgIC8vIFNraXAgZW1wdHkgYW5kIGludmFsaWQgZW50cmllc1xuICAgICAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHBhdGggIT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgVHlwZUVycm9yKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdBcmd1bWVudHMgdG8gcGF0aC5yZXNvbHZlIG11c3QgYmUgc3RyaW5ncydcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoIXBhdGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmVkUGF0aCA9IHBhdGggKyAnLycgKyByZXNvbHZlZFBhdGg7XG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmVkQWJzb2x1dGUgPSBwYXRoLmNoYXJBdCgwKSA9PT0gJy8nO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBBdCB0aGlzIHBvaW50IHRoZSBwYXRoIHNob3VsZCBiZSByZXNvbHZlZCB0byBhIGZ1bGwgYWJzb2x1dGUgcGF0aCwgYnV0IGhhbmRsZSByZWxhdGl2ZSBwYXRocyB0byBiZSBzYWZlIChtaWdodCBoYXBwZW4gd2hlbiBwcm9jZXNzLmN3ZCgpIGZhaWxzKVxuICAgICAgICAgICAgICAgIHJlc29sdmVkUGF0aCA9IFBBVEgubm9ybWFsaXplQXJyYXkoXG4gICAgICAgICAgICAgICAgICAgIHJlc29sdmVkUGF0aC5zcGxpdCgnLycpLmZpbHRlcihmdW5jdGlvbihwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gISFwO1xuICAgICAgICAgICAgICAgICAgICB9KSxcbiAgICAgICAgICAgICAgICAgICAgIXJlc29sdmVkQWJzb2x1dGVcbiAgICAgICAgICAgICAgICApLmpvaW4oJy8nKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gKHJlc29sdmVkQWJzb2x1dGUgPyAnLycgOiAnJykgKyByZXNvbHZlZFBhdGggfHwgJy4nO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHJlbGF0aXZlOiBmdW5jdGlvbihmcm9tLCB0bykge1xuICAgICAgICAgICAgICAgIGZyb20gPSBQQVRILnJlc29sdmUoZnJvbSkuc3Vic3RyKDEpO1xuICAgICAgICAgICAgICAgIHRvID0gUEFUSC5yZXNvbHZlKHRvKS5zdWJzdHIoMSk7XG4gICAgICAgICAgICAgICAgZnVuY3Rpb24gdHJpbShhcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IHN0YXJ0ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgZm9yICg7IHN0YXJ0IDwgYXJyLmxlbmd0aDsgc3RhcnQrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFycltzdGFydF0gIT09ICcnKSBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBsZXQgZW5kID0gYXJyLmxlbmd0aCAtIDE7XG4gICAgICAgICAgICAgICAgICAgIGZvciAoOyBlbmQgPj0gMDsgZW5kLS0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhcnJbZW5kXSAhPT0gJycpIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChzdGFydCA+IGVuZCkgcmV0dXJuIFtdO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYXJyLnNsaWNlKHN0YXJ0LCBlbmQgLSBzdGFydCArIDEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCBmcm9tUGFydHMgPSB0cmltKGZyb20uc3BsaXQoJy8nKSk7XG4gICAgICAgICAgICAgICAgY29uc3QgdG9QYXJ0cyA9IHRyaW0odG8uc3BsaXQoJy8nKSk7XG4gICAgICAgICAgICAgICAgdmFyIGxlbmd0aCA9IE1hdGgubWluKGZyb21QYXJ0cy5sZW5ndGgsIHRvUGFydHMubGVuZ3RoKTtcbiAgICAgICAgICAgICAgICBsZXQgc2FtZVBhcnRzTGVuZ3RoID0gbGVuZ3RoO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSAwOyBpIDwgbGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGZyb21QYXJ0c1tpXSAhPT0gdG9QYXJ0c1tpXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc2FtZVBhcnRzTGVuZ3RoID0gaTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxldCBvdXRwdXRQYXJ0cyA9IFtdO1xuICAgICAgICAgICAgICAgIGZvciAodmFyIGkgPSBzYW1lUGFydHNMZW5ndGg7IGkgPCBmcm9tUGFydHMubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0UGFydHMucHVzaCgnLi4nKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgb3V0cHV0UGFydHMgPSBvdXRwdXRQYXJ0cy5jb25jYXQoXG4gICAgICAgICAgICAgICAgICAgIHRvUGFydHMuc2xpY2Uoc2FtZVBhcnRzTGVuZ3RoKVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG91dHB1dFBhcnRzLmpvaW4oJy8nKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgY29uc3QgVFRZID0ge1xuICAgICAgICAgICAgdHR5czogW10sXG4gICAgICAgICAgICBpbml0OiBmdW5jdGlvbigpIHt9LFxuICAgICAgICAgICAgc2h1dGRvd246IGZ1bmN0aW9uKCkge30sXG4gICAgICAgICAgICByZWdpc3RlcjogZnVuY3Rpb24oZGV2LCBvcHMpIHtcbiAgICAgICAgICAgICAgICBUVFkudHR5c1tkZXZdID0geyBpbnB1dDogW10sIG91dHB1dDogW10sIG9wczogb3BzIH07XG4gICAgICAgICAgICAgICAgRlMucmVnaXN0ZXJEZXZpY2UoZGV2LCBUVFkuc3RyZWFtX29wcyk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc3RyZWFtX29wczoge1xuICAgICAgICAgICAgICAgIG9wZW46IGZ1bmN0aW9uKHN0cmVhbSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB0dHkgPSBUVFkudHR5c1tzdHJlYW0ubm9kZS5yZGV2XTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCF0dHkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVOT0RFVik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgc3RyZWFtLnR0eSA9IHR0eTtcbiAgICAgICAgICAgICAgICAgICAgc3RyZWFtLnNlZWthYmxlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBjbG9zZTogZnVuY3Rpb24oc3RyZWFtKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGZsdXNoIGFueSBwZW5kaW5nIGxpbmUgZGF0YVxuICAgICAgICAgICAgICAgICAgICBpZiAoc3RyZWFtLnR0eS5vdXRwdXQubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHJlYW0udHR5Lm9wcy5wdXRfY2hhcihzdHJlYW0udHR5LCAxMCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHJlYWQ6IGZ1bmN0aW9uKHN0cmVhbSwgYnVmZmVyLCBvZmZzZXQsIGxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXN0cmVhbS50dHkgfHwgIXN0cmVhbS50dHkub3BzLmdldF9jaGFyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FTlhJTyk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbGV0IGJ5dGVzUmVhZCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZXN1bHQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IHN0cmVhbS50dHkub3BzLmdldF9jaGFyKHN0cmVhbS50dHkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVJTyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0ID09PSB1bmRlZmluZWQgJiYgYnl0ZXNSZWFkID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRUFHQUlOKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQgPT09IG51bGwgfHwgcmVzdWx0ID09PSB1bmRlZmluZWQpIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnl0ZXNSZWFkKys7XG4gICAgICAgICAgICAgICAgICAgICAgICBidWZmZXJbb2Zmc2V0ICsgaV0gPSByZXN1bHQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKGJ5dGVzUmVhZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RyZWFtLm5vZGUudGltZXN0YW1wID0gRGF0ZS5ub3coKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gYnl0ZXNSZWFkO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgd3JpdGU6IGZ1bmN0aW9uKHN0cmVhbSwgYnVmZmVyLCBvZmZzZXQsIGxlbmd0aCwgcG9zKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghc3RyZWFtLnR0eSB8fCAhc3RyZWFtLnR0eS5vcHMucHV0X2NoYXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVOWElPKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHN0cmVhbS50dHkub3BzLnB1dF9jaGFyKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJlYW0udHR5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWZmZXJbb2Zmc2V0ICsgaV1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVJTyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKGxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RyZWFtLm5vZGUudGltZXN0YW1wID0gRGF0ZS5ub3coKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gaTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZGVmYXVsdF90dHlfb3BzOiB7XG4gICAgICAgICAgICAgICAgZ2V0X2NoYXI6IGZ1bmN0aW9uKHR0eSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXR0eS5pbnB1dC5sZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCByZXN1bHQgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmVzdWx0ID0gd2luZG93LnByb21wdCgnSW5wdXQ6ICcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFyZXN1bHQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCArPSAnXFxuJztcbiAgICAgICAgICAgICAgICAgICAgICAgIHR0eS5pbnB1dCA9IGludEFycmF5RnJvbVN0cmluZyhyZXN1bHQsIHRydWUpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0dHkuaW5wdXQuc2hpZnQoKTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHB1dF9jaGFyOiBmdW5jdGlvbih0dHksIHZhbCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAodmFsID09PSBudWxsIHx8IHZhbCA9PT0gMTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnNvbGUubG9nKHR0eS5vdXRwdXQuam9pbignJykpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdHR5Lm91dHB1dCA9IFtdO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdHR5Lm91dHB1dC5wdXNoKFRUWS51dGY4LnByb2Nlc3NDQ2hhcih2YWwpKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBkZWZhdWx0X3R0eTFfb3BzOiB7XG4gICAgICAgICAgICAgICAgcHV0X2NoYXI6IGZ1bmN0aW9uKHR0eSwgdmFsKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh2YWwgPT09IG51bGwgfHwgdmFsID09PSAxMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc29sZS53YXJuKHR0eS5vdXRwdXQuam9pbignJykpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdHR5Lm91dHB1dCA9IFtdO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgdHR5Lm91dHB1dC5wdXNoKFRUWS51dGY4LnByb2Nlc3NDQ2hhcih2YWwpKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgY29uc3QgTUVNRlMgPSB7XG4gICAgICAgICAgICBDT05URU5UX09XTklORzogMSxcbiAgICAgICAgICAgIENPTlRFTlRfRkxFWElCTEU6IDIsXG4gICAgICAgICAgICBDT05URU5UX0ZJWEVEOiAzLFxuICAgICAgICAgICAgbW91bnQ6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBNRU1GUy5jcmVhdGVOb2RlKG51bGwsICcvJywgMTYzODQgfCAwbzc3NywgMCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY3JlYXRlTm9kZTogZnVuY3Rpb24ocGFyZW50LCBuYW1lLCBtb2RlLCBkZXYpIHtcbiAgICAgICAgICAgICAgICBpZiAoRlMuaXNCbGtkZXYobW9kZSkgfHwgRlMuaXNGSUZPKG1vZGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIG5vdCBzdXBwb3J0ZWRcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRVBFUk0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCBub2RlID0gRlMuY3JlYXRlTm9kZShwYXJlbnQsIG5hbWUsIG1vZGUsIGRldik7XG4gICAgICAgICAgICAgICAgaWYgKEZTLmlzRGlyKG5vZGUubW9kZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgbm9kZS5ub2RlX29wcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGdldGF0dHI6IE1FTUZTLm5vZGVfb3BzLmdldGF0dHIsXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRhdHRyOiBNRU1GUy5ub2RlX29wcy5zZXRhdHRyLFxuICAgICAgICAgICAgICAgICAgICAgICAgbG9va3VwOiBNRU1GUy5ub2RlX29wcy5sb29rdXAsXG4gICAgICAgICAgICAgICAgICAgICAgICBta25vZDogTUVNRlMubm9kZV9vcHMubWtub2QsXG4gICAgICAgICAgICAgICAgICAgICAgICBta25vZDogTUVNRlMubm9kZV9vcHMubWtub2QsXG4gICAgICAgICAgICAgICAgICAgICAgICByZW5hbWU6IE1FTUZTLm5vZGVfb3BzLnJlbmFtZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHVubGluazogTUVNRlMubm9kZV9vcHMudW5saW5rLFxuICAgICAgICAgICAgICAgICAgICAgICAgcm1kaXI6IE1FTUZTLm5vZGVfb3BzLnJtZGlyLFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVhZGRpcjogTUVNRlMubm9kZV9vcHMucmVhZGRpcixcbiAgICAgICAgICAgICAgICAgICAgICAgIHN5bWxpbms6IE1FTUZTLm5vZGVfb3BzLnN5bWxpbmtcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgbm9kZS5zdHJlYW1fb3BzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGxzZWVrOiBNRU1GUy5zdHJlYW1fb3BzLmxsc2Vla1xuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICBub2RlLmNvbnRlbnRzID0ge307XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChGUy5pc0ZpbGUobm9kZS5tb2RlKSkge1xuICAgICAgICAgICAgICAgICAgICBub2RlLm5vZGVfb3BzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgZ2V0YXR0cjogTUVNRlMubm9kZV9vcHMuZ2V0YXR0cixcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldGF0dHI6IE1FTUZTLm5vZGVfb3BzLnNldGF0dHJcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgbm9kZS5zdHJlYW1fb3BzID0ge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGxzZWVrOiBNRU1GUy5zdHJlYW1fb3BzLmxsc2VlayxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlYWQ6IE1FTUZTLnN0cmVhbV9vcHMucmVhZCxcbiAgICAgICAgICAgICAgICAgICAgICAgIHdyaXRlOiBNRU1GUy5zdHJlYW1fb3BzLndyaXRlLFxuICAgICAgICAgICAgICAgICAgICAgICAgYWxsb2NhdGU6IE1FTUZTLnN0cmVhbV9vcHMuYWxsb2NhdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICBtbWFwOiBNRU1GUy5zdHJlYW1fb3BzLm1tYXBcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgbm9kZS5jb250ZW50cyA9IFtdO1xuICAgICAgICAgICAgICAgICAgICBub2RlLmNvbnRlbnRNb2RlID0gTUVNRlMuQ09OVEVOVF9GTEVYSUJMRTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKEZTLmlzTGluayhub2RlLm1vZGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIG5vZGUubm9kZV9vcHMgPSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBnZXRhdHRyOiBNRU1GUy5ub2RlX29wcy5nZXRhdHRyLFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0YXR0cjogTUVNRlMubm9kZV9vcHMuc2V0YXR0cixcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlYWRsaW5rOiBNRU1GUy5ub2RlX29wcy5yZWFkbGlua1xuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICBub2RlLnN0cmVhbV9vcHMgPSB7fTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKEZTLmlzQ2hyZGV2KG5vZGUubW9kZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgbm9kZS5ub2RlX29wcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGdldGF0dHI6IE1FTUZTLm5vZGVfb3BzLmdldGF0dHIsXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRhdHRyOiBNRU1GUy5ub2RlX29wcy5zZXRhdHRyXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIG5vZGUuc3RyZWFtX29wcyA9IEZTLmNocmRldl9zdHJlYW1fb3BzO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBub2RlLnRpbWVzdGFtcCA9IERhdGUubm93KCk7XG4gICAgICAgICAgICAgICAgLy8gYWRkIHRoZSBuZXcgbm9kZSB0byB0aGUgcGFyZW50XG4gICAgICAgICAgICAgICAgaWYgKHBhcmVudCkge1xuICAgICAgICAgICAgICAgICAgICBwYXJlbnQuY29udGVudHNbbmFtZV0gPSBub2RlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gbm9kZTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBlbnN1cmVGbGV4aWJsZTogZnVuY3Rpb24obm9kZSkge1xuICAgICAgICAgICAgICAgIGlmIChub2RlLmNvbnRlbnRNb2RlICE9PSBNRU1GUy5DT05URU5UX0ZMRVhJQkxFKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGNvbnRlbnRzID0gbm9kZS5jb250ZW50cztcbiAgICAgICAgICAgICAgICAgICAgbm9kZS5jb250ZW50cyA9IEFycmF5LnByb3RvdHlwZS5zbGljZS5jYWxsKGNvbnRlbnRzKTtcbiAgICAgICAgICAgICAgICAgICAgbm9kZS5jb250ZW50TW9kZSA9IE1FTUZTLkNPTlRFTlRfRkxFWElCTEU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG5vZGVfb3BzOiB7XG4gICAgICAgICAgICAgICAgZ2V0YXR0cjogZnVuY3Rpb24obm9kZSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBhdHRyID0ge307XG4gICAgICAgICAgICAgICAgICAgIC8vIGRldmljZSBudW1iZXJzIHJldXNlIGlub2RlIG51bWJlcnMuXG4gICAgICAgICAgICAgICAgICAgIGF0dHIuZGV2ID0gRlMuaXNDaHJkZXYobm9kZS5tb2RlKSA/IG5vZGUuaWQgOiAxO1xuICAgICAgICAgICAgICAgICAgICBhdHRyLmlubyA9IG5vZGUuaWQ7XG4gICAgICAgICAgICAgICAgICAgIGF0dHIubW9kZSA9IG5vZGUubW9kZTtcbiAgICAgICAgICAgICAgICAgICAgYXR0ci5ubGluayA9IDE7XG4gICAgICAgICAgICAgICAgICAgIGF0dHIudWlkID0gMDtcbiAgICAgICAgICAgICAgICAgICAgYXR0ci5naWQgPSAwO1xuICAgICAgICAgICAgICAgICAgICBhdHRyLnJkZXYgPSBub2RlLnJkZXY7XG4gICAgICAgICAgICAgICAgICAgIGlmIChGUy5pc0Rpcihub2RlLm1vZGUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhdHRyLnNpemUgPSA0MDk2O1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKEZTLmlzRmlsZShub2RlLm1vZGUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhdHRyLnNpemUgPSBub2RlLmNvbnRlbnRzLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChGUy5pc0xpbmsobm9kZS5tb2RlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYXR0ci5zaXplID0gbm9kZS5saW5rLmxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGF0dHIuc2l6ZSA9IDA7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYXR0ci5hdGltZSA9IG5ldyBEYXRlKG5vZGUudGltZXN0YW1wKTtcbiAgICAgICAgICAgICAgICAgICAgYXR0ci5tdGltZSA9IG5ldyBEYXRlKG5vZGUudGltZXN0YW1wKTtcbiAgICAgICAgICAgICAgICAgICAgYXR0ci5jdGltZSA9IG5ldyBEYXRlKG5vZGUudGltZXN0YW1wKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gTk9URTogSW4gb3VyIGltcGxlbWVudGF0aW9uLCBzdF9ibG9ja3MgPSBNYXRoLmNlaWwoc3Rfc2l6ZS9zdF9ibGtzaXplKSwgYnV0IHRoaXMgaXMgbm90IHJlcXVpcmVkIGJ5IHRoZSBzdGFuZGFyZC5cbiAgICAgICAgICAgICAgICAgICAgYXR0ci5ibGtzaXplID0gNDA5NjtcbiAgICAgICAgICAgICAgICAgICAgYXR0ci5ibG9ja3MgPSBNYXRoLmNlaWwoYXR0ci5zaXplIC8gYXR0ci5ibGtzaXplKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGF0dHI7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBzZXRhdHRyOiBmdW5jdGlvbihub2RlLCBhdHRyKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChhdHRyLm1vZGUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS5tb2RlID0gYXR0ci5tb2RlO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChhdHRyLnRpbWVzdGFtcCAhPT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBub2RlLnRpbWVzdGFtcCA9IGF0dHIudGltZXN0YW1wO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChhdHRyLnNpemUgIT09IHVuZGVmaW5lZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgTUVNRlMuZW5zdXJlRmxleGlibGUobm9kZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjb250ZW50cyA9IG5vZGUuY29udGVudHM7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXR0ci5zaXplIDwgY29udGVudHMubGVuZ3RoKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnRzLmxlbmd0aCA9IGF0dHIuc2l6ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGVsc2VcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAoYXR0ci5zaXplID4gY29udGVudHMubGVuZ3RoKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250ZW50cy5wdXNoKDApO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBsb29rdXA6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FTk9FTlQpO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgbWtub2Q6IGZ1bmN0aW9uKHBhcmVudCwgbmFtZSwgbW9kZSwgZGV2KSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBNRU1GUy5jcmVhdGVOb2RlKHBhcmVudCwgbmFtZSwgbW9kZSwgZGV2KTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHJlbmFtZTogZnVuY3Rpb24ob2xkX25vZGUsIG5ld19kaXIsIG5ld19uYW1lKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGlmIHdlJ3JlIG92ZXJ3cml0aW5nIGEgZGlyZWN0b3J5IGF0IG5ld19uYW1lLCBtYWtlIHN1cmUgaXQncyBlbXB0eS5cbiAgICAgICAgICAgICAgICAgICAgaWYgKEZTLmlzRGlyKG9sZF9ub2RlLm1vZGUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbmV3X25vZGU7XG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ld19ub2RlID0gRlMubG9va3VwTm9kZShuZXdfZGlyLCBuZXdfbmFtZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7fVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5ld19ub2RlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChjb25zdCBpIGluIG5ld19ub2RlLmNvbnRlbnRzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVOT1RFTVBUWSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIC8vIGRvIHRoZSBpbnRlcm5hbCByZXdpcmluZ1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgb2xkX25vZGUucGFyZW50LmNvbnRlbnRzW29sZF9ub2RlLm5hbWVdO1xuICAgICAgICAgICAgICAgICAgICBvbGRfbm9kZS5uYW1lID0gbmV3X25hbWU7XG4gICAgICAgICAgICAgICAgICAgIG5ld19kaXIuY29udGVudHNbbmV3X25hbWVdID0gb2xkX25vZGU7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB1bmxpbms6IGZ1bmN0aW9uKHBhcmVudCwgbmFtZSkge1xuICAgICAgICAgICAgICAgICAgICBkZWxldGUgcGFyZW50LmNvbnRlbnRzW25hbWVdO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgcm1kaXI6IGZ1bmN0aW9uKHBhcmVudCwgbmFtZSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBub2RlID0gRlMubG9va3VwTm9kZShwYXJlbnQsIG5hbWUpO1xuICAgICAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IGkgaW4gbm9kZS5jb250ZW50cykge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRU5PVEVNUFRZKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBkZWxldGUgcGFyZW50LmNvbnRlbnRzW25hbWVdO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgcmVhZGRpcjogZnVuY3Rpb24obm9kZSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBlbnRyaWVzID0gWycuJywgJy4uJ107XG4gICAgICAgICAgICAgICAgICAgIGZvciAoY29uc3Qga2V5IGluIG5vZGUuY29udGVudHMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghbm9kZS5jb250ZW50cy5oYXNPd25Qcm9wZXJ0eShrZXkpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlbnRyaWVzLnB1c2goa2V5KTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZW50cmllcztcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHN5bWxpbms6IGZ1bmN0aW9uKHBhcmVudCwgbmV3bmFtZSwgb2xkcGF0aCkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBub2RlID0gTUVNRlMuY3JlYXRlTm9kZShcbiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmVudCxcbiAgICAgICAgICAgICAgICAgICAgICAgIG5ld25hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAwbzc3NyB8IDQwOTYwLFxuICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICBub2RlLmxpbmsgPSBvbGRwYXRoO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbm9kZTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHJlYWRsaW5rOiBmdW5jdGlvbihub2RlKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghRlMuaXNMaW5rKG5vZGUubW9kZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVJTlZBTCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5vZGUubGluaztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc3RyZWFtX29wczoge1xuICAgICAgICAgICAgICAgIHJlYWQ6IGZ1bmN0aW9uKHN0cmVhbSwgYnVmZmVyLCBvZmZzZXQsIGxlbmd0aCwgcG9zaXRpb24pIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgY29udGVudHMgPSBzdHJlYW0ubm9kZS5jb250ZW50cztcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBvc2l0aW9uID49IGNvbnRlbnRzLmxlbmd0aCkgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHNpemUgPSBNYXRoLm1pbihjb250ZW50cy5sZW5ndGggLSBwb3NpdGlvbiwgbGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgICAgYXNzZXJ0KHNpemUgPj0gMCk7XG4gICAgICAgICAgICAgICAgICAgIGlmIChzaXplID4gOCAmJiBjb250ZW50cy5zdWJhcnJheSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbm9uLXRyaXZpYWwgYW5kIHR5cGVkIGFycmF5XG4gICAgICAgICAgICAgICAgICAgICAgICBidWZmZXIuc2V0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnRzLnN1YmFycmF5KHBvc2l0aW9uLCBwb3NpdGlvbiArIHNpemUpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9mZnNldFxuICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgc2l6ZTsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVmZmVyW29mZnNldCArIGldID0gY29udGVudHNbcG9zaXRpb24gKyBpXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc2l6ZTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHdyaXRlOiBmdW5jdGlvbihcbiAgICAgICAgICAgICAgICAgICAgc3RyZWFtLFxuICAgICAgICAgICAgICAgICAgICBidWZmZXIsXG4gICAgICAgICAgICAgICAgICAgIG9mZnNldCxcbiAgICAgICAgICAgICAgICAgICAgbGVuZ3RoLFxuICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbixcbiAgICAgICAgICAgICAgICAgICAgY2FuT3duXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG5vZGUgPSBzdHJlYW0ubm9kZTtcbiAgICAgICAgICAgICAgICAgICAgbm9kZS50aW1lc3RhbXAgPSBEYXRlLm5vdygpO1xuICAgICAgICAgICAgICAgICAgICB2YXIgY29udGVudHMgPSBub2RlLmNvbnRlbnRzO1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICBsZW5ndGggJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnRzLmxlbmd0aCA9PT0gMCAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPT09IDAgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgIGJ1ZmZlci5zdWJhcnJheVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGp1c3QgcmVwbGFjZSBpdCB3aXRoIHRoZSBuZXcgZGF0YVxuICAgICAgICAgICAgICAgICAgICAgICAgYXNzZXJ0KGJ1ZmZlci5sZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbk93biAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1ZmZlci5idWZmZXIgPT09IEhFQVA4LmJ1ZmZlciAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9mZnNldCA9PT0gMFxuICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS5jb250ZW50cyA9IGJ1ZmZlcjsgLy8gdGhpcyBpcyBhIHN1YmFycmF5IG9mIHRoZSBoZWFwLCBhbmQgd2UgY2FuIG93biBpdFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUuY29udGVudE1vZGUgPSBNRU1GUy5DT05URU5UX09XTklORztcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZS5jb250ZW50cyA9IG5ldyBVaW50OEFycmF5KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBidWZmZXIuc3ViYXJyYXkob2Zmc2V0LCBvZmZzZXQgKyBsZW5ndGgpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBub2RlLmNvbnRlbnRNb2RlID0gTUVNRlMuQ09OVEVOVF9GSVhFRDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBsZW5ndGg7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgTUVNRlMuZW5zdXJlRmxleGlibGUobm9kZSk7XG4gICAgICAgICAgICAgICAgICAgIHZhciBjb250ZW50cyA9IG5vZGUuY29udGVudHM7XG4gICAgICAgICAgICAgICAgICAgIHdoaWxlIChjb250ZW50cy5sZW5ndGggPCBwb3NpdGlvbikgY29udGVudHMucHVzaCgwKTtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBsZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudHNbcG9zaXRpb24gKyBpXSA9IGJ1ZmZlcltvZmZzZXQgKyBpXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbGVuZ3RoO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgbGxzZWVrOiBmdW5jdGlvbihzdHJlYW0sIG9mZnNldCwgd2hlbmNlKSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCBwb3NpdGlvbiA9IG9mZnNldDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHdoZW5jZSA9PT0gMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gU0VFS19DVVIuXG4gICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiArPSBzdHJlYW0ucG9zaXRpb247XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAod2hlbmNlID09PSAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBTRUVLX0VORC5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChGUy5pc0ZpbGUoc3RyZWFtLm5vZGUubW9kZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiArPSBzdHJlYW0ubm9kZS5jb250ZW50cy5sZW5ndGg7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKHBvc2l0aW9uIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRUlOVkFMKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBzdHJlYW0udW5nb3R0ZW4gPSBbXTtcbiAgICAgICAgICAgICAgICAgICAgc3RyZWFtLnBvc2l0aW9uID0gcG9zaXRpb247XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBwb3NpdGlvbjtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGFsbG9jYXRlOiBmdW5jdGlvbihzdHJlYW0sIG9mZnNldCwgbGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIE1FTUZTLmVuc3VyZUZsZXhpYmxlKHN0cmVhbS5ub2RlKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgY29udGVudHMgPSBzdHJlYW0ubm9kZS5jb250ZW50cztcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgbGltaXQgPSBvZmZzZXQgKyBsZW5ndGg7XG4gICAgICAgICAgICAgICAgICAgIHdoaWxlIChsaW1pdCA+IGNvbnRlbnRzLmxlbmd0aCkgY29udGVudHMucHVzaCgwKTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIG1tYXA6IGZ1bmN0aW9uKHN0cmVhbSwgYnVmZmVyLCBsZW5ndGgsIHBvc2l0aW9uLCBmbGFncykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoIUZTLmlzRmlsZShzdHJlYW0ubm9kZS5tb2RlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRU5PREVWKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBsZXQgcHRyO1xuICAgICAgICAgICAgICAgICAgICBsZXQgYWxsb2NhdGVkO1xuICAgICAgICAgICAgICAgICAgICBsZXQgY29udGVudHMgPSBzdHJlYW0ubm9kZS5jb250ZW50cztcbiAgICAgICAgICAgICAgICAgICAgLy8gT25seSBtYWtlIGEgbmV3IGNvcHkgd2hlbiBNQVBfUFJJVkFURSBpcyBzcGVjaWZpZWQuXG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICEoZmxhZ3MgJiAyKSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgKGNvbnRlbnRzLmJ1ZmZlciA9PT0gYnVmZmVyIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudHMuYnVmZmVyID09PSBidWZmZXIuYnVmZmVyKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIFdlIGNhbid0IGVtdWxhdGUgTUFQX1NIQVJFRCB3aGVuIHRoZSBmaWxlIGlzIG5vdCBiYWNrZWQgYnkgdGhlIGJ1ZmZlclxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gd2UncmUgbWFwcGluZyB0byAoZS5nLiB0aGUgSEVBUCBidWZmZXIpLlxuICAgICAgICAgICAgICAgICAgICAgICAgYWxsb2NhdGVkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICBwdHIgPSBjb250ZW50cy5ieXRlT2Zmc2V0O1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gVHJ5IHRvIGF2b2lkIHVubmVjZXNzYXJ5IHNsaWNlcy5cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiA+IDAgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiArIGxlbmd0aCA8IGNvbnRlbnRzLmxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGNvbnRlbnRzLnN1YmFycmF5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnRzID0gY29udGVudHMuc3ViYXJyYXkoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uICsgbGVuZ3RoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGVudHMgPSBBcnJheS5wcm90b3R5cGUuc2xpY2UuY2FsbChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRlbnRzLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9zaXRpb24sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbiArIGxlbmd0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGFsbG9jYXRlZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICBwdHIgPSBfbWFsbG9jKGxlbmd0aCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIXB0cikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVOT01FTSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBidWZmZXIuc2V0KGNvbnRlbnRzLCBwdHIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB7IHB0cjogcHRyLCBhbGxvY2F0ZWQ6IGFsbG9jYXRlZCB9O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfTtcbiAgICAgICAgY29uc3QgX3N0ZGluID0gYWxsb2NhdGUoMSwgJ2kzMionLCBBTExPQ19TVEFUSUMpO1xuICAgICAgICBjb25zdCBfc3Rkb3V0ID0gYWxsb2NhdGUoMSwgJ2kzMionLCBBTExPQ19TVEFUSUMpO1xuICAgICAgICB2YXIgX3N0ZGVyciA9IGFsbG9jYXRlKDEsICdpMzIqJywgQUxMT0NfU1RBVElDKTtcbiAgICAgICAgZnVuY3Rpb24gX2ZmbHVzaCgpIHtcbiAgICAgICAgICAgIC8vIGludCBmZmx1c2goRklMRSAqc3RyZWFtKTtcbiAgICAgICAgICAgIC8vIGh0dHA6Ly9wdWJzLm9wZW5ncm91cC5vcmcvb25saW5lcHVicy8wMDAwOTUzOTkvZnVuY3Rpb25zL2ZmbHVzaC5odG1sXG4gICAgICAgICAgICAvLyB3ZSBkb24ndCBjdXJyZW50bHkgcGVyZm9ybSBhbnkgdXNlci1zcGFjZSBidWZmZXJpbmcgb2YgZGF0YVxuICAgICAgICB9XG4gICAgICAgIGNvbnN0IEZTID0ge1xuICAgICAgICAgICAgcm9vdDogbnVsbCxcbiAgICAgICAgICAgIG1vdW50czogW10sXG4gICAgICAgICAgICBkZXZpY2VzOiBbbnVsbF0sXG4gICAgICAgICAgICBzdHJlYW1zOiBbbnVsbF0sXG4gICAgICAgICAgICBuZXh0SW5vZGU6IDEsXG4gICAgICAgICAgICBuYW1lVGFibGU6IG51bGwsXG4gICAgICAgICAgICBjdXJyZW50UGF0aDogJy8nLFxuICAgICAgICAgICAgaW5pdGlhbGl6ZWQ6IGZhbHNlLFxuICAgICAgICAgICAgaWdub3JlUGVybWlzc2lvbnM6IHRydWUsXG4gICAgICAgICAgICAvLyBlcnJvciBpbnN0YW5jZVxuICAgICAgICAgICAgRXJybm9FcnJvcjogZnVuY3Rpb24gRXJybm9FcnJvcihlcnJvck51bWJlciwgZGV0YWlscykge1xuICAgICAgICAgICAgICAgIHRoaXMuZXJyb3JOdW1iZXIgPSBlcnJvck51bWJlcjtcbiAgICAgICAgICAgICAgICBmb3IgKGNvbnN0IGtleSBpbiBFUlJOT19DT0RFUykge1xuICAgICAgICAgICAgICAgICAgICBpZiAoRVJSTk9fQ09ERVNba2V5XSA9PT0gZXJyb3JOdW1iZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHJlbW92ZSB0aGUgcHJlZml4ICdFJ1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5jb2RlID0ga2V5LnN1YnN0cmluZygxKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHRoaXMubWVzc2FnZSA9IEVSUk5PX01FU1NBR0VTW2Vycm9yTnVtYmVyXTtcbiAgICAgICAgICAgICAgICB0aGlzLmRldGFpbHMgPSBkZXRhaWxzIHx8ICcnO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGhhbmRsZUZTRXJyb3I6IGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICAgICAgICBpZiAoIShlIGluc3RhbmNlb2YgRlMuRXJybm9FcnJvcikpXG4gICAgICAgICAgICAgICAgICAgIHRocm93IGUgKyAnIDogJyArIG5ldyBFcnJvcigpLnN0YWNrO1xuICAgICAgICAgICAgICAgIHJldHVybiBfX19zZXRFcnJObyhlLmVycm5vKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBsb29rdXBQYXRoOiBmdW5jdGlvbihwYXRoLCBvcHRzKSB7XG4gICAgICAgICAgICAgICAgcGF0aCA9IFBBVEgucmVzb2x2ZShGUy5jd2QoKSwgcGF0aCk7XG4gICAgICAgICAgICAgICAgb3B0cyA9IG9wdHMgfHwgeyByZWN1cnNlX2NvdW50OiAwIH07XG4gICAgICAgICAgICAgICAgaWYgKG9wdHMucmVjdXJzZV9jb3VudCA+IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gbWF4IHJlY3Vyc2l2ZSBsb29rdXAgb2YgOFxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FTE9PUCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIHNwbGl0IHRoZSBwYXRoXG4gICAgICAgICAgICAgICAgY29uc3QgcGFydHMgPSBQQVRILm5vcm1hbGl6ZUFycmF5KFxuICAgICAgICAgICAgICAgICAgICBwYXRoLnNwbGl0KCcvJykuZmlsdGVyKGZ1bmN0aW9uKHApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAhIXA7XG4gICAgICAgICAgICAgICAgICAgIH0pLFxuICAgICAgICAgICAgICAgICAgICBmYWxzZVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgLy8gc3RhcnQgYXQgdGhlIHJvb3RcbiAgICAgICAgICAgICAgICBsZXQgY3VycmVudCA9IEZTLnJvb3Q7XG4gICAgICAgICAgICAgICAgbGV0IGN1cnJlbnRfcGF0aCA9ICcvJztcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IHBhcnRzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGlzbGFzdCA9IGkgPT09IHBhcnRzLmxlbmd0aCAtIDE7XG4gICAgICAgICAgICAgICAgICAgIGlmIChpc2xhc3QgJiYgb3B0cy5wYXJlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHN0b3AgcmVzb2x2aW5nXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjdXJyZW50ID0gRlMubG9va3VwTm9kZShjdXJyZW50LCBwYXJ0c1tpXSk7XG4gICAgICAgICAgICAgICAgICAgIGN1cnJlbnRfcGF0aCA9IFBBVEguam9pbihjdXJyZW50X3BhdGgsIHBhcnRzW2ldKTtcbiAgICAgICAgICAgICAgICAgICAgLy8ganVtcCB0byB0aGUgbW91bnQncyByb290IG5vZGUgaWYgdGhpcyBpcyBhIG1vdW50cG9pbnRcbiAgICAgICAgICAgICAgICAgICAgaWYgKEZTLmlzTW91bnRwb2ludChjdXJyZW50KSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY3VycmVudCA9IGN1cnJlbnQubW91bnQucm9vdDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAvLyBmb2xsb3cgc3ltbGlua3NcbiAgICAgICAgICAgICAgICAgICAgLy8gYnkgZGVmYXVsdCwgbG9va3VwUGF0aCB3aWxsIG5vdCBmb2xsb3cgYSBzeW1saW5rIGlmIGl0IGlzIHRoZSBmaW5hbCBwYXRoIGNvbXBvbmVudC5cbiAgICAgICAgICAgICAgICAgICAgLy8gc2V0dGluZyBvcHRzLmZvbGxvdyA9IHRydWUgd2lsbCBvdmVycmlkZSB0aGlzIGJlaGF2aW9yLlxuICAgICAgICAgICAgICAgICAgICBpZiAoIWlzbGFzdCB8fCBvcHRzLmZvbGxvdykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGNvdW50ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlIChGUy5pc0xpbmsoY3VycmVudC5tb2RlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGxpbmsgPSBGUy5yZWFkbGluayhjdXJyZW50X3BhdGgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnRfcGF0aCA9IFBBVEgucmVzb2x2ZShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUEFUSC5kaXJuYW1lKGN1cnJlbnRfcGF0aCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpbmtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGxvb2t1cCA9IEZTLmxvb2t1cFBhdGgoY3VycmVudF9wYXRoLCB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlY3Vyc2VfY291bnQ6IG9wdHMucmVjdXJzZV9jb3VudFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQgPSBsb29rdXAubm9kZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY291bnQrKyA+IDQwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGxpbWl0IG1heCBjb25zZWN1dGl2ZSBzeW1saW5rcyB0byA0MCAoU1lNTE9PUF9NQVgpLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FTE9PUCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiB7IHBhdGg6IGN1cnJlbnRfcGF0aCwgbm9kZTogY3VycmVudCB9O1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdldFBhdGg6IGZ1bmN0aW9uKG5vZGUpIHtcbiAgICAgICAgICAgICAgICBsZXQgcGF0aDtcbiAgICAgICAgICAgICAgICB3aGlsZSAodHJ1ZSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoRlMuaXNSb290KG5vZGUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gcGF0aFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gUEFUSC5qb2luKG5vZGUubW91bnQubW91bnRwb2ludCwgcGF0aClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IG5vZGUubW91bnQubW91bnRwb2ludDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBwYXRoID0gcGF0aCA/IFBBVEguam9pbihub2RlLm5hbWUsIHBhdGgpIDogbm9kZS5uYW1lO1xuICAgICAgICAgICAgICAgICAgICBub2RlID0gbm9kZS5wYXJlbnQ7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGhhc2hOYW1lOiBmdW5jdGlvbihwYXJlbnRpZCwgbmFtZSkge1xuICAgICAgICAgICAgICAgIGxldCBoYXNoID0gMDtcbiAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IG5hbWUubGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgaGFzaCA9ICgoaGFzaCA8PCA1KSAtIGhhc2ggKyBuYW1lLmNoYXJDb2RlQXQoaSkpIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuICgocGFyZW50aWQgKyBoYXNoKSA+Pj4gMCkgJSBGUy5uYW1lVGFibGUubGVuZ3RoO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGhhc2hBZGROb2RlOiBmdW5jdGlvbihub2RlKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgaGFzaCA9IEZTLmhhc2hOYW1lKG5vZGUucGFyZW50LmlkLCBub2RlLm5hbWUpO1xuICAgICAgICAgICAgICAgIG5vZGUubmFtZV9uZXh0ID0gRlMubmFtZVRhYmxlW2hhc2hdO1xuICAgICAgICAgICAgICAgIEZTLm5hbWVUYWJsZVtoYXNoXSA9IG5vZGU7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaGFzaFJlbW92ZU5vZGU6IGZ1bmN0aW9uKG5vZGUpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBoYXNoID0gRlMuaGFzaE5hbWUobm9kZS5wYXJlbnQuaWQsIG5vZGUubmFtZSk7XG4gICAgICAgICAgICAgICAgaWYgKEZTLm5hbWVUYWJsZVtoYXNoXSA9PT0gbm9kZSkge1xuICAgICAgICAgICAgICAgICAgICBGUy5uYW1lVGFibGVbaGFzaF0gPSBub2RlLm5hbWVfbmV4dDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBsZXQgY3VycmVudCA9IEZTLm5hbWVUYWJsZVtoYXNoXTtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGN1cnJlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjdXJyZW50Lm5hbWVfbmV4dCA9PT0gbm9kZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJlbnQubmFtZV9uZXh0ID0gbm9kZS5uYW1lX25leHQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBjdXJyZW50ID0gY3VycmVudC5uYW1lX25leHQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbG9va3VwTm9kZTogZnVuY3Rpb24ocGFyZW50LCBuYW1lKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgZXJyID0gRlMubWF5TG9va3VwKHBhcmVudCk7XG4gICAgICAgICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihlcnIsIG5hbWUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCBoYXNoID0gRlMuaGFzaE5hbWUocGFyZW50LmlkLCBuYW1lKTtcbiAgICAgICAgICAgICAgICBmb3IgKFxuICAgICAgICAgICAgICAgICAgICBsZXQgbm9kZSA9IEZTLm5hbWVUYWJsZVtoYXNoXTtcbiAgICAgICAgICAgICAgICAgICAgbm9kZTtcbiAgICAgICAgICAgICAgICAgICAgbm9kZSA9IG5vZGUubmFtZV9uZXh0XG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG5vZGVOYW1lID0gbm9kZS5uYW1lO1xuICAgICAgICAgICAgICAgICAgICBpZiAobm9kZS5wYXJlbnQuaWQgPT09IHBhcmVudC5pZCAmJiBub2RlTmFtZSA9PT0gbmFtZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG5vZGU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gaWYgd2UgZmFpbGVkIHRvIGZpbmQgaXQgaW4gdGhlIGNhY2hlLCBjYWxsIGludG8gdGhlIFZGU1xuICAgICAgICAgICAgICAgIHJldHVybiBGUy5sb29rdXAocGFyZW50LCBuYW1lKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBjcmVhdGVOb2RlOiBmdW5jdGlvbihwYXJlbnQsIG5hbWUsIG1vZGUsIHJkZXYpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBub2RlID0ge1xuICAgICAgICAgICAgICAgICAgICBpZDogRlMubmV4dElub2RlKyssXG4gICAgICAgICAgICAgICAgICAgIG5hbWU6IG5hbWUsXG4gICAgICAgICAgICAgICAgICAgIG1vZGU6IG1vZGUsXG4gICAgICAgICAgICAgICAgICAgIG5vZGVfb3BzOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgc3RyZWFtX29wczoge30sXG4gICAgICAgICAgICAgICAgICAgIHJkZXY6IHJkZXYsXG4gICAgICAgICAgICAgICAgICAgIHBhcmVudDogbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgbW91bnQ6IG51bGxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIGlmICghcGFyZW50KSB7XG4gICAgICAgICAgICAgICAgICAgIHBhcmVudCA9IG5vZGU7IC8vIHJvb3Qgbm9kZSBzZXRzIHBhcmVudCB0byBpdHNlbGZcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbm9kZS5wYXJlbnQgPSBwYXJlbnQ7XG4gICAgICAgICAgICAgICAgbm9kZS5tb3VudCA9IHBhcmVudC5tb3VudDtcbiAgICAgICAgICAgICAgICAvLyBjb21wYXRpYmlsaXR5XG4gICAgICAgICAgICAgICAgY29uc3QgcmVhZE1vZGUgPSAyOTIgfCA3MztcbiAgICAgICAgICAgICAgICBjb25zdCB3cml0ZU1vZGUgPSAxNDY7XG4gICAgICAgICAgICAgICAgLy8gTk9URSB3ZSBtdXN0IHVzZSBPYmplY3QuZGVmaW5lUHJvcGVydGllcyBpbnN0ZWFkIG9mIGluZGl2aWR1YWwgY2FsbHMgdG9cbiAgICAgICAgICAgICAgICAvLyBPYmplY3QuZGVmaW5lUHJvcGVydHkgaW4gb3JkZXIgdG8gbWFrZSBjbG9zdXJlIGNvbXBpbGVyIGhhcHB5XG4gICAgICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnRpZXMobm9kZSwge1xuICAgICAgICAgICAgICAgICAgICByZWFkOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAobm9kZS5tb2RlICYgcmVhZE1vZGUpID09PSByZWFkTW9kZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXQ6IGZ1bmN0aW9uKHZhbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IChub2RlLm1vZGUgfD0gcmVhZE1vZGUpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogKG5vZGUubW9kZSAmPSB+cmVhZE1vZGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICB3cml0ZToge1xuICAgICAgICAgICAgICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKG5vZGUubW9kZSAmIHdyaXRlTW9kZSkgPT09IHdyaXRlTW9kZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgICAgICBzZXQ6IGZ1bmN0aW9uKHZhbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IChub2RlLm1vZGUgfD0gd3JpdGVNb2RlKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6IChub2RlLm1vZGUgJj0gfndyaXRlTW9kZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIGlzRm9sZGVyOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBGUy5pc0Rpcihub2RlLm1vZGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICBpc0RldmljZToge1xuICAgICAgICAgICAgICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gRlMuaXNDaHJkZXYobm9kZS5tb2RlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgIEZTLmhhc2hBZGROb2RlKG5vZGUpO1xuICAgICAgICAgICAgICAgIHJldHVybiBub2RlO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGRlc3Ryb3lOb2RlOiBmdW5jdGlvbihub2RlKSB7XG4gICAgICAgICAgICAgICAgRlMuaGFzaFJlbW92ZU5vZGUobm9kZSk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaXNSb290OiBmdW5jdGlvbihub2RlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5vZGUgPT09IG5vZGUucGFyZW50O1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGlzTW91bnRwb2ludDogZnVuY3Rpb24obm9kZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiBub2RlLm1vdW50ZWQ7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaXNGaWxlOiBmdW5jdGlvbihtb2RlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIChtb2RlICYgNjE0NDApID09PSAzMjc2ODtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBpc0RpcjogZnVuY3Rpb24obW9kZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiAobW9kZSAmIDYxNDQwKSA9PT0gMTYzODQ7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaXNMaW5rOiBmdW5jdGlvbihtb2RlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIChtb2RlICYgNjE0NDApID09PSA0MDk2MDtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBpc0NocmRldjogZnVuY3Rpb24obW9kZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiAobW9kZSAmIDYxNDQwKSA9PT0gODE5MjtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBpc0Jsa2RldjogZnVuY3Rpb24obW9kZSkge1xuICAgICAgICAgICAgICAgIHJldHVybiAobW9kZSAmIDYxNDQwKSA9PT0gMjQ1NzY7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaXNGSUZPOiBmdW5jdGlvbihtb2RlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIChtb2RlICYgNjE0NDApID09PSA0MDk2O1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGlzU29ja2V0OiBmdW5jdGlvbihtb2RlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIChtb2RlICYgNDkxNTIpID09PSA0OTE1MjtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBmbGFnTW9kZXM6IHtcbiAgICAgICAgICAgICAgICByOiAwLFxuICAgICAgICAgICAgICAgIHJzOiAxMDUyNjcyLFxuICAgICAgICAgICAgICAgICdyKyc6IDIsXG4gICAgICAgICAgICAgICAgdzogNTc3LFxuICAgICAgICAgICAgICAgIHd4OiA3MDUsXG4gICAgICAgICAgICAgICAgeHc6IDcwNSxcbiAgICAgICAgICAgICAgICAndysnOiA1NzgsXG4gICAgICAgICAgICAgICAgJ3d4Kyc6IDcwNixcbiAgICAgICAgICAgICAgICAneHcrJzogNzA2LFxuICAgICAgICAgICAgICAgIGE6IDEwODksXG4gICAgICAgICAgICAgICAgYXg6IDEyMTcsXG4gICAgICAgICAgICAgICAgeGE6IDEyMTcsXG4gICAgICAgICAgICAgICAgJ2ErJzogMTA5MCxcbiAgICAgICAgICAgICAgICAnYXgrJzogMTIxOCxcbiAgICAgICAgICAgICAgICAneGErJzogMTIxOFxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG1vZGVTdHJpbmdUb0ZsYWdzOiBmdW5jdGlvbihzdHIpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBmbGFncyA9IEZTLmZsYWdNb2Rlc1tzdHJdO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgZmxhZ3MgPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignVW5rbm93biBmaWxlIG9wZW4gbW9kZTogJyArIHN0cik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBmbGFncztcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBmbGFnc1RvUGVybWlzc2lvblN0cmluZzogZnVuY3Rpb24oZmxhZykge1xuICAgICAgICAgICAgICAgIGNvbnN0IGFjY21vZGUgPSBmbGFnICYgMjA5NzE1NTtcbiAgICAgICAgICAgICAgICBsZXQgcGVybXMgPSBbJ3InLCAndycsICdydyddW2FjY21vZGVdO1xuICAgICAgICAgICAgICAgIGlmIChmbGFnICYgNTEyKSB7XG4gICAgICAgICAgICAgICAgICAgIHBlcm1zICs9ICd3JztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBlcm1zO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG5vZGVQZXJtaXNzaW9uczogZnVuY3Rpb24obm9kZSwgcGVybXMpIHtcbiAgICAgICAgICAgICAgICBpZiAoRlMuaWdub3JlUGVybWlzc2lvbnMpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIHJldHVybiAwIGlmIGFueSB1c2VyLCBncm91cCBvciBvd25lciBiaXRzIGFyZSBzZXQuXG4gICAgICAgICAgICAgICAgaWYgKHBlcm1zLmluZGV4T2YoJ3InKSAhPT0gLTEgJiYgIShub2RlLm1vZGUgJiAyOTIpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBFUlJOT19DT0RFUy5FQUNDRVM7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmIChwZXJtcy5pbmRleE9mKCd3JykgIT09IC0xICYmICEobm9kZS5tb2RlICYgMTQ2KSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gRVJSTk9fQ09ERVMuRUFDQ0VTO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAocGVybXMuaW5kZXhPZigneCcpICE9PSAtMSAmJiAhKG5vZGUubW9kZSAmIDczKSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gRVJSTk9fQ09ERVMuRUFDQ0VTO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBtYXlMb29rdXA6IGZ1bmN0aW9uKGRpcikge1xuICAgICAgICAgICAgICAgIHJldHVybiBGUy5ub2RlUGVybWlzc2lvbnMoZGlyLCAneCcpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG1heUNyZWF0ZTogZnVuY3Rpb24oZGlyLCBuYW1lKSB7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgRlMubG9va3VwTm9kZShkaXIsIG5hbWUpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gRVJSTk9fQ09ERVMuRUVYSVNUO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XG4gICAgICAgICAgICAgICAgcmV0dXJuIEZTLm5vZGVQZXJtaXNzaW9ucyhkaXIsICd3eCcpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG1heURlbGV0ZTogZnVuY3Rpb24oZGlyLCBuYW1lLCBpc2Rpcikge1xuICAgICAgICAgICAgICAgIGxldCBub2RlO1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIG5vZGUgPSBGUy5sb29rdXBOb2RlKGRpciwgbmFtZSk7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZS5lcnJubztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29uc3QgZXJyID0gRlMubm9kZVBlcm1pc3Npb25zKGRpciwgJ3d4Jyk7XG4gICAgICAgICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZXJyO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoaXNkaXIpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFGUy5pc0Rpcihub2RlLm1vZGUpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gRVJSTk9fQ09ERVMuRU5PVERJUjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoRlMuaXNSb290KG5vZGUpIHx8IEZTLmdldFBhdGgobm9kZSkgPT09IEZTLmN3ZCgpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gRVJSTk9fQ09ERVMuRUJVU1k7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBpZiAoRlMuaXNEaXIobm9kZS5tb2RlKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEVSUk5PX0NPREVTLkVJU0RJUjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBtYXlPcGVuOiBmdW5jdGlvbihub2RlLCBmbGFncykge1xuICAgICAgICAgICAgICAgIGlmICghbm9kZSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gRVJSTk9fQ09ERVMuRU5PRU5UO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoRlMuaXNMaW5rKG5vZGUubW9kZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEVSUk5PX0NPREVTLkVMT09QO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoRlMuaXNEaXIobm9kZS5tb2RlKSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAoZmxhZ3MgJiAyMDk3MTU1KSAhPT0gMCB8fCAvLyBvcGVuaW5nIGZvciB3cml0ZVxuICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ3MgJiA1MTJcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gRVJSTk9fQ09ERVMuRUlTRElSO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBGUy5ub2RlUGVybWlzc2lvbnMoXG4gICAgICAgICAgICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgICAgICAgICAgIEZTLmZsYWdzVG9QZXJtaXNzaW9uU3RyaW5nKGZsYWdzKVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgTUFYX09QRU5fRkRTOiA0MDk2LFxuICAgICAgICAgICAgbmV4dGZkOiBmdW5jdGlvbihmZF9zdGFydCwgZmRfZW5kKSB7XG4gICAgICAgICAgICAgICAgZmRfc3RhcnQgPSBmZF9zdGFydCB8fCAxO1xuICAgICAgICAgICAgICAgIGZkX2VuZCA9IGZkX2VuZCB8fCBGUy5NQVhfT1BFTl9GRFM7XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgZmQgPSBmZF9zdGFydDsgZmQgPD0gZmRfZW5kOyBmZCsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICghRlMuc3RyZWFtc1tmZF0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmZDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FTUZJTEUpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGdldFN0cmVhbTogZnVuY3Rpb24oZmQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gRlMuc3RyZWFtc1tmZF07XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY3JlYXRlU3RyZWFtOiBmdW5jdGlvbihzdHJlYW0sIGZkX3N0YXJ0LCBmZF9lbmQpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBmZCA9IEZTLm5leHRmZChmZF9zdGFydCwgZmRfZW5kKTtcbiAgICAgICAgICAgICAgICBzdHJlYW0uZmQgPSBmZDtcbiAgICAgICAgICAgICAgICAvLyBjb21wYXRpYmlsaXR5XG4gICAgICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnRpZXMoc3RyZWFtLCB7XG4gICAgICAgICAgICAgICAgICAgIG9iamVjdDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgZ2V0OiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3RyZWFtLm5vZGU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0OiBmdW5jdGlvbih2YWwpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJlYW0ubm9kZSA9IHZhbDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgaXNSZWFkOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICBnZXQ6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAoc3RyZWFtLmZsYWdzICYgMjA5NzE1NSkgIT09IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIGlzV3JpdGU6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGdldDogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIChzdHJlYW0uZmxhZ3MgJiAyMDk3MTU1KSAhPT0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgaXNBcHBlbmQ6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGdldDogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHN0cmVhbS5mbGFncyAmIDEwMjQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBGUy5zdHJlYW1zW2ZkXSA9IHN0cmVhbTtcbiAgICAgICAgICAgICAgICByZXR1cm4gc3RyZWFtO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGNsb3NlU3RyZWFtOiBmdW5jdGlvbihmZCkge1xuICAgICAgICAgICAgICAgIEZTLnN0cmVhbXNbZmRdID0gbnVsbDtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBjaHJkZXZfc3RyZWFtX29wczoge1xuICAgICAgICAgICAgICAgIG9wZW46IGZ1bmN0aW9uKHN0cmVhbSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBkZXZpY2UgPSBGUy5nZXREZXZpY2Uoc3RyZWFtLm5vZGUucmRldik7XG4gICAgICAgICAgICAgICAgICAgIC8vIG92ZXJyaWRlIG5vZGUncyBzdHJlYW0gb3BzIHdpdGggdGhlIGRldmljZSdzXG4gICAgICAgICAgICAgICAgICAgIHN0cmVhbS5zdHJlYW1fb3BzID0gZGV2aWNlLnN0cmVhbV9vcHM7XG4gICAgICAgICAgICAgICAgICAgIC8vIGZvcndhcmQgdGhlIG9wZW4gY2FsbFxuICAgICAgICAgICAgICAgICAgICBpZiAoc3RyZWFtLnN0cmVhbV9vcHMub3Blbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RyZWFtLnN0cmVhbV9vcHMub3BlbihzdHJlYW0pO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBsbHNlZWs6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FU1BJUEUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBtYWpvcjogZnVuY3Rpb24oZGV2KSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGRldiA+PiA4O1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG1pbm9yOiBmdW5jdGlvbihkZXYpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gZGV2ICYgMHhmZjtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBtYWtlZGV2OiBmdW5jdGlvbihtYSwgbWkpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gKG1hIDw8IDgpIHwgbWk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcmVnaXN0ZXJEZXZpY2U6IGZ1bmN0aW9uKGRldiwgb3BzKSB7XG4gICAgICAgICAgICAgICAgRlMuZGV2aWNlc1tkZXZdID0geyBzdHJlYW1fb3BzOiBvcHMgfTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBnZXREZXZpY2U6IGZ1bmN0aW9uKGRldikge1xuICAgICAgICAgICAgICAgIHJldHVybiBGUy5kZXZpY2VzW2Rldl07XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc3luY2ZzOiBmdW5jdGlvbihwb3B1bGF0ZSwgY2FsbGJhY2spIHtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHBvcHVsYXRlID09PSAnZnVuY3Rpb24nKSB7XG4gICAgICAgICAgICAgICAgICAgIGNhbGxiYWNrID0gcG9wdWxhdGU7XG4gICAgICAgICAgICAgICAgICAgIHBvcHVsYXRlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGxldCBjb21wbGV0ZWQgPSAwO1xuICAgICAgICAgICAgICAgIGNvbnN0IHRvdGFsID0gRlMubW91bnRzLmxlbmd0aDtcbiAgICAgICAgICAgICAgICBjb25zdCBkb25lID0gZnVuY3Rpb24oZXJyKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBjYWxsYmFjayhlcnIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICgrK2NvbXBsZXRlZCA+PSB0b3RhbCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FsbGJhY2sobnVsbCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIC8vIHN5bmMgYWxsIG1vdW50c1xuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgRlMubW91bnRzLmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG1vdW50ID0gRlMubW91bnRzW2ldO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIW1vdW50LnR5cGUuc3luY2ZzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkb25lKG51bGwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbW91bnQudHlwZS5zeW5jZnMobW91bnQsIHBvcHVsYXRlLCBkb25lKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbW91bnQ6IGZ1bmN0aW9uKHR5cGUsIG9wdHMsIG1vdW50cG9pbnQpIHtcbiAgICAgICAgICAgICAgICBsZXQgbG9va3VwO1xuICAgICAgICAgICAgICAgIGlmIChtb3VudHBvaW50KSB7XG4gICAgICAgICAgICAgICAgICAgIGxvb2t1cCA9IEZTLmxvb2t1cFBhdGgobW91bnRwb2ludCwgeyBmb2xsb3c6IGZhbHNlIH0pO1xuICAgICAgICAgICAgICAgICAgICBtb3VudHBvaW50ID0gbG9va3VwLnBhdGg7IC8vIHVzZSB0aGUgYWJzb2x1dGUgcGF0aFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCBtb3VudCA9IHtcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogdHlwZSxcbiAgICAgICAgICAgICAgICAgICAgb3B0czogb3B0cyxcbiAgICAgICAgICAgICAgICAgICAgbW91bnRwb2ludDogbW91bnRwb2ludCxcbiAgICAgICAgICAgICAgICAgICAgcm9vdDogbnVsbFxuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgLy8gY3JlYXRlIGEgcm9vdCBub2RlIGZvciB0aGUgZnNcbiAgICAgICAgICAgICAgICB2YXIgcm9vdCA9IHR5cGUubW91bnQobW91bnQpO1xuICAgICAgICAgICAgICAgIHJvb3QubW91bnQgPSBtb3VudDtcbiAgICAgICAgICAgICAgICBtb3VudC5yb290ID0gcm9vdDtcbiAgICAgICAgICAgICAgICAvLyBhc3NpZ24gdGhlIG1vdW50IGluZm8gdG8gdGhlIG1vdW50cG9pbnQncyBub2RlXG4gICAgICAgICAgICAgICAgaWYgKGxvb2t1cCkge1xuICAgICAgICAgICAgICAgICAgICBsb29rdXAubm9kZS5tb3VudCA9IG1vdW50O1xuICAgICAgICAgICAgICAgICAgICBsb29rdXAubm9kZS5tb3VudGVkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgLy8gY29tcGF0aWJpbGl0eSB1cGRhdGUgRlMucm9vdCBpZiB3ZSBtb3VudCB0byAvXG4gICAgICAgICAgICAgICAgICAgIGlmIChtb3VudHBvaW50ID09PSAnLycpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIEZTLnJvb3QgPSBtb3VudC5yb290O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIGFkZCB0byBvdXIgY2FjaGVkIGxpc3Qgb2YgbW91bnRzXG4gICAgICAgICAgICAgICAgRlMubW91bnRzLnB1c2gobW91bnQpO1xuICAgICAgICAgICAgICAgIHJldHVybiByb290O1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGxvb2t1cDogZnVuY3Rpb24ocGFyZW50LCBuYW1lKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHBhcmVudC5ub2RlX29wcy5sb29rdXAocGFyZW50LCBuYW1lKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBta25vZDogZnVuY3Rpb24ocGF0aCwgbW9kZSwgZGV2LCB0aHJvd0Vycm9yID0gdHJ1ZSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGxvb2t1cCA9IEZTLmxvb2t1cFBhdGgocGF0aCwgeyBwYXJlbnQ6IHRydWUgfSk7XG4gICAgICAgICAgICAgICAgY29uc3QgcGFyZW50ID0gbG9va3VwLm5vZGU7XG4gICAgICAgICAgICAgICAgY29uc3QgbmFtZSA9IFBBVEguYmFzZW5hbWUocGF0aCk7XG4gICAgICAgICAgICAgICAgY29uc3QgZXJyb3IgPSBGUy5tYXlDcmVhdGUocGFyZW50LCBuYW1lKTtcbiAgICAgICAgICAgICAgICBpZiAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHRocm93RXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKGVycm9yLCBwYXRoKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghcGFyZW50Lm5vZGVfb3BzLm1rbm9kKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICh0aHJvd0Vycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FUEVSTSwgcGF0aCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyZW50Lm5vZGVfb3BzLm1rbm9kKHBhcmVudCwgbmFtZSwgbW9kZSwgZGV2KTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBjcmVhdGU6IGZ1bmN0aW9uKHBhdGgsIG1vZGUsIHRocm93RXJyb3IgPSB0cnVlKSB7XG4gICAgICAgICAgICAgICAgbW9kZSA9IG1vZGUgIT09IHVuZGVmaW5lZCA/IG1vZGUgOiAwbzY2NjtcbiAgICAgICAgICAgICAgICBtb2RlICY9IDQwOTU7XG4gICAgICAgICAgICAgICAgbW9kZSB8PSAzMjc2ODtcbiAgICAgICAgICAgICAgICByZXR1cm4gRlMubWtub2QocGF0aCwgbW9kZSwgMCwgdGhyb3dFcnJvcik7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbWtkaXI6IGZ1bmN0aW9uKHBhdGgsIG1vZGUsIHRocm93RXJyb3IgPSB0cnVlKSB7XG4gICAgICAgICAgICAgICAgbW9kZSA9IG1vZGUgIT09IHVuZGVmaW5lZCA/IG1vZGUgOiAwbzc3NztcbiAgICAgICAgICAgICAgICBtb2RlICY9IDUxMSB8IDUxMjtcbiAgICAgICAgICAgICAgICBtb2RlIHw9IDE2Mzg0O1xuICAgICAgICAgICAgICAgIHJldHVybiBGUy5ta25vZChwYXRoLCBtb2RlLCAwLCB0aHJvd0Vycm9yKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBta2RldjogZnVuY3Rpb24ocGF0aCwgbW9kZSwgZGV2KSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBkZXYgPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgIGRldiA9IG1vZGU7XG4gICAgICAgICAgICAgICAgICAgIG1vZGUgPSAwbzY2NjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbW9kZSB8PSA4MTkyO1xuICAgICAgICAgICAgICAgIHJldHVybiBGUy5ta25vZChwYXRoLCBtb2RlLCBkZXYpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHN5bWxpbms6IGZ1bmN0aW9uKG9sZHBhdGgsIG5ld3BhdGgpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBsb29rdXAgPSBGUy5sb29rdXBQYXRoKG5ld3BhdGgsIHsgcGFyZW50OiB0cnVlIH0pO1xuICAgICAgICAgICAgICAgIHZhciBwYXJlbnQgPSBsb29rdXAubm9kZTtcbiAgICAgICAgICAgICAgICBjb25zdCBuZXduYW1lID0gUEFUSC5iYXNlbmFtZShuZXdwYXRoKTtcbiAgICAgICAgICAgICAgICBjb25zdCBlcnIgPSBGUy5tYXlDcmVhdGUocGFyZW50LCBuZXduYW1lKTtcbiAgICAgICAgICAgICAgICBpZiAoZXJyKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKGVycik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghcGFyZW50Lm5vZGVfb3BzLnN5bWxpbmspIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRVBFUk0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyZW50Lm5vZGVfb3BzLnN5bWxpbmsocGFyZW50LCBuZXduYW1lLCBvbGRwYXRoKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICByZW5hbWU6IGZ1bmN0aW9uKG9sZF9wYXRoLCBuZXdfcGF0aCkge1xuICAgICAgICAgICAgICAgIGNvbnN0IG9sZF9kaXJuYW1lID0gUEFUSC5kaXJuYW1lKG9sZF9wYXRoKTtcbiAgICAgICAgICAgICAgICBjb25zdCBuZXdfZGlybmFtZSA9IFBBVEguZGlybmFtZShuZXdfcGF0aCk7XG4gICAgICAgICAgICAgICAgY29uc3Qgb2xkX25hbWUgPSBQQVRILmJhc2VuYW1lKG9sZF9wYXRoKTtcbiAgICAgICAgICAgICAgICBjb25zdCBuZXdfbmFtZSA9IFBBVEguYmFzZW5hbWUobmV3X3BhdGgpO1xuICAgICAgICAgICAgICAgIC8vIHBhcmVudHMgbXVzdCBleGlzdFxuICAgICAgICAgICAgICAgIGxldCBsb29rdXAsIG9sZF9kaXIsIG5ld19kaXI7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgbG9va3VwID0gRlMubG9va3VwUGF0aChvbGRfcGF0aCwgeyBwYXJlbnQ6IHRydWUgfSk7XG4gICAgICAgICAgICAgICAgICAgIG9sZF9kaXIgPSBsb29rdXAubm9kZTtcbiAgICAgICAgICAgICAgICAgICAgbG9va3VwID0gRlMubG9va3VwUGF0aChuZXdfcGF0aCwgeyBwYXJlbnQ6IHRydWUgfSk7XG4gICAgICAgICAgICAgICAgICAgIG5ld19kaXIgPSBsb29rdXAubm9kZTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVCVVNZKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gbmVlZCB0byBiZSBwYXJ0IG9mIHRoZSBzYW1lIG1vdW50XG4gICAgICAgICAgICAgICAgaWYgKG9sZF9kaXIubW91bnQgIT09IG5ld19kaXIubW91bnQpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRVhERVYpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBzb3VyY2UgbXVzdCBleGlzdFxuICAgICAgICAgICAgICAgIGNvbnN0IG9sZF9ub2RlID0gRlMubG9va3VwTm9kZShvbGRfZGlyLCBvbGRfbmFtZSk7XG4gICAgICAgICAgICAgICAgLy8gb2xkIHBhdGggc2hvdWxkIG5vdCBiZSBhbiBhbmNlc3RvciBvZiB0aGUgbmV3IHBhdGhcbiAgICAgICAgICAgICAgICBsZXQgcmVsYXRpdmUgPSBQQVRILnJlbGF0aXZlKG9sZF9wYXRoLCBuZXdfZGlybmFtZSk7XG4gICAgICAgICAgICAgICAgaWYgKHJlbGF0aXZlLmNoYXJBdCgwKSAhPT0gJy4nKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVJTlZBTCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIG5ldyBwYXRoIHNob3VsZCBub3QgYmUgYW4gYW5jZXN0b3Igb2YgdGhlIG9sZCBwYXRoXG4gICAgICAgICAgICAgICAgcmVsYXRpdmUgPSBQQVRILnJlbGF0aXZlKG5ld19wYXRoLCBvbGRfZGlybmFtZSk7XG4gICAgICAgICAgICAgICAgaWYgKHJlbGF0aXZlLmNoYXJBdCgwKSAhPT0gJy4nKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVOT1RFTVBUWSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIHNlZSBpZiB0aGUgbmV3IHBhdGggYWxyZWFkeSBleGlzdHNcbiAgICAgICAgICAgICAgICBsZXQgbmV3X25vZGU7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgbmV3X25vZGUgPSBGUy5sb29rdXBOb2RlKG5ld19kaXIsIG5ld19uYW1lKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIG5vdCBmYXRhbFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBlYXJseSBvdXQgaWYgbm90aGluZyBuZWVkcyB0byBjaGFuZ2VcbiAgICAgICAgICAgICAgICBpZiAob2xkX25vZGUgPT09IG5ld19ub2RlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gd2UnbGwgbmVlZCB0byBkZWxldGUgdGhlIG9sZCBlbnRyeVxuICAgICAgICAgICAgICAgIGNvbnN0IGlzZGlyID0gRlMuaXNEaXIob2xkX25vZGUubW9kZSk7XG4gICAgICAgICAgICAgICAgbGV0IGVyciA9IEZTLm1heURlbGV0ZShvbGRfZGlyLCBvbGRfbmFtZSwgaXNkaXIpO1xuICAgICAgICAgICAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoZXJyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gbmVlZCBkZWxldGUgcGVybWlzc2lvbnMgaWYgd2UnbGwgYmUgb3ZlcndyaXRpbmcuXG4gICAgICAgICAgICAgICAgLy8gbmVlZCBjcmVhdGUgcGVybWlzc2lvbnMgaWYgbmV3IGRvZXNuJ3QgYWxyZWFkeSBleGlzdC5cbiAgICAgICAgICAgICAgICBlcnIgPSBuZXdfbm9kZVxuICAgICAgICAgICAgICAgICAgICA/IEZTLm1heURlbGV0ZShuZXdfZGlyLCBuZXdfbmFtZSwgaXNkaXIpXG4gICAgICAgICAgICAgICAgICAgIDogRlMubWF5Q3JlYXRlKG5ld19kaXIsIG5ld19uYW1lKTtcbiAgICAgICAgICAgICAgICBpZiAoZXJyKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKGVycik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghb2xkX2Rpci5ub2RlX29wcy5yZW5hbWUpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRVBFUk0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIEZTLmlzTW91bnRwb2ludChvbGRfbm9kZSkgfHxcbiAgICAgICAgICAgICAgICAgICAgKG5ld19ub2RlICYmIEZTLmlzTW91bnRwb2ludChuZXdfbm9kZSkpXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVCVVNZKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gaWYgd2UgYXJlIGdvaW5nIHRvIGNoYW5nZSB0aGUgcGFyZW50LCBjaGVjayB3cml0ZSBwZXJtaXNzaW9uc1xuICAgICAgICAgICAgICAgIGlmIChuZXdfZGlyICE9PSBvbGRfZGlyKSB7XG4gICAgICAgICAgICAgICAgICAgIGVyciA9IEZTLm5vZGVQZXJtaXNzaW9ucyhvbGRfZGlyLCAndycpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoZXJyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihlcnIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIHJlbW92ZSB0aGUgbm9kZSBmcm9tIHRoZSBsb29rdXAgaGFzaFxuICAgICAgICAgICAgICAgIEZTLmhhc2hSZW1vdmVOb2RlKG9sZF9ub2RlKTtcbiAgICAgICAgICAgICAgICAvLyBkbyB0aGUgdW5kZXJseWluZyBmcyByZW5hbWVcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBvbGRfZGlyLm5vZGVfb3BzLnJlbmFtZShvbGRfbm9kZSwgbmV3X2RpciwgbmV3X25hbWUpO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgZTtcbiAgICAgICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICAgICAgICAvLyBhZGQgdGhlIG5vZGUgYmFjayB0byB0aGUgaGFzaCAoaW4gY2FzZSBub2RlX29wcy5yZW5hbWVcbiAgICAgICAgICAgICAgICAgICAgLy8gY2hhbmdlZCBpdHMgbmFtZSlcbiAgICAgICAgICAgICAgICAgICAgRlMuaGFzaEFkZE5vZGUob2xkX25vZGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBybWRpcjogZnVuY3Rpb24ocGF0aCkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGxvb2t1cCA9IEZTLmxvb2t1cFBhdGgocGF0aCwgeyBwYXJlbnQ6IHRydWUgfSk7XG4gICAgICAgICAgICAgICAgdmFyIHBhcmVudCA9IGxvb2t1cC5ub2RlO1xuICAgICAgICAgICAgICAgIGNvbnN0IG5hbWUgPSBQQVRILmJhc2VuYW1lKHBhdGgpO1xuICAgICAgICAgICAgICAgIHZhciBub2RlID0gRlMubG9va3VwTm9kZShwYXJlbnQsIG5hbWUpO1xuICAgICAgICAgICAgICAgIGNvbnN0IGVyciA9IEZTLm1heURlbGV0ZShwYXJlbnQsIG5hbWUsIHRydWUpO1xuICAgICAgICAgICAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoZXJyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCFwYXJlbnQubm9kZV9vcHMucm1kaXIpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRVBFUk0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoRlMuaXNNb3VudHBvaW50KG5vZGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVCVVNZKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcGFyZW50Lm5vZGVfb3BzLnJtZGlyKHBhcmVudCwgbmFtZSk7XG4gICAgICAgICAgICAgICAgRlMuZGVzdHJveU5vZGUobm9kZSk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcmVhZGRpcjogZnVuY3Rpb24ocGF0aCkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGxvb2t1cCA9IEZTLmxvb2t1cFBhdGgocGF0aCwgeyBmb2xsb3c6IHRydWUgfSk7XG4gICAgICAgICAgICAgICAgY29uc3Qgbm9kZSA9IGxvb2t1cC5ub2RlO1xuICAgICAgICAgICAgICAgIGlmICghbm9kZS5ub2RlX29wcy5yZWFkZGlyKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVOT1RESVIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gbm9kZS5ub2RlX29wcy5yZWFkZGlyKG5vZGUpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHVubGluazogZnVuY3Rpb24ocGF0aCkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGxvb2t1cCA9IEZTLmxvb2t1cFBhdGgocGF0aCwgeyBwYXJlbnQ6IHRydWUgfSk7XG4gICAgICAgICAgICAgICAgdmFyIHBhcmVudCA9IGxvb2t1cC5ub2RlO1xuICAgICAgICAgICAgICAgIGNvbnN0IG5hbWUgPSBQQVRILmJhc2VuYW1lKHBhdGgpO1xuICAgICAgICAgICAgICAgIHZhciBub2RlID0gRlMubG9va3VwTm9kZShwYXJlbnQsIG5hbWUpO1xuICAgICAgICAgICAgICAgIGxldCBlcnIgPSBGUy5tYXlEZWxldGUocGFyZW50LCBuYW1lLCBmYWxzZSk7XG4gICAgICAgICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgICAgICAgICAvLyBQT1NJWCBzYXlzIHVubGluayBzaG91bGQgc2V0IEVQRVJNLCBub3QgRUlTRElSXG4gICAgICAgICAgICAgICAgICAgIGlmIChlcnIgPT09IEVSUk5PX0NPREVTLkVJU0RJUikgZXJyID0gRVJSTk9fQ09ERVMuRVBFUk07XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKGVycik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghcGFyZW50Lm5vZGVfb3BzLnVubGluaykge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FUEVSTSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChGUy5pc01vdW50cG9pbnQobm9kZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRUJVU1kpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBwYXJlbnQubm9kZV9vcHMudW5saW5rKHBhcmVudCwgbmFtZSk7XG4gICAgICAgICAgICAgICAgRlMuZGVzdHJveU5vZGUobm9kZSk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcmVhZGxpbms6IGZ1bmN0aW9uKHBhdGgpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBsb29rdXAgPSBGUy5sb29rdXBQYXRoKHBhdGgsIHsgZm9sbG93OiBmYWxzZSB9KTtcbiAgICAgICAgICAgICAgICBjb25zdCBsaW5rID0gbG9va3VwLm5vZGU7XG4gICAgICAgICAgICAgICAgaWYgKCFsaW5rLm5vZGVfb3BzLnJlYWRsaW5rKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVJTlZBTCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBsaW5rLm5vZGVfb3BzLnJlYWRsaW5rKGxpbmspO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIHN0YXQ6IGZ1bmN0aW9uKHBhdGgsIGRvbnRGb2xsb3cpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBsb29rdXAgPSBGUy5sb29rdXBQYXRoKHBhdGgsIHsgZm9sbG93OiAhZG9udEZvbGxvdyB9KTtcbiAgICAgICAgICAgICAgICBjb25zdCBub2RlID0gbG9va3VwLm5vZGU7XG4gICAgICAgICAgICAgICAgaWYgKCFub2RlLm5vZGVfb3BzLmdldGF0dHIpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRVBFUk0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gbm9kZS5ub2RlX29wcy5nZXRhdHRyKG5vZGUpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGxzdGF0OiBmdW5jdGlvbihwYXRoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIEZTLnN0YXQocGF0aCwgdHJ1ZSk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY2htb2Q6IGZ1bmN0aW9uKHBhdGgsIG1vZGUsIGRvbnRGb2xsb3cpIHtcbiAgICAgICAgICAgICAgICBsZXQgbm9kZTtcbiAgICAgICAgICAgICAgICBpZiAodHlwZW9mIHBhdGggPT09ICdzdHJpbmcnKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGxvb2t1cCA9IEZTLmxvb2t1cFBhdGgocGF0aCwgeyBmb2xsb3c6ICFkb250Rm9sbG93IH0pO1xuICAgICAgICAgICAgICAgICAgICBub2RlID0gbG9va3VwLm5vZGU7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbm9kZSA9IHBhdGg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghbm9kZS5ub2RlX29wcy5zZXRhdHRyKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVQRVJNKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbm9kZS5ub2RlX29wcy5zZXRhdHRyKG5vZGUsIHtcbiAgICAgICAgICAgICAgICAgICAgbW9kZTogKG1vZGUgJiA0MDk1KSB8IChub2RlLm1vZGUgJiB+NDA5NSksXG4gICAgICAgICAgICAgICAgICAgIHRpbWVzdGFtcDogRGF0ZS5ub3coKVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGxjaG1vZDogZnVuY3Rpb24ocGF0aCwgbW9kZSkge1xuICAgICAgICAgICAgICAgIEZTLmNobW9kKHBhdGgsIG1vZGUsIHRydWUpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGZjaG1vZDogZnVuY3Rpb24oZmQsIG1vZGUpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBzdHJlYW0gPSBGUy5nZXRTdHJlYW0oZmQpO1xuICAgICAgICAgICAgICAgIGlmICghc3RyZWFtKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVCQURGKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgRlMuY2htb2Qoc3RyZWFtLm5vZGUsIG1vZGUpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGNob3duOiBmdW5jdGlvbihwYXRoLCB1aWQsIGdpZCwgZG9udEZvbGxvdykge1xuICAgICAgICAgICAgICAgIGxldCBub2RlO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcGF0aCA9PT0gJ3N0cmluZycpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgbG9va3VwID0gRlMubG9va3VwUGF0aChwYXRoLCB7IGZvbGxvdzogIWRvbnRGb2xsb3cgfSk7XG4gICAgICAgICAgICAgICAgICAgIG5vZGUgPSBsb29rdXAubm9kZTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBub2RlID0gcGF0aDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCFub2RlLm5vZGVfb3BzLnNldGF0dHIpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRVBFUk0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBub2RlLm5vZGVfb3BzLnNldGF0dHIobm9kZSwge1xuICAgICAgICAgICAgICAgICAgICB0aW1lc3RhbXA6IERhdGUubm93KClcbiAgICAgICAgICAgICAgICAgICAgLy8gd2UgaWdub3JlIHRoZSB1aWQgLyBnaWQgZm9yIG5vd1xuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGxjaG93bjogZnVuY3Rpb24ocGF0aCwgdWlkLCBnaWQpIHtcbiAgICAgICAgICAgICAgICBGUy5jaG93bihwYXRoLCB1aWQsIGdpZCwgdHJ1ZSk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZmNob3duOiBmdW5jdGlvbihmZCwgdWlkLCBnaWQpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBzdHJlYW0gPSBGUy5nZXRTdHJlYW0oZmQpO1xuICAgICAgICAgICAgICAgIGlmICghc3RyZWFtKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVCQURGKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgRlMuY2hvd24oc3RyZWFtLm5vZGUsIHVpZCwgZ2lkKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB0cnVuY2F0ZTogZnVuY3Rpb24ocGF0aCwgbGVuKSB7XG4gICAgICAgICAgICAgICAgaWYgKGxlbiA8IDApIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRUlOVkFMKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGV0IG5vZGU7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBwYXRoID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBsb29rdXAgPSBGUy5sb29rdXBQYXRoKHBhdGgsIHsgZm9sbG93OiB0cnVlIH0pO1xuICAgICAgICAgICAgICAgICAgICBub2RlID0gbG9va3VwLm5vZGU7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgbm9kZSA9IHBhdGg7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghbm9kZS5ub2RlX29wcy5zZXRhdHRyKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVQRVJNKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKEZTLmlzRGlyKG5vZGUubW9kZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRUlTRElSKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCFGUy5pc0ZpbGUobm9kZS5tb2RlKSkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FSU5WQUwpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCBlcnIgPSBGUy5ub2RlUGVybWlzc2lvbnMobm9kZSwgJ3cnKTtcbiAgICAgICAgICAgICAgICBpZiAoZXJyKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKGVycik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIG5vZGUubm9kZV9vcHMuc2V0YXR0cihub2RlLCB7XG4gICAgICAgICAgICAgICAgICAgIHNpemU6IGxlbixcbiAgICAgICAgICAgICAgICAgICAgdGltZXN0YW1wOiBEYXRlLm5vdygpXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZnRydW5jYXRlOiBmdW5jdGlvbihmZCwgbGVuKSB7XG4gICAgICAgICAgICAgICAgY29uc3Qgc3RyZWFtID0gRlMuZ2V0U3RyZWFtKGZkKTtcbiAgICAgICAgICAgICAgICBpZiAoIXN0cmVhbSkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FQkFERik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgoc3RyZWFtLmZsYWdzICYgMjA5NzE1NSkgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRUlOVkFMKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgRlMudHJ1bmNhdGUoc3RyZWFtLm5vZGUsIGxlbik7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgdXRpbWU6IGZ1bmN0aW9uKHBhdGgsIGF0aW1lLCBtdGltZSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGxvb2t1cCA9IEZTLmxvb2t1cFBhdGgocGF0aCwgeyBmb2xsb3c6IHRydWUgfSk7XG4gICAgICAgICAgICAgICAgY29uc3Qgbm9kZSA9IGxvb2t1cC5ub2RlO1xuICAgICAgICAgICAgICAgIG5vZGUubm9kZV9vcHMuc2V0YXR0cihub2RlLCB7XG4gICAgICAgICAgICAgICAgICAgIHRpbWVzdGFtcDogTWF0aC5tYXgoYXRpbWUsIG10aW1lKVxuICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIG9wZW46IGZ1bmN0aW9uKHBhdGgsIGZsYWdzLCBtb2RlLCBmZF9zdGFydCwgZmRfZW5kKSB7XG4gICAgICAgICAgICAgICAgcGF0aCA9IFBBVEgubm9ybWFsaXplKHBhdGgpO1xuICAgICAgICAgICAgICAgIGZsYWdzID1cbiAgICAgICAgICAgICAgICAgICAgdHlwZW9mIGZsYWdzID09PSAnc3RyaW5nJ1xuICAgICAgICAgICAgICAgICAgICAgICAgPyBGUy5tb2RlU3RyaW5nVG9GbGFncyhmbGFncylcbiAgICAgICAgICAgICAgICAgICAgICAgIDogZmxhZ3M7XG4gICAgICAgICAgICAgICAgbW9kZSA9IHR5cGVvZiBtb2RlID09PSAndW5kZWZpbmVkJyA/IDBvNjY2IDogbW9kZTtcbiAgICAgICAgICAgICAgICBpZiAoZmxhZ3MgJiA2NCkge1xuICAgICAgICAgICAgICAgICAgICBtb2RlID0gKG1vZGUgJiA0MDk1KSB8IDMyNzY4O1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIG1vZGUgPSAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQgbm9kZTtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBsb29rdXAgPSBGUy5sb29rdXBQYXRoKHBhdGgsIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvbGxvdzogIShmbGFncyAmIDEzMTA3MilcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIG5vZGUgPSBsb29rdXAubm9kZTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGlnbm9yZVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBwZXJoYXBzIHdlIG5lZWQgdG8gY3JlYXRlIHRoZSBub2RlXG4gICAgICAgICAgICAgICAgaWYgKGZsYWdzICYgNjQpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG5vZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlmIE9fQ1JFQVQgYW5kIE9fRVhDTCBhcmUgc2V0LCBlcnJvciBvdXQgaWYgdGhlIG5vZGUgYWxyZWFkeSBleGlzdHNcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmbGFncyAmIDEyOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVFWElTVCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBub2RlIGRvZXNuJ3QgZXhpc3QsIHRyeSB0byBjcmVhdGUgaXRcbiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGUgPSBGUy5ta25vZChwYXRoLCBtb2RlLCAwKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoIW5vZGUpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRU5PRU5UKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gY2FuJ3QgdHJ1bmNhdGUgYSBkZXZpY2VcbiAgICAgICAgICAgICAgICBpZiAoRlMuaXNDaHJkZXYobm9kZS5tb2RlKSkge1xuICAgICAgICAgICAgICAgICAgICBmbGFncyAmPSB+NTEyO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBjaGVjayBwZXJtaXNzaW9uc1xuICAgICAgICAgICAgICAgIGNvbnN0IGVyciA9IEZTLm1heU9wZW4obm9kZSwgZmxhZ3MpO1xuICAgICAgICAgICAgICAgIGlmIChlcnIpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoZXJyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gZG8gdHJ1bmNhdGlvbiBpZiBuZWNlc3NhcnlcbiAgICAgICAgICAgICAgICBpZiAoZmxhZ3MgJiA1MTIpIHtcbiAgICAgICAgICAgICAgICAgICAgRlMudHJ1bmNhdGUobm9kZSwgMCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIC8vIHdlJ3ZlIGFscmVhZHkgaGFuZGxlZCB0aGVzZSwgZG9uJ3QgcGFzcyBkb3duIHRvIHRoZSB1bmRlcmx5aW5nIHZmc1xuICAgICAgICAgICAgICAgIGZsYWdzICY9IH4oMTI4IHwgNTEyKTtcbiAgICAgICAgICAgICAgICAvLyByZWdpc3RlciB0aGUgc3RyZWFtIHdpdGggdGhlIGZpbGVzeXN0ZW1cbiAgICAgICAgICAgICAgICBjb25zdCBzdHJlYW0gPSBGUy5jcmVhdGVTdHJlYW0oXG4gICAgICAgICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG5vZGU6IG5vZGUsXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXRoOiBGUy5nZXRQYXRoKG5vZGUpLCAvLyB3ZSB3YW50IHRoZSBhYnNvbHV0ZSBwYXRoIHRvIHRoZSBub2RlXG4gICAgICAgICAgICAgICAgICAgICAgICBmbGFnczogZmxhZ3MsXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWVrYWJsZTogdHJ1ZSxcbiAgICAgICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uOiAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgc3RyZWFtX29wczogbm9kZS5zdHJlYW1fb3BzLFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdXNlZCBieSB0aGUgZmlsZSBmYW1pbHkgbGliYyBjYWxscyAoZm9wZW4sIGZ3cml0ZSwgZmVycm9yLCBldGMuKVxuICAgICAgICAgICAgICAgICAgICAgICAgdW5nb3R0ZW46IFtdLFxuICAgICAgICAgICAgICAgICAgICAgICAgZXJyb3I6IGZhbHNlXG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIGZkX3N0YXJ0LFxuICAgICAgICAgICAgICAgICAgICBmZF9lbmRcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIC8vIGNhbGwgdGhlIG5ldyBzdHJlYW0ncyBvcGVuIGZ1bmN0aW9uXG4gICAgICAgICAgICAgICAgaWYgKHN0cmVhbS5zdHJlYW1fb3BzLm9wZW4pIHtcbiAgICAgICAgICAgICAgICAgICAgc3RyZWFtLnN0cmVhbV9vcHMub3BlbihzdHJlYW0pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoTW9kdWxlWydsb2dSZWFkRmlsZXMnXSAmJiAhKGZsYWdzICYgMSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFGUy5yZWFkRmlsZXMpIEZTLnJlYWRGaWxlcyA9IHt9O1xuICAgICAgICAgICAgICAgICAgICBpZiAoIShwYXRoIGluIEZTLnJlYWRGaWxlcykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIEZTLnJlYWRGaWxlc1twYXRoXSA9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLndhcm4oJ3JlYWQgZmlsZTogJyArIHBhdGgpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBzdHJlYW07XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY2xvc2U6IGZ1bmN0aW9uKHN0cmVhbSkge1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChzdHJlYW0uc3RyZWFtX29wcy5jbG9zZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RyZWFtLnN0cmVhbV9vcHMuY2xvc2Uoc3RyZWFtKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgZTtcbiAgICAgICAgICAgICAgICB9IGZpbmFsbHkge1xuICAgICAgICAgICAgICAgICAgICBGUy5jbG9zZVN0cmVhbShzdHJlYW0uZmQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBsbHNlZWs6IGZ1bmN0aW9uKHN0cmVhbSwgb2Zmc2V0LCB3aGVuY2UpIHtcbiAgICAgICAgICAgICAgICBpZiAoIXN0cmVhbS5zZWVrYWJsZSB8fCAhc3RyZWFtLnN0cmVhbV9vcHMubGxzZWVrKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVTUElQRSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiBzdHJlYW0uc3RyZWFtX29wcy5sbHNlZWsoc3RyZWFtLCBvZmZzZXQsIHdoZW5jZSk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcmVhZDogZnVuY3Rpb24oc3RyZWFtLCBidWZmZXIsIG9mZnNldCwgbGVuZ3RoLCBwb3NpdGlvbikge1xuICAgICAgICAgICAgICAgIGlmIChsZW5ndGggPCAwIHx8IHBvc2l0aW9uIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FSU5WQUwpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoKHN0cmVhbS5mbGFncyAmIDIwOTcxNTUpID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVCQURGKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKEZTLmlzRGlyKHN0cmVhbS5ub2RlLm1vZGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVJU0RJUik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghc3RyZWFtLnN0cmVhbV9vcHMucmVhZCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FSU5WQUwpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBsZXQgc2Vla2luZyA9IHRydWU7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBwb3NpdGlvbiA9PT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgcG9zaXRpb24gPSBzdHJlYW0ucG9zaXRpb247XG4gICAgICAgICAgICAgICAgICAgIHNlZWtpbmcgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKCFzdHJlYW0uc2Vla2FibGUpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRVNQSVBFKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29uc3QgYnl0ZXNSZWFkID0gc3RyZWFtLnN0cmVhbV9vcHMucmVhZChcbiAgICAgICAgICAgICAgICAgICAgc3RyZWFtLFxuICAgICAgICAgICAgICAgICAgICBidWZmZXIsXG4gICAgICAgICAgICAgICAgICAgIG9mZnNldCxcbiAgICAgICAgICAgICAgICAgICAgbGVuZ3RoLFxuICAgICAgICAgICAgICAgICAgICBwb3NpdGlvblxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgaWYgKCFzZWVraW5nKSBzdHJlYW0ucG9zaXRpb24gKz0gYnl0ZXNSZWFkO1xuICAgICAgICAgICAgICAgIHJldHVybiBieXRlc1JlYWQ7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgd3JpdGU6IGZ1bmN0aW9uKHN0cmVhbSwgYnVmZmVyLCBvZmZzZXQsIGxlbmd0aCwgcG9zaXRpb24sIGNhbk93bikge1xuICAgICAgICAgICAgICAgIGlmIChsZW5ndGggPCAwIHx8IHBvc2l0aW9uIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FSU5WQUwpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoKHN0cmVhbS5mbGFncyAmIDIwOTcxNTUpID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVCQURGKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKEZTLmlzRGlyKHN0cmVhbS5ub2RlLm1vZGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVJU0RJUik7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghc3RyZWFtLnN0cmVhbV9vcHMud3JpdGUpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRUlOVkFMKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbGV0IHNlZWtpbmcgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGlmICh0eXBlb2YgcG9zaXRpb24gPT09ICd1bmRlZmluZWQnKSB7XG4gICAgICAgICAgICAgICAgICAgIHBvc2l0aW9uID0gc3RyZWFtLnBvc2l0aW9uO1xuICAgICAgICAgICAgICAgICAgICBzZWVraW5nID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICghc3RyZWFtLnNlZWthYmxlKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVTUElQRSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChzdHJlYW0uZmxhZ3MgJiAxMDI0KSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIHNlZWsgdG8gdGhlIGVuZCBiZWZvcmUgd3JpdGluZyBpbiBhcHBlbmQgbW9kZVxuICAgICAgICAgICAgICAgICAgICBGUy5sbHNlZWsoc3RyZWFtLCAwLCAyKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY29uc3QgYnl0ZXNXcml0dGVuID0gc3RyZWFtLnN0cmVhbV9vcHMud3JpdGUoXG4gICAgICAgICAgICAgICAgICAgIHN0cmVhbSxcbiAgICAgICAgICAgICAgICAgICAgYnVmZmVyLFxuICAgICAgICAgICAgICAgICAgICBvZmZzZXQsXG4gICAgICAgICAgICAgICAgICAgIGxlbmd0aCxcbiAgICAgICAgICAgICAgICAgICAgcG9zaXRpb24sXG4gICAgICAgICAgICAgICAgICAgIGNhbk93blxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgaWYgKCFzZWVraW5nKSBzdHJlYW0ucG9zaXRpb24gKz0gYnl0ZXNXcml0dGVuO1xuICAgICAgICAgICAgICAgIHJldHVybiBieXRlc1dyaXR0ZW47XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgYWxsb2NhdGU6IGZ1bmN0aW9uKHN0cmVhbSwgb2Zmc2V0LCBsZW5ndGgpIHtcbiAgICAgICAgICAgICAgICBpZiAob2Zmc2V0IDwgMCB8fCBsZW5ndGggPD0gMCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FSU5WQUwpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoKHN0cmVhbS5mbGFncyAmIDIwOTcxNTUpID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVCQURGKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCFGUy5pc0ZpbGUoc3RyZWFtLm5vZGUubW9kZSkgJiYgIUZTLmlzRGlyKG5vZGUubW9kZSkpIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRU5PREVWKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCFzdHJlYW0uc3RyZWFtX29wcy5hbGxvY2F0ZSkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FT1BOT1RTVVBQKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgc3RyZWFtLnN0cmVhbV9vcHMuYWxsb2NhdGUoc3RyZWFtLCBvZmZzZXQsIGxlbmd0aCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbW1hcDogZnVuY3Rpb24oXG4gICAgICAgICAgICAgICAgc3RyZWFtLFxuICAgICAgICAgICAgICAgIGJ1ZmZlcixcbiAgICAgICAgICAgICAgICBvZmZzZXQsXG4gICAgICAgICAgICAgICAgbGVuZ3RoLFxuICAgICAgICAgICAgICAgIHBvc2l0aW9uLFxuICAgICAgICAgICAgICAgIHByb3QsXG4gICAgICAgICAgICAgICAgZmxhZ3NcbiAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgIC8vIFRPRE8gaWYgUFJPVCBpcyBQUk9UX1dSSVRFLCBtYWtlIHN1cmUgd2UgaGF2ZSB3cml0ZSBhY2Nlc3NcbiAgICAgICAgICAgICAgICBpZiAoKHN0cmVhbS5mbGFncyAmIDIwOTcxNTUpID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVBQ0NFUyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICghc3RyZWFtLnN0cmVhbV9vcHMubW1hcCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuZXJybm9FcnJvcihFUlJOT19DT0RFUy5FTk9ERVYpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gc3RyZWFtLnN0cmVhbV9vcHMubW1hcChcbiAgICAgICAgICAgICAgICAgICAgc3RyZWFtLFxuICAgICAgICAgICAgICAgICAgICBidWZmZXIsXG4gICAgICAgICAgICAgICAgICAgIG9mZnNldCxcbiAgICAgICAgICAgICAgICAgICAgbGVuZ3RoLFxuICAgICAgICAgICAgICAgICAgICBwb3NpdGlvbixcbiAgICAgICAgICAgICAgICAgICAgcHJvdCxcbiAgICAgICAgICAgICAgICAgICAgZmxhZ3NcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGlvY3RsOiBmdW5jdGlvbihzdHJlYW0sIGNtZCwgYXJnKSB7XG4gICAgICAgICAgICAgICAgaWYgKCFzdHJlYW0uc3RyZWFtX29wcy5pb2N0bCkge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FTk9UVFkpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gc3RyZWFtLnN0cmVhbV9vcHMuaW9jdGwoc3RyZWFtLCBjbWQsIGFyZyk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcmVhZEZpbGU6IGZ1bmN0aW9uKHBhdGgsIG9wdHMpIHtcbiAgICAgICAgICAgICAgICBvcHRzID0gb3B0cyB8fCB7fTtcbiAgICAgICAgICAgICAgICBvcHRzLmZsYWdzID0gb3B0cy5mbGFncyB8fCAncic7XG4gICAgICAgICAgICAgICAgb3B0cy5lbmNvZGluZyA9IG9wdHMuZW5jb2RpbmcgfHwgJ2JpbmFyeSc7XG4gICAgICAgICAgICAgICAgbGV0IHJldDtcbiAgICAgICAgICAgICAgICBjb25zdCBzdHJlYW0gPSBGUy5vcGVuKHBhdGgsIG9wdHMuZmxhZ3MpO1xuICAgICAgICAgICAgICAgIGNvbnN0IHN0YXQgPSBGUy5zdGF0KHBhdGgpO1xuICAgICAgICAgICAgICAgIGNvbnN0IGxlbmd0aCA9IHN0YXQuc2l6ZTtcbiAgICAgICAgICAgICAgICBjb25zdCBidWYgPSBuZXcgVWludDhBcnJheShsZW5ndGgpO1xuICAgICAgICAgICAgICAgIEZTLnJlYWQoc3RyZWFtLCBidWYsIDAsIGxlbmd0aCwgMCk7XG4gICAgICAgICAgICAgICAgaWYgKG9wdHMuZW5jb2RpbmcgPT09ICd1dGY4Jykge1xuICAgICAgICAgICAgICAgICAgICByZXQgPSAnJztcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgdXRmOCA9IG5ldyBSdW50aW1lLlVURjhQcm9jZXNzb3IoKTtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBsZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0ICs9IHV0ZjgucHJvY2Vzc0NDaGFyKGJ1ZltpXSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKG9wdHMuZW5jb2RpbmcgPT09ICdiaW5hcnknKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldCA9IGJ1ZjtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgICAgICAgICAgICAgICAnSW52YWxpZCBlbmNvZGluZyB0eXBlIFwiJyArIG9wdHMuZW5jb2RpbmcgKyAnXCInXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIEZTLmNsb3NlKHN0cmVhbSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHJldDtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB3cml0ZUZpbGU6IGZ1bmN0aW9uKHBhdGgsIGRhdGEsIG9wdHMpIHtcbiAgICAgICAgICAgICAgICBvcHRzID0gb3B0cyB8fCB7fTtcbiAgICAgICAgICAgICAgICBvcHRzLmZsYWdzID0gb3B0cy5mbGFncyB8fCAndyc7XG4gICAgICAgICAgICAgICAgb3B0cy5lbmNvZGluZyA9IG9wdHMuZW5jb2RpbmcgfHwgJ3V0ZjgnO1xuICAgICAgICAgICAgICAgIGNvbnN0IHN0cmVhbSA9IEZTLm9wZW4ocGF0aCwgb3B0cy5mbGFncywgb3B0cy5tb2RlKTtcbiAgICAgICAgICAgICAgICBpZiAob3B0cy5lbmNvZGluZyA9PT0gJ3V0ZjgnKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHV0ZjggPSBuZXcgUnVudGltZS5VVEY4UHJvY2Vzc29yKCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGJ1ZiA9IG5ldyBVaW50OEFycmF5KHV0ZjgucHJvY2Vzc0pTU3RyaW5nKGRhdGEpKTtcbiAgICAgICAgICAgICAgICAgICAgRlMud3JpdGUoc3RyZWFtLCBidWYsIDAsIGJ1Zi5sZW5ndGgsIDApO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAob3B0cy5lbmNvZGluZyA9PT0gJ2JpbmFyeScpIHtcbiAgICAgICAgICAgICAgICAgICAgRlMud3JpdGUoc3RyZWFtLCBkYXRhLCAwLCBkYXRhLmxlbmd0aCwgMCk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICAgICAgICAgICAgICAgICAgJ0ludmFsaWQgZW5jb2RpbmcgdHlwZSBcIicgKyBvcHRzLmVuY29kaW5nICsgJ1wiJ1xuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBGUy5jbG9zZShzdHJlYW0pO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGN3ZDogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIEZTLmN1cnJlbnRQYXRoO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGNoZGlyOiBmdW5jdGlvbihwYXRoKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgbG9va3VwID0gRlMubG9va3VwUGF0aChwYXRoLCB7IGZvbGxvdzogdHJ1ZSB9KTtcbiAgICAgICAgICAgICAgICBpZiAoIUZTLmlzRGlyKGxvb2t1cC5ub2RlLm1vZGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVOT1RESVIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjb25zdCBlcnIgPSBGUy5ub2RlUGVybWlzc2lvbnMobG9va3VwLm5vZGUsICd4Jyk7XG4gICAgICAgICAgICAgICAgaWYgKGVycikge1xuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihlcnIpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBGUy5jdXJyZW50UGF0aCA9IGxvb2t1cC5wYXRoO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGNyZWF0ZURlZmF1bHREaXJlY3RvcmllczogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgRlMubWtkaXIoJy90bXAnKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBjcmVhdGVEZWZhdWx0RGV2aWNlczogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgLy8gY3JlYXRlIC9kZXZcbiAgICAgICAgICAgICAgICBGUy5ta2RpcignL2RldicpO1xuICAgICAgICAgICAgICAgIC8vIHNldHVwIC9kZXYvbnVsbFxuICAgICAgICAgICAgICAgIEZTLnJlZ2lzdGVyRGV2aWNlKEZTLm1ha2VkZXYoMSwgMyksIHtcbiAgICAgICAgICAgICAgICAgICAgcmVhZDogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgd3JpdGU6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICBGUy5ta2RldignL2Rldi9udWxsJywgRlMubWFrZWRldigxLCAzKSk7XG4gICAgICAgICAgICAgICAgLy8gc2V0dXAgL2Rldi90dHkgYW5kIC9kZXYvdHR5MVxuICAgICAgICAgICAgICAgIC8vIHN0ZGVyciBuZWVkcyB0byBwcmludCBvdXRwdXQgdXNpbmcgY29uc29sZS53YXJuXG4gICAgICAgICAgICAgICAgLy8gc28gd2UgcmVnaXN0ZXIgYSBzZWNvbmQgdHR5IGp1c3QgZm9yIGl0LlxuICAgICAgICAgICAgICAgIFRUWS5yZWdpc3RlcihGUy5tYWtlZGV2KDUsIDApLCBUVFkuZGVmYXVsdF90dHlfb3BzKTtcbiAgICAgICAgICAgICAgICBUVFkucmVnaXN0ZXIoRlMubWFrZWRldig2LCAwKSwgVFRZLmRlZmF1bHRfdHR5MV9vcHMpO1xuICAgICAgICAgICAgICAgIEZTLm1rZGV2KCcvZGV2L3R0eScsIEZTLm1ha2VkZXYoNSwgMCkpO1xuICAgICAgICAgICAgICAgIEZTLm1rZGV2KCcv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gICAgICAgICAgICAgICAgICBGUy5jcmVhdGVEZXZpY2UoJy9kZXYnLCAnc3RkaW4nLCBNb2R1bGVbJ3N0ZGluJ10pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIEZTLnN5bWxpbmsoJy9kZXYvdHR5JywgJy9kZXYvc3RkaW4nKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKE1vZHVsZVsnc3Rkb3V0J10pIHtcbiAgICAgICAgICAgICAgICAgICAgRlMuY3JlYXRlRGV2aWNlKCcvZGV2JywgJ3N0ZG91dCcsIG51bGwsIE1vZHVsZVsnc3Rkb3V0J10pO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIEZTLnN5bWxpbmsoJy9kZXYvdHR5JywgJy9kZXYvc3Rkb3V0Jyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChNb2R1bGVbJ3N0ZGVyciddKSB7XG4gICAgICAgICAgICAgICAgICAgIEZTLmNyZWF0ZURldmljZSgnL2RldicsICdzdGRlcnInLCBudWxsLCBNb2R1bGVbJ3N0ZGVyciddKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBGUy5zeW1saW5rKCcvZGV2L3R0eTEnLCAnL2Rldi9zdGRlcnInKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgLy8gb3BlbiBkZWZhdWx0IHN0cmVhbXMgZm9yIHRoZSBzdGRpbiwgc3Rkb3V0IGFuZCBzdGRlcnIgZGV2aWNlc1xuICAgICAgICAgICAgICAgIGNvbnN0IHN0ZGluID0gRlMub3BlbignL2Rldi9zdGRpbicsICdyJyk7XG4gICAgICAgICAgICAgICAgSEVBUDMyW19zdGRpbiA+PiAyXSA9IHN0ZGluLmZkO1xuICAgICAgICAgICAgICAgIGFzc2VydChcbiAgICAgICAgICAgICAgICAgICAgc3RkaW4uZmQgPT09IDEsXG4gICAgICAgICAgICAgICAgICAgICdpbnZhbGlkIGhhbmRsZSBmb3Igc3RkaW4gKCcgKyBzdGRpbi5mZCArICcpJ1xuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgY29uc3Qgc3Rkb3V0ID0gRlMub3BlbignL2Rldi9zdGRvdXQnLCAndycpO1xuICAgICAgICAgICAgICAgIEhFQVAzMltfc3Rkb3V0ID4+IDJdID0gc3Rkb3V0LmZkO1xuICAgICAgICAgICAgICAgIGFzc2VydChcbiAgICAgICAgICAgICAgICAgICAgc3Rkb3V0LmZkID09PSAyLFxuICAgICAgICAgICAgICAgICAgICAnaW52YWxpZCBoYW5kbGUgZm9yIHN0ZG91dCAoJyArIHN0ZG91dC5mZCArICcpJ1xuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgY29uc3Qgc3RkZXJyID0gRlMub3BlbignL2Rldi9zdGRlcnInLCAndycpO1xuICAgICAgICAgICAgICAgIEhFQVAzMltfc3RkZXJyID4+IDJdID0gc3RkZXJyLmZkO1xuICAgICAgICAgICAgICAgIGFzc2VydChcbiAgICAgICAgICAgICAgICAgICAgc3RkZXJyLmZkID09PSAzLFxuICAgICAgICAgICAgICAgICAgICAnaW52YWxpZCBoYW5kbGUgZm9yIHN0ZGVyciAoJyArIHN0ZGVyci5mZCArICcpJ1xuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc3RhdGljSW5pdDogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgRlMubmFtZVRhYmxlID0gbmV3IEFycmF5KDQwOTYpO1xuICAgICAgICAgICAgICAgIEZTLnJvb3QgPSBGUy5jcmVhdGVOb2RlKG51bGwsICcvJywgMTYzODQgfCAwbzc3NywgMCk7XG4gICAgICAgICAgICAgICAgRlMubW91bnQoTUVNRlMsIHt9LCAnLycpO1xuICAgICAgICAgICAgICAgIEZTLmNyZWF0ZURlZmF1bHREaXJlY3RvcmllcygpO1xuICAgICAgICAgICAgICAgIEZTLmNyZWF0ZURlZmF1bHREZXZpY2VzKCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgaW5pdDogZnVuY3Rpb24oaW5wdXQsIG91dHB1dCwgZXJyb3IpIHtcbiAgICAgICAgICAgICAgICBhc3NlcnQoXG4gICAgICAgICAgICAgICAgICAgICFGUy5pbml0LmluaXRpYWxpemVkLFxuICAgICAgICAgICAgICAgICAgICAnRlMuaW5pdCB3YXMgcHJldmlvdXNseSBjYWxsZWQuIElmIHlvdSB3YW50IHRvIGluaXRpYWxpemUgbGF0ZXIgd2l0aCBjdXN0b20gcGFyYW1ldGVycywgcmVtb3ZlIGFueSBlYXJsaWVyIGNhbGxzIChub3RlIHRoYXQgb25lIGlzIGF1dG9tYXRpY2FsbHkgYWRkZWQgdG8gdGhlIGdlbmVyYXRlZCBjb2RlKSdcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIEZTLmluaXQuaW5pdGlhbGl6ZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIC8vIEFsbG93IE1vZHVsZS5zdGRpbiBldGMuIHRvIHByb3ZpZGUgZGVmYXVsdHMsIGlmIG5vbmUgZXhwbGljaXRseSBwYXNzZWQgdG8gdXMgaGVyZVxuICAgICAgICAgICAgICAgIE1vZHVsZVsnc3RkaW4nXSA9IGlucHV0IHx8IE1vZHVsZVsnc3RkaW4nXTtcbiAgICAgICAgICAgICAgICBNb2R1bGVbJ3N0ZG91dCddID0gb3V0cHV0IHx8IE1vZHVsZVsnc3Rkb3V0J107XG4gICAgICAgICAgICAgICAgTW9kdWxlWydzdGRlcnInXSA9IGVycm9yIHx8IE1vZHVsZVsnc3RkZXJyJ107XG4gICAgICAgICAgICAgICAgRlMuY3JlYXRlU3RhbmRhcmRTdHJlYW1zKCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgcXVpdDogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgRlMuaW5pdC5pbml0aWFsaXplZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgRlMuc3RyZWFtcy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBzdHJlYW0gPSBGUy5zdHJlYW1zW2ldO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIXN0cmVhbSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgRlMuY2xvc2Uoc3RyZWFtKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZ2V0TW9kZTogZnVuY3Rpb24oY2FuUmVhZCwgY2FuV3JpdGUpIHtcbiAgICAgICAgICAgICAgICBsZXQgbW9kZSA9IDA7XG4gICAgICAgICAgICAgICAgaWYgKGNhblJlYWQpIG1vZGUgfD0gMjkyIHwgNzM7XG4gICAgICAgICAgICAgICAgaWYgKGNhbldyaXRlKSBtb2RlIHw9IDE0NjtcbiAgICAgICAgICAgICAgICByZXR1cm4gbW9kZTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBqb2luUGF0aDogZnVuY3Rpb24ocGFydHMsIGZvcmNlUmVsYXRpdmUpIHtcbiAgICAgICAgICAgICAgICBsZXQgcGF0aCA9IFBBVEguam9pbi5hcHBseShudWxsLCBwYXJ0cyk7XG4gICAgICAgICAgICAgICAgaWYgKGZvcmNlUmVsYXRpdmUgJiYgcGF0aFswXSA9PSAnLycpIHBhdGggPSBwYXRoLnN1YnN0cigxKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gcGF0aDtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBhYnNvbHV0ZVBhdGg6IGZ1bmN0aW9uKHJlbGF0aXZlLCBiYXNlKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFBBVEgucmVzb2x2ZShiYXNlLCByZWxhdGl2ZSk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgc3RhbmRhcmRpemVQYXRoOiBmdW5jdGlvbihwYXRoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIFBBVEgubm9ybWFsaXplKHBhdGgpO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGZpbmRPYmplY3Q6IGZ1bmN0aW9uKHBhdGgsIGRvbnRSZXNvbHZlTGFzdExpbmspIHtcbiAgICAgICAgICAgICAgICBjb25zdCByZXQgPSBGUy5hbmFseXplUGF0aChwYXRoLCBkb250UmVzb2x2ZUxhc3RMaW5rKTtcbiAgICAgICAgICAgICAgICBpZiAocmV0LmV4aXN0cykge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gcmV0Lm9iamVjdDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBfX19zZXRFcnJObyhyZXQuZXJyb3IpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgYW5hbHl6ZVBhdGg6IGZ1bmN0aW9uKHBhdGgsIGRvbnRSZXNvbHZlTGFzdExpbmspIHtcbiAgICAgICAgICAgICAgICAvLyBvcGVyYXRlIGZyb20gd2l0aGluIHRoZSBjb250ZXh0IG9mIHRoZSBzeW1saW5rJ3MgdGFyZ2V0XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIGxvb2t1cCA9IEZTLmxvb2t1cFBhdGgocGF0aCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9sbG93OiAhZG9udFJlc29sdmVMYXN0TGlua1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgcGF0aCA9IGxvb2t1cC5wYXRoO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XG4gICAgICAgICAgICAgICAgY29uc3QgcmV0ID0ge1xuICAgICAgICAgICAgICAgICAgICBpc1Jvb3Q6IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICBleGlzdHM6IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICBlcnJvcjogMCxcbiAgICAgICAgICAgICAgICAgICAgbmFtZTogbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgcGF0aDogbnVsbCxcbiAgICAgICAgICAgICAgICAgICAgb2JqZWN0OiBudWxsLFxuICAgICAgICAgICAgICAgICAgICBwYXJlbnRFeGlzdHM6IGZhbHNlLFxuICAgICAgICAgICAgICAgICAgICBwYXJlbnRQYXRoOiBudWxsLFxuICAgICAgICAgICAgICAgICAgICBwYXJlbnRPYmplY3Q6IG51bGxcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBsb29rdXAgPSBGUy5sb29rdXBQYXRoKHBhdGgsIHsgcGFyZW50OiB0cnVlIH0pO1xuICAgICAgICAgICAgICAgICAgICByZXQucGFyZW50RXhpc3RzID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0LnBhcmVudFBhdGggPSBsb29rdXAucGF0aDtcbiAgICAgICAgICAgICAgICAgICAgcmV0LnBhcmVudE9iamVjdCA9IGxvb2t1cC5ub2RlO1xuICAgICAgICAgICAgICAgICAgICByZXQubmFtZSA9IFBBVEguYmFzZW5hbWUocGF0aCk7XG4gICAgICAgICAgICAgICAgICAgIGxvb2t1cCA9IEZTLmxvb2t1cFBhdGgocGF0aCwge1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9sbG93OiAhZG9udFJlc29sdmVMYXN0TGlua1xuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgcmV0LmV4aXN0cyA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgIHJldC5wYXRoID0gbG9va3VwLnBhdGg7XG4gICAgICAgICAgICAgICAgICAgIHJldC5vYmplY3QgPSBsb29rdXAubm9kZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0Lm5hbWUgPSBsb29rdXAubm9kZS5uYW1lO1xuICAgICAgICAgICAgICAgICAgICByZXQuaXNSb290ID0gbG9va3VwLnBhdGggPT09ICcvJztcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldC5lcnJvciA9IGUuZXJybm87XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiByZXQ7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY3JlYXRlRm9sZGVyOiBmdW5jdGlvbihwYXJlbnQsIG5hbWUsIGNhblJlYWQsIGNhbldyaXRlKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgcGF0aCA9IFBBVEguam9pbihcbiAgICAgICAgICAgICAgICAgICAgdHlwZW9mIHBhcmVudCA9PT0gJ3N0cmluZycgPyBwYXJlbnQgOiBGUy5nZXRQYXRoKHBhcmVudCksXG4gICAgICAgICAgICAgICAgICAgIG5hbWVcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIGNvbnN0IG1vZGUgPSBGUy5nZXRNb2RlKGNhblJlYWQsIGNhbldyaXRlKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gRlMubWtkaXIocGF0aCwgbW9kZSk7XG4gICAgICAgICAgICB9LFxuXG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIENyZWF0ZXMgYSBkaXJlY3RvcnkuXG4gICAgICAgICAgICAgKiBAZnVuY3Rpb24gY3JlYXRlUGF0aFxuICAgICAgICAgICAgICogQG1lbWJlcm9mIExpYlRpTWlkaXR5XG4gICAgICAgICAgICAgKiBAaW5zdGFuY2VcbiAgICAgICAgICAgICAqIEBwYXJhbSB7c3RyaW5nfSBwYXJlbnQgVGhlIHBhcmVudCBmb2xkZXIuXG4gICAgICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gcGF0aCBUaGUgcGF0aCB0byBjcmVhdGUuXG4gICAgICAgICAgICAgKiBAcGFyYW0ge2Jvb2xlYW59IFt0aHJvd0Vycm9yID0gdHJ1ZV0gSWYgZGlyZWN0b3J5IGNyZWF0aW9uIGZhaWxlZCwgdGhyb3cgYW4gZXJyb3IuXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIGNyZWF0ZVBhdGg6IGZ1bmN0aW9uKHBhcmVudCwgcGF0aCwgdGhyb3dFcnJvciA9IHRydWUpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBwYXJ0cyA9IHBhdGguc3BsaXQoJy8nKS5yZXZlcnNlKCk7XG4gICAgICAgICAgICAgICAgd2hpbGUgKHBhcnRzLmxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBwYXJ0ID0gcGFydHMucG9wKCk7XG4gICAgICAgICAgICAgICAgICAgIGlmICghcGFydCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgY3VycmVudCA9IFBBVEguam9pbihwYXJlbnQsIHBhcnQpO1xuICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgRlMubWtkaXIoY3VycmVudCwgdW5kZWZpbmVkLCB0aHJvd0Vycm9yKTtcbiAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNvbnNvbGUuZXJyb3IoZXJyb3IpXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcGFyZW50ID0gY3VycmVudDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuXG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIENyZWF0ZXMgYSBmaWxlLlxuICAgICAgICAgICAgICogQGZ1bmN0aW9uIGNyZWF0ZUZpbGVcbiAgICAgICAgICAgICAqIEBtZW1iZXJvZiBMaWJUaU1pZGl0eVxuICAgICAgICAgICAgICogQGluc3RhbmNlXG4gICAgICAgICAgICAgKiBAcGFyYW0ge3N0cmluZ30gcGFyZW50IFRoZSBwYXJlbnQgZm9sZGVyLlxuICAgICAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IG5hbWUgVGhlIHBhdGggdG8gY3JlYXRlLlxuICAgICAgICAgICAgICogQHBhcmFtIHtib29sZWFufSBjYW5SZWFkXG4gICAgICAgICAgICAgKiBAcGFyYW0ge2Jvb2xlYW59IGNhbldyaXRlXG4gICAgICAgICAgICAgKi9cbiAgICAgICAgICAgIGNyZWF0ZUZpbGU6IGZ1bmN0aW9uKHBhcmVudCwgbmFtZSwgY2FuUmVhZCwgY2FuV3JpdGUpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBwYXRoID0gUEFUSC5qb2luKFxuICAgICAgICAgICAgICAgICAgICB0eXBlb2YgcGFyZW50ID09PSAnc3RyaW5nJyA/IHBhcmVudCA6IEZTLmdldFBhdGgocGFyZW50KSxcbiAgICAgICAgICAgICAgICAgICAgbmFtZVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgY29uc3QgbW9kZSA9IEZTLmdldE1vZGUoY2FuUmVhZCwgY2FuV3JpdGUpO1xuICAgICAgICAgICAgICAgIHJldHVybiBGUy5jcmVhdGUocGF0aCwgbW9kZSk7XG4gICAgICAgICAgICB9LFxuXG4gICAgICAgICAgICAvKipcbiAgICAgICAgICAgICAqIENyZWF0ZXMgYSBkYXRhIGZpbGUgYW5kIHdyaXRlcyBkYXRhIHRvIGl0LlxuICAgICAgICAgICAgICogQGZ1bmN0aW9uIGNyZWF0ZURhdGFGaWxlXG4gICAgICAgICAgICAgKiBAbWVtYmVyb2YgTGliVGlNaWRpdHlcbiAgICAgICAgICAgICAqIEBpbnN0YW5jZVxuICAgICAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IHBhcmVudFxuICAgICAgICAgICAgICogQHBhcmFtIHtzdHJpbmd9IG5hbWVcbiAgICAgICAgICAgICAqIEBwYXJhbSB7YXJyYXl9IGRhdGFcbiAgICAgICAgICAgICAqIEBwYXJhbSB7Ym9vbGVhbn0gY2FuUmVhZFxuICAgICAgICAgICAgICogQHBhcmFtIHtib29sZWFufSBjYW5Xcml0ZVxuICAgICAgICAgICAgICogQHBhcmFtIHtib29sZWFufSBbY2FuT3duXVxuICAgICAgICAgICAgICogQHBhcmFtIHtib29sZWFufSBbdGhyb3dFcnJvciA9IHRydWVdIElmIGZpbGUgY3JlYXRpb24gZmFpbGVkLCB0aHJvdyBhbiBlcnJvci5cbiAgICAgICAgICAgICAqL1xuXG4gICAgICAgICAgICBjcmVhdGVEYXRhRmlsZTogZnVuY3Rpb24oXG4gICAgICAgICAgICAgICAgcGFyZW50LFxuICAgICAgICAgICAgICAgIG5hbWUsXG4gICAgICAgICAgICAgICAgZGF0YSxcbiAgICAgICAgICAgICAgICBjYW5SZWFkLFxuICAgICAgICAgICAgICAgIGNhbldyaXRlLFxuICAgICAgICAgICAgICAgIGNhbk93bixcbiAgICAgICAgICAgICAgICB0aHJvd0Vycm9yID0gdHJ1ZVxuICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgY29uc3QgcGF0aCA9IG5hbWVcbiAgICAgICAgICAgICAgICAgICAgPyBQQVRILmpvaW4oXG4gICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVvZiBwYXJlbnQgPT09ICdzdHJpbmcnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/IHBhcmVudFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBGUy5nZXRQYXRoKHBhcmVudCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWVcbiAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgIDogcGFyZW50O1xuICAgICAgICAgICAgICAgIGNvbnN0IG1vZGUgPSBGUy5nZXRNb2RlKGNhblJlYWQsIGNhbldyaXRlKTtcblxuICAgICAgICAgICAgICAgIGlmICh0aHJvd0Vycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIEZTLmNyZWF0ZShwYXRoLCBtb2RlKTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgRlMuY3JlYXRlKHBhdGgsIG1vZGUpO1xuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgaWYgKGRhdGEpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBkYXRhID09PSAnc3RyaW5nJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGFyciA9IG5ldyBBcnJheShkYXRhLmxlbmd0aCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGxldCBpID0gMCwgbGVuID0gZGF0YS5sZW5ndGg7IGkgPCBsZW47ICsraSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFycltpXSA9IGRhdGEuY2hhckNvZGVBdChpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGRhdGEgPSBhcnI7XG4gICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAvLyBtYWtlIHN1cmUgd2UgY2FuIHdyaXRlIHRvIHRoZSBmaWxlXG4gICAgICAgICAgICAgICAgICAgIEZTLmNobW9kKHBhdGgsIG1vZGUgfCAxNDYpO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBzdHJlYW0gPSBGUy5vcGVuKHBhdGgsICd3Jyk7XG4gICAgICAgICAgICAgICAgICAgIEZTLndyaXRlKHN0cmVhbSwgZGF0YSwgMCwgZGF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tcbiAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICBjb25zdCBhcnJheUJ1ZmZlciA9IGF3YWl0IHJlc3BvbnNlLmFycmF5QnVmZmVyKCk7XG5cbiAgICAgICAgICAgICAgICBjb25zdCBkYXRhID0gbmV3IEludDhBcnJheShhcnJheUJ1ZmZlcik7XG4gICAgICAgICAgICAgICAgY29uc3QgbW9kZSA9IEZTLmdldE1vZGUodHJ1ZSwgdHJ1ZSk7XG4gICAgICAgICAgICAgICAgY29uc3QgcGF0aCA9IFBBVEguam9pbihMSUJUSU1JRElUWV9QQVRDSF9ESVJFQ1RPUlksIGZpbGVuYW1lKTtcblxuICAgICAgICAgICAgICAgIEZTLmNyZWF0ZShwYXRoLCBtb2RlKTtcbiAgICAgICAgICAgICAgICBGUy5jaG1vZChwYXRoLCBtb2RlIHwgMTQ2KTtcbiAgICAgICAgICAgICAgICBjb25zdCBzdHJlYW0gPSBGUy5vcGVuKHBhdGgsICd3Jyk7XG4gICAgICAgICAgICAgICAgRlMud3JpdGUoc3RyZWFtLCBkYXRhLCAwLCBkYXRhLmxlbmd0aCwgMCwgdW5kZWZpbmVkKTtcbiAgICAgICAgICAgICAgICBGUy5jbG9zZShzdHJlYW0pO1xuICAgICAgICAgICAgICAgIEZTLmNobW9kKHBhdGgsIG1vZGUpO1xuICAgICAgICAgICAgfSxcblxuICAgICAgICAgICAgY3JlYXRlRGV2aWNlOiBmdW5jdGlvbihwYXJlbnQsIG5hbWUsIGlucHV0LCBvdXRwdXQpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBwYXRoID0gUEFUSC5qb2luKFxuICAgICAgICAgICAgICAgICAgICB0eXBlb2YgcGFyZW50ID09PSAnc3RyaW5nJyA/IHBhcmVudCA6IEZTLmdldFBhdGgocGFyZW50KSxcbiAgICAgICAgICAgICAgICAgICAgbmFtZVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgY29uc3QgbW9kZSA9IEZTLmdldE1vZGUoISFpbnB1dCwgISFvdXRwdXQpO1xuICAgICAgICAgICAgICAgIGlmICghRlMuY3JlYXRlRGV2aWNlLm1ham9yKSBGUy5jcmVhdGVEZXZpY2UubWFqb3IgPSA2NDtcbiAgICAgICAgICAgICAgICBjb25zdCBkZXYgPSBGUy5tYWtlZGV2KEZTLmNyZWF0ZURldmljZS5tYWpvcisrLCAwKTtcbiAgICAgICAgICAgICAgICAvLyBDcmVhdGUgYSBmYWtlIGRldmljZSB0aGF0IGEgc2V0IG9mIHN0cmVhbSBvcHMgdG8gZW11bGF0ZSBoZSBvbGQgYmVoYXZpb3IuXG4gICAgICAgICAgICAgICAgRlMucmVnaXN0ZXJEZXZpY2UoZGV2LCB7XG4gICAgICAgICAgICAgICAgICAgIG9wZW46IGZ1bmN0aW9uKHN0cmVhbSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3RyZWFtLnNlZWthYmxlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgICAgIGNsb3NlOiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGZsdXNoIGFueSBwZW5kaW5nIGxpbmUgZGF0YVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG91dHB1dCAmJiBvdXRwdXQuYnVmZmVyICYmIG91dHB1dC5idWZmZXIubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgb3V0cHV0KDEwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgcmVhZDogZnVuY3Rpb24oc3RyZWFtLCBidWZmZXIsIG9mZnNldCwgbGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgYnl0ZXNSZWFkID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbGVuZ3RoOyBpKyspIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcmVzdWx0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc3VsdCA9IGlucHV0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FSU8pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocmVzdWx0ID09PSB1bmRlZmluZWQgJiYgYnl0ZXNSZWFkID09PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVBR0FJTik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChyZXN1bHQgPT09IG51bGwgfHwgcmVzdWx0ID09PSB1bmRlZmluZWQpIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5dGVzUmVhZCsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ1ZmZlcltvZmZzZXQgKyBpXSA9IHJlc3VsdDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChieXRlc1JlYWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzdHJlYW0ubm9kZS50aW1lc3RhbXAgPSBEYXRlLm5vdygpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGJ5dGVzUmVhZDtcbiAgICAgICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICAgICAgd3JpdGU6IGZ1bmN0aW9uKHN0cmVhbSwgYnVmZmVyLCBvZmZzZXQsIGxlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBsZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG91dHB1dChidWZmZXJbb2Zmc2V0ICsgaV0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRUlPKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyZWFtLm5vZGUudGltZXN0YW1wID0gRGF0ZS5ub3coKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIEZTLm1rZGV2KHBhdGgsIG1vZGUsIGRldik7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY3JlYXRlTGluazogZnVuY3Rpb24ocGFyZW50LCBuYW1lLCB0YXJnZXQpIHtcbiAgICAgICAgICAgICAgICBjb25zdCBwYXRoID0gUEFUSC5qb2luKFxuICAgICAgICAgICAgICAgICAgICB0eXBlb2YgcGFyZW50ID09PSAnc3RyaW5nJyA/IHBhcmVudCA6IEZTLmdldFBhdGgocGFyZW50KSxcbiAgICAgICAgICAgICAgICAgICAgbmFtZVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIEZTLnN5bWxpbmsodGFyZ2V0LCBwYXRoKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBjcmVhdGVQcmVsb2FkZWRGaWxlOiBmdW5jdGlvbihcbiAgICAgICAgICAgICAgICBwYXJlbnQsXG4gICAgICAgICAgICAgICAgbmFtZSxcbiAgICAgICAgICAgICAgICB1cmwsXG4gICAgICAgICAgICAgICAgY2FuUmVhZCxcbiAgICAgICAgICAgICAgICBjYW5Xcml0ZSxcbiAgICAgICAgICAgICAgICBvbmxvYWQsXG4gICAgICAgICAgICAgICAgZG9udENyZWF0ZUZpbGUsXG4gICAgICAgICAgICAgICAgY2FuT3duXG4gICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAvLyBUT0RPIHdlIHNob3VsZCBhbGxvdyBwZW9wbGUgdG8ganVzdCBwYXNzIGluIGEgY29tcGxldGUgZmlsZW5hbWUgaW5zdGVhZCBvZiBwYXJlbnQgYW5kIG5hbWUgYmVpbmcgdGhhdCB3ZSBqdXN0IGpvaW4gdGhlbSBhbnl3YXlzXG4gICAgICAgICAgICAgICAgY29uc3QgZnVsbG5hbWUgPSBuYW1lXG4gICAgICAgICAgICAgICAgICAgID8gUEFUSC5yZXNvbHZlKFBBVEguam9pbihwYXJlbnQsIG5hbWUpKVxuICAgICAgICAgICAgICAgICAgICA6IHBhcmVudDtcbiAgICAgICAgICAgICAgICBmdW5jdGlvbiBwcm9jZXNzRGF0YShieXRlQXJyYXkpIHtcbiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gZmluaXNoKGJ5dGVBcnJheSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFkb250Q3JlYXRlRmlsZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZTLmNyZWF0ZURhdGFGaWxlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJlbnQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5hbWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5dGVBcnJheSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FuUmVhZCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FuV3JpdGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhbk93blxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAob25sb2FkKSBvbmxvYWQoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlbW92ZVJ1bkRlcGVuZGVuY3koJ2NwICcgKyBmdWxsbmFtZSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZmluaXNoKGJ5dGVBcnJheSk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGFkZFJ1bkRlcGVuZGVuY3koJ2NwICcgKyBmdWxsbmFtZSk7XG4gICAgICAgICAgICAgICAgcHJvY2Vzc0RhdGEodXJsKTtcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBpbmRleGVkREI6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgIHdpbmRvdy5pbmRleGVkREIgfHxcbiAgICAgICAgICAgICAgICAgICAgd2luZG93Lm1vekluZGV4ZWREQiB8fFxuICAgICAgICAgICAgICAgICAgICB3aW5kb3cud2Via2l0SW5kZXhlZERCIHx8XG4gICAgICAgICAgICAgICAgICAgIHdpbmRvdy5tc0luZGV4ZWREQlxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgREJfTkFNRTogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuICdFTV9GU18nICsgd2luZG93LmxvY2F0aW9uLnBhdGhuYW1lO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIERCX1ZFUlNJT046IDIwLFxuICAgICAgICAgICAgREJfU1RPUkVfTkFNRTogJ0ZJTEVfREFUQScsXG4gICAgICAgICAgICBzYXZlRmlsZXNUb0RCOiBmdW5jdGlvbihwYXRocywgb25sb2FkLCBvbmVycm9yKSB7XG4gICAgICAgICAgICAgICAgb25sb2FkID0gb25sb2FkIHx8IGZ1bmN0aW9uKCkge307XG4gICAgICAgICAgICAgICAgb25lcnJvciA9IG9uZXJyb3IgfHwgZnVuY3Rpb24oKSB7fTtcbiAgICAgICAgICAgICAgICBjb25zdCBpbmRleGVkREIgPSBGUy5pbmRleGVkREIoKTtcbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICB2YXIgb3BlblJlcXVlc3QgPSBpbmRleGVkREIub3BlbihcbiAgICAgICAgICAgICAgICAgICAgICAgIEZTLkRCX05BTUUoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIEZTLkRCX1ZFUlNJT05cbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBvbmVycm9yKGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBvcGVuUmVxdWVzdC5vbnVwZ3JhZGVuZWVkZWQgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZGIgPSBvcGVuUmVxdWVzdC5yZXN1bHQ7XG4gICAgICAgICAgICAgICAgICAgIGRiLmNyZWF0ZU9iamVjdFN0b3JlKEZTLkRCX1NUT1JFX05BTUUpO1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgb3BlblJlcXVlc3Qub25zdWNjZXNzID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGRiID0gb3BlblJlcXVlc3QucmVzdWx0O1xuICAgICAgICAgICAgICAgICAgICBjb25zdCB0cmFuc2FjdGlvbiA9IGRiLnRyYW5zYWN0aW9uKFxuICAgICAgICAgICAgICAgICAgICAgICAgW0ZTLkRCX1NUT1JFX05BTUVdLFxuICAgICAgICAgICAgICAgICAgICAgICAgJ3JlYWR3cml0ZSdcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZmlsZXMgPSB0cmFuc2FjdGlvbi5vYmplY3RTdG9yZShGUy5EQl9TVE9SRV9OQU1FKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IG9rID0gMCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZhaWwgPSAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgdG90YWwgPSBwYXRocy5sZW5ndGg7XG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGZpbmlzaCgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmYWlsID09IDApIG9ubG9hZCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBvbmVycm9yKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcGF0aHMuZm9yRWFjaChmdW5jdGlvbihwYXRoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBwdXRSZXF1ZXN0ID0gZmlsZXMucHV0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZTLmFuYWx5emVQYXRoKHBhdGgpLm9iamVjdC5jb250ZW50cyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXRoXG4gICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgcHV0UmVxdWVzdC5vbnN1Y2Nlc3MgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvaysrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvayArIGZhaWwgPT0gdG90YWwpIGZpbmlzaCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHB1dFJlcXVlc3Qub25lcnJvciA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZhaWwrKztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAob2sgKyBmYWlsID09IHRvdGFsKSBmaW5pc2goKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB0cmFuc2FjdGlvbi5vbmVycm9yID0gb25lcnJvcjtcbiAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgIG9wZW5SZXF1ZXN0Lm9uZXJyb3IgPSBvbmVycm9yO1xuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGxvYWRGaWxlc0Zyb21EQjogZnVuY3Rpb24ocGF0aHMsIG9ubG9hZCwgb25lcnJvcikge1xuICAgICAgICAgICAgICAgIG9ubG9hZCA9IG9ubG9hZCB8fCBmdW5jdGlvbigpIHt9O1xuICAgICAgICAgICAgICAgIG9uZXJyb3IgPSBvbmVycm9yIHx8IGZ1bmN0aW9uKCkge307XG4gICAgICAgICAgICAgICAgY29uc3QgaW5kZXhlZERCID0gRlMuaW5kZXhlZERCKCk7XG4gICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgdmFyIG9wZW5SZXF1ZXN0ID0gaW5kZXhlZERCLm9wZW4oXG4gICAgICAgICAgICAgICAgICAgICAgICBGUy5EQl9OQU1FKCksXG4gICAgICAgICAgICAgICAgICAgICAgICBGUy5EQl9WRVJTSU9OXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gb25lcnJvcihlKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgb3BlblJlcXVlc3Qub251cGdyYWRlbmVlZGVkID0gb25lcnJvcjsgLy8gbm8gZGF0YWJhc2UgdG8gbG9hZCBmcm9tXG4gICAgICAgICAgICAgICAgb3BlblJlcXVlc3Qub25zdWNjZXNzID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IGRiID0gb3BlblJlcXVlc3QucmVzdWx0O1xuICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIHRyYW5zYWN0aW9uID0gZGIudHJhbnNhY3Rpb24oXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgW0ZTLkRCX1NUT1JFX05BTUVdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICdyZWFkb25seSdcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG9uZXJyb3IoZSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZmlsZXMgPSB0cmFuc2FjdGlvbi5vYmplY3RTdG9yZShGUy5EQl9TVE9SRV9OQU1FKTtcbiAgICAgICAgICAgICAgICAgICAgbGV0IG9rID0gMCxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZhaWwgPSAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgdG90YWwgPSBwYXRocy5sZW5ndGg7XG4gICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGZpbmlzaCgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmYWlsID09IDApIG9ubG9hZCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBvbmVycm9yKCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcGF0aHMuZm9yRWFjaChmdW5jdGlvbihwYXRoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBnZXRSZXF1ZXN0ID0gZmlsZXMuZ2V0KHBhdGgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgZ2V0UmVxdWVzdC5vbnN1Y2Nlc3MgPSBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoRlMuYW5hbHl6ZVBhdGgocGF0aCkuZXhpc3RzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEZTLnVubGluayhwYXRoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgRlMuY3JlYXRlRGF0YUZpbGUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFBBVEguZGlybmFtZShwYXRoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUEFUSC5iYXNlbmFtZShwYXRoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ2V0UmVxdWVzdC5yZXN1bHQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRydWUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRydWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9rKys7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG9rICsgZmFpbCA9PSB0b3RhbCkgZmluaXNoKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICAgICAgZ2V0UmVxdWVzdC5vbmVycm9yID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZmFpbCsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvayArIGZhaWwgPT0gdG90YWwpIGZpbmlzaCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAg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cvb25saW5lcHVicy8wMDAwOTUzOTkvZnVuY3Rpb25zL2ZvcGVuLmh0bWxcbiAgICAgICAgICAgIGxldCBmbGFncztcbiAgICAgICAgICAgIG1vZGUgPSBQb2ludGVyX3N0cmluZ2lmeShtb2RlKTtcbiAgICAgICAgICAgIGlmIChtb2RlWzBdID09ICdyJykge1xuICAgICAgICAgICAgICAgIGlmIChtb2RlLmluZGV4T2YoJysnKSAhPSAtMSkge1xuICAgICAgICAgICAgICAgICAgICBmbGFncyA9IDI7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZmxhZ3MgPSAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAobW9kZVswXSA9PSAndycpIHtcbiAgICAgICAgICAgICAgICBpZiAobW9kZS5pbmRleE9mKCcrJykgIT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgZmxhZ3MgPSAyO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGZsYWdzID0gMTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZmxhZ3MgfD0gNjQ7XG4gICAgICAgICAgICAgICAgZmxhZ3MgfD0gNTEyO1xuICAgICAgICAgICAgfSBlbHNlIGlmIChtb2RlWzBdID09ICdhJykge1xuICAgICAgICAgICAgICAgIGlmIChtb2RlLmluZGV4T2YoJysnKSAhPSAtMSkge1xuICAgICAgICAgICAgICAgICAgICBmbGFncyA9IDI7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZmxhZ3MgPSAxO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBmbGFncyB8PSA2NDtcbiAgICAgICAgICAgICAgICBmbGFncyB8PSAxMDI0O1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBfX19zZXRFcnJObyhFUlJOT19DT0RFUy5FSU5WQUwpO1xuICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgY29uc3QgcmV0ID0gX29wZW4oXG4gICAgICAgICAgICAgICAgZmlsZW5hbWUsXG4gICAgICAgICAgICAgICAgZmxhZ3MsXG4gICAgICAgICAgICAgICAgYWxsb2NhdGUoWzB4MWZmLCAwLCAwLCAwXSwgJ2kzMicsIEFMTE9DX1NUQUNLKVxuICAgICAgICAgICAgKTsgLy8gQWxsIGNyZWF0aW9uIHBlcm1pc3Npb25zLlxuICAgICAgICAgICAgcmV0dXJuIHJldCA9PSAtMSA/IDAgOiByZXQ7XG4gICAgICAgIH1cbiAgICAgICAgTW9kdWxlWydfc3RybGVuJ10gPSBfc3RybGVuO1xuICAgICAgICBNb2R1bGVbJ19zdHJjcHknXSA9IF9zdHJjcHk7XG4gICAgICAgIE1vZHVsZVsnX3N0cmNhdCddID0gX3N0cmNhdDtcbiAgICAgICAgY29uc3QgU09DS0ZTID0ge1xuICAgICAgICAgICAgbW91bnQ6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBGUy5jcmVhdGVOb2RlKG51bGwsICcvJywgMTYzODQgfCAwbzc3NywgMCk7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgY3JlYXRlU29ja2V0OiBmdW5jdGlvbihmYW1pbHksIHR5cGUsIHByb3RvY29sKSB7XG4gICAgICAgICAgICAgICAgY29uc3Qgc3RyZWFtaW5nID0gdHlwZSA9PSAxO1xuICAgICAgICAgICAgICAgIGlmIChwcm90b2NvbCkge1xuICAgICAgICAgICAgICAgICAgICBhc3NlcnQoc3RyZWFtaW5nID09IChwcm90b2NvbCA9PSA2KSk7IC8vIGlmIFNPQ0tfU1RSRUFNLCBtdXN0IGJlIHRjcFxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAvLyBjcmVhdGUgb3VyIGludGVybmFsIHNvY2tldCBzdHJ1Y3R1cmVcbiAgICAgICAgICAgICAgICBjb25zdCBzb2NrID0ge1xuICAgICAgICAgICAgICAgICAgICBmYW1pbHk6IGZhbWlseSxcbiAgICAgICAgICAgICAgICAgICAgdHlwZTogdHlwZSxcbiAgICAgICAgICAgICAgICAgICAgcHJvdG9jb2w6IHByb3RvY29sLFxuICAgICAgICAgICAgICAgICAgICBzZXJ2ZXI6IG51bGwsXG4gICAgICAgICAgICAgICAgICAgIHBlZXJzOiB7fSxcbiAgICAgICAgICAgICAgICAgICAgcGVuZGluZzogW10sXG4gICAgICAgICAgICAgICAgICAgIHJlY3ZfcXVldWU6IFtdLFxuICAgICAgICAgICAgICAgICAgICBzb2NrX29wczogU09DS0ZTLndlYnNvY2tldF9zb2NrX29wc1xuICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgLy8gY3JlYXRlIHRoZSBmaWxlc3lzdGVtIG5vZGUgdG8gc3RvcmUgdGhlIHNvY2tldCBzdHJ1Y3R1cmVcbiAgICAgICAgICAgICAgICBjb25zdCBuYW1lID0gU09DS0ZTLm5leHRuYW1lKCk7XG4gICAgICAgICAgICAgICAgY29uc3Qgbm9kZSA9IEZTLmNyZWF0ZU5vZGUoU09DS0ZTLnJvb3QsIG5hbWUsIDQ5MTUyLCAwKTtcbiAgICAgICAgICAgICAgICBub2RlLnNvY2sgPSBzb2NrO1xuICAgICAgICAgICAgICAgIC8vIGFuZCB0aGUgd3JhcHBpbmcgc3RyZWFtIHRoYXQgZW5hYmxlcyBsaWJyYXJ5IGZ1bmN0aW9ucyBzdWNoIGFzIHJlYWQgYW5kIHdyaXRlIHRvIGluZGlyZWN0bHkgaW50ZXJhY3Qgd2l0aCB0aGUgc29ja2V0XG4gICAgICAgICAgICAgICAgY29uc3Qgc3RyZWFtID0gRlMuY3JlYXRlU3RyZWFtKHtcbiAgICAgICAgICAgICAgICAgICAgcGF0aDogbmFtZSxcbiAgICAgICAgICAgICAgICAgICAgbm9kZTogbm9kZSxcbiAgICAgICAgICAgICAgICAgICAgZmxhZ3M6IEZTLm1vZGVTdHJpbmdUb0ZsYWdzKCdyKycpLFxuICAgICAgICAgICAgICAgICAgICBzZWVrYWJsZTogZmFsc2UsXG4gICAgICAgICAgICAgICAgICAgIHN0cmVhbV9vcHM6IFNPQ0tGUy5zdHJlYW1fb3BzXG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgLy8gbWFwIHRoZSBuZXcgc3RyZWFtIHRvIHRoZSBzb2NrZXQgc3RydWN0dXJlIChzb2NrZXRzIGhhdmUgYSAxOjEgcmVsYXRpb25zaGlwIHdpdGggYSBzdHJlYW0pXG4gICAgICAgICAgICAgICAgc29jay5zdHJlYW0gPSBzdHJlYW07XG4gICAgICAgICAgICAgICAgcmV0dXJuIHNvY2s7XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgZ2V0U29ja2V0OiBmdW5jdGlvbihmZCkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHN0cmVhbSA9IEZTLmdldFN0cmVhbShmZCk7XG4gICAgICAgICAgICAgICAgaWYgKCFzdHJlYW0gfHwgIUZTLmlzU29ja2V0KHN0cmVhbS5ub2RlLm1vZGUpKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBudWxsO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gc3RyZWFtLm5vZGUuc29jaztcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICBzdHJlYW1fb3BzOiB7XG4gICAgICAgICAgICAgICAgcG9sbDogZnVuY3Rpb24oc3RyZWFtKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHNvY2sgPSBzdHJlYW0ubm9kZS5zb2NrO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc29jay5zb2NrX29wcy5wb2xsKHNvY2spO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgaW9jdGw6IGZ1bmN0aW9uKHN0cmVhbSwgcmVxdWVzdCwgdmFyYXJncykge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBzb2NrID0gc3RyZWFtLm5vZGUuc29jaztcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNvY2suc29ja19vcHMuaW9jdGwoc29jaywgcmVxdWVzdCwgdmFyYXJncyk7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICByZWFkOiBmdW5jdGlvbihzdHJlYW0sIGJ1ZmZlciwgb2Zmc2V0LCBsZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgY29uc3Qgc29jayA9IHN0cmVhbS5ub2RlLnNvY2s7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IG1zZyA9IHNvY2suc29ja19vcHMucmVjdm1zZyhzb2NrLCBsZW5ndGgpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIW1zZykge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gc29ja2V0IGlzIGNsb3NlZFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYnVmZmVyLnNldChtc2cuYnVmZmVyLCBvZmZzZXQpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbXNnLmJ1ZmZlci5sZW5ndGg7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICB3cml0ZTogZnVuY3Rpb24oc3RyZWFtLCBidWZmZXIsIG9mZnNldCwgbGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHNvY2sgPSBzdHJlYW0ubm9kZS5zb2NrO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gc29jay5zb2NrX29wcy5zZW5kbXNnKHNvY2ssIGJ1ZmZlciwgb2Zmc2V0LCBsZW5ndGgpO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgY2xvc2U6IGZ1bmN0aW9uKHN0cmVhbSkge1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBzb2NrID0gc3RyZWFtLm5vZGUuc29jaztcbiAgICAgICAgICAgICAgICAgICAgc29jay5zb2NrX29wcy5jbG9zZShzb2NrKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAgbmV4dG5hbWU6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgIGlmICghU09DS0ZTLm5leHRuYW1lLmN1cnJlbnQpIHtcbiAgICAgICAgICAgICAgICAgICAgU09DS0ZTLm5leHRuYW1lLmN1cnJlbnQgPSAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gJ3NvY2tldFsnICsgU09DS0ZTLm5leHRuYW1lLmN1cnJlbnQrKyArICddJztcbiAgICAgICAgICAgIH0sXG4gICAgICAgICAgICB3ZWJzb2NrZXRfc29ja19vcHM6IHtcbiAgICAgICAgICAgICAgICBjcmVhdGVQZWVyOiBmdW5jdGlvbihzb2NrLCBhZGRyLCBwb3J0KSB7XG4gICAgICAgICAgICAgICAgICAgIGxldCB3cztcbiAgICAgICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBhZGRyID09PSAnb2JqZWN0Jykge1xuICAgICAgICAgICAgICAgICAgICAgICAgd3MgPSBhZGRyO1xuICAgICAgICAgICAgICAgICAgICAgICAgYWRkciA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgICAgICBwb3J0ID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAod3MpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGZvciBzb2NrZXRzIHRoYXQndmUgYWxyZWFkeSBjb25uZWN0ZWQgKGUuZy4gd2UncmUgdGhlIHNlcnZlcikgd2UgY2FuIGluc3BlY3QgdGhlIF9zb2NrZXQgcHJvcGVydHkgZm9yIHRoZSBhZGRyZXNzXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAod3MuX3NvY2tldCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFkZHIgPSB3cy5fc29ja2V0LnJlbW90ZUFkZHJlc3M7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9ydCA9IHdzLl9zb2NrZXQucmVtb3RlUG9ydDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlmIHdlJ3JlIGp1c3Qgbm93IGluaXRpYWxpemluZyBhIGNvbm5lY3Rpb24gdG8gdGhlIHJlbW90ZSwgaW5zcGVjdCB0aGUgdXJsIHByb3BlcnR5XG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCByZXN1bHQgPSAvd3Nbc10/OlxcL1xcLyhbXjpdKyk6KFxcZCspLy5leGVjKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3cy51cmxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghcmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdXZWJTb2NrZXQgVVJMIG11c3QgYmUgaW4gdGhlIGZvcm1hdCB3cyhzKTovL2FkZHJlc3M6cG9ydCdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkciA9IHJlc3VsdFsxXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwb3J0ID0gcGFyc2VJbnQocmVzdWx0WzJdLCAxMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBjcmVhdGUgdGhlIGFjdHVhbCB3ZWJzb2NrZXQgb2JqZWN0IGFuZCBjb25uZWN0XG4gICAgICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciB1cmwgPSAnd3M6Ly8nICsgYWRkciArICc6JyArIHBvcnQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGhlIG5vZGUgd3MgbGlicmFyeSBBUEkgaXMgc2xpZ2h0bHkgZGlmZmVyZW50IHRoYW4gdGhlIGJyb3dzZXInc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG9wdHMgPSBbJ2JpbmFyeSddO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdzID0gbmV3IFdlYlNvY2tldCh1cmwsIG9wdHMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdzLmJpbmFyeVR5cGUgPSAnYXJyYXlidWZmZXInO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVIT1NUVU5SRUFDSCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGVlciA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZHI6IGFkZHIsXG4gICAgICAgICAgICAgICAgICAgICAgICBwb3J0OiBwb3J0LFxuICAgICAgICAgICAgICAgICAgICAgICAgc29ja2V0OiB3cyxcbiAgICAgICAgICAgICAgICAgICAgICAgIGRncmFtX3NlbmRfcXVldWU6IFtdXG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIFNPQ0tGUy53ZWJzb2NrZXRfc29ja19vcHMuYWRkUGVlcihzb2NrLCBwZWVyKTtcbiAgICAgICAgICAgICAgICAgICAgU09DS0ZTLndlYnNvY2tldF9zb2NrX29wcy5oYW5kbGVQZWVyRXZlbnRzKHNvY2ssIHBlZXIpO1xuICAgICAgICAgICAgICAgICAgICAvLyBpZiB0aGlzIGlzIGEgYm91bmQgZGdyYW0gc29ja2V0LCBzZW5kIHRoZSBwb3J0IG51bWJlciBmaXJzdCB0byBhbGxvd1xuICAgICAgICAgICAgICAgICAgICAvLyB1cyB0byBvdmVycmlkZSB0aGUgZXBoZW1lcmFsIHBvcnQgcmVwb3J0ZWQgdG8gdXMgYnkgcmVtb3RlUG9ydCBvbiB0aGVcbiAgICAgICAgICAgICAgICAgICAgLy8gcmVtb3RlIGVuZC5cbiAgICAgICAgICAgICAgICAgICAgaWYgKHNvY2sudHlwZSA9PT0gMiAmJiB0eXBlb2Ygc29jay5zcG9ydCAhPT0gJ3VuZGVmaW5lZCcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBlZXIuZGdyYW1fc2VuZF9xdWV1ZS5wdXNoKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5ldyBVaW50OEFycmF5KFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjU1LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNTUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI1NSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjU1LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAncCcuY2hhckNvZGVBdCgwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ28nLmNoYXJDb2RlQXQoMCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdyJy5jaGFyQ29kZUF0KDApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAndCcuY2hhckNvZGVBdCgwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHNvY2suc3BvcnQgJiAweGZmMDApID4+IDgsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvY2suc3BvcnQgJiAweGZmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSlcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHBlZXI7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBnZXRQZWVyOiBmdW5jdGlvbihzb2NrLCBhZGRyLCBwb3J0KSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBzb2NrLnBlZXJzW2FkZHIgKyAnOicgKyBwb3J0XTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGFkZFBlZXI6IGZ1bmN0aW9uKHNvY2ssIHBlZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgc29jay5wZWVyc1twZWVyLmFkZHIgKyAnOicgKyBwZWVyLnBvcnRdID0gcGVlcjtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHJlbW92ZVBlZXI6IGZ1bmN0aW9uKHNvY2ssIHBlZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgZGVsZXRlIHNvY2sucGVlcnNbcGVlci5hZGRyICsgJzonICsgcGVlci5wb3J0XTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGhhbmRsZVBlZXJFdmVudHM6IGZ1bmN0aW9uKHNvY2ssIHBlZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgbGV0IGZpcnN0ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgaGFuZGxlT3BlbiA9IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcXVldWVkID0gcGVlci5kZ3JhbV9zZW5kX3F1ZXVlLnNoaWZ0KCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKHF1ZXVlZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwZWVyLnNvY2tldC5zZW5kKHF1ZXVlZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1ZXVlZCA9IHBlZXIuZGdyYW1fc2VuZF9xdWV1ZS5zaGlmdCgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBub3QgbXVjaCB3ZSBjYW4gZG8gaGVyZSBpbiB0aGUgd2F5IG9mIHByb3BlciBlcnJvciBoYW5kbGluZyBhcyB3ZSd2ZSBhbHJlYWR5XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gbGllZCBhbmQgc2FpZCB0aGlzIGRhdGEgd2FzIHNlbnQuIHNodXQgaXQgZG93bi5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwZWVyLnNvY2tldC5jbG9zZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBoYW5kbGVNZXNzYWdlID0gZnVuY3Rpb24oZGF0YSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYXNzZXJ0KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVvZiBkYXRhICE9PSAnc3RyaW5nJyAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhLmJ5dGVMZW5ndGggIT09IHVuZGVmaW5lZFxuICAgICAgICAgICAgICAgICAgICAgICAgKTsgLy8gbXVzdCByZWNlaXZlIGFuIEFycmF5QnVmZmVyXG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhID0gbmV3IFVpbnQ4QXJyYXkoZGF0YSk7IC8vIG1ha2UgYSB0eXBlZCBhcnJheSB2aWV3IG9uIHRoZSBhcnJheSBidWZmZXJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlmIHRoaXMgaXMgdGhlIHBvcnQgbWVzc2FnZSwgb3ZlcnJpZGUgdGhlIHBlZXIncyBwb3J0IHdpdGggaXRcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHdhc2ZpcnN0ID0gZmlyc3Q7XG4gICAgICAgICAgICAgICAgICAgICAgICBmaXJzdCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdhc2ZpcnN0ICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YS5sZW5ndGggPT09IDEwICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVswXSA9PT0gMjU1ICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVsxXSA9PT0gMjU1ICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVsyXSA9PT0gMjU1ICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVszXSA9PT0gMjU1ICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVs0XSA9PT0gJ3AnLmNoYXJDb2RlQXQoMCkgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYXRhWzVdID09PSAnbycuY2hhckNvZGVBdCgwKSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGFbNl0gPT09ICdyJy5jaGFyQ29kZUF0KDApICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGF0YVs3XSA9PT0gJ3QnLmNoYXJDb2RlQXQoMClcbiAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHVwZGF0ZSB0aGUgcGVlcidzIHBvcnQgYW5kIGl0J3Mga2V5IGluIHRoZSBwZWVyIG1hcFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IG5ld3BvcnQgPSAoZGF0YVs4XSA8PCA4KSB8IGRhdGFbOV07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgU09DS0ZTLndlYnNvY2tldF9zb2NrX29wcy5yZW1vdmVQZWVyKHNvY2ssIHBlZXIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBlZXIucG9ydCA9IG5ld3BvcnQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgU09DS0ZTLndlYnNvY2tldF9zb2NrX29wcy5hZGRQZWVyKHNvY2ssIHBlZXIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHNvY2sucmVjdl9xdWV1ZS5wdXNoKHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRyOiBwZWVyLmFkZHIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9ydDogcGVlci5wb3J0LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRhdGE6IGRhdGFcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICB9O1xuICAgICAgICAgICAgICAgICAgICBwZWVyLnNvY2tldC5vbm9wZW4gPSBoYW5kbGVPcGVuO1xuICAgICAgICAgICAgICAgICAgICBwZWVyLnNvY2tldC5vbm1lc3NhZ2UgPSBmdW5jdGlvbihldmVudCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaGFuZGxlTWVzc2FnZShldmVudC5kYXRhKTtcbiAgICAgICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIHBvbGw6IGZ1bmN0aW9uKHNvY2spIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNvY2sudHlwZSA9PT0gMSAmJiBzb2NrLnNlcnZlcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gbGlzdGVuIHNvY2tldHMgc2hvdWxkIG9ubHkgc2F5IHRoZXkncmUgYXZhaWxhYmxlIGZvciByZWFkaW5nXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBpZiB0aGVyZSBhcmUgcGVuZGluZyBjbGllbnRzLlxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHNvY2sucGVuZGluZy5sZW5ndGggPyA2NCB8IDEgOiAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGxldCBtYXNrID0gMDtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgZGVzdCA9XG4gICAgICAgICAgICAgICAgICAgICAgICBzb2NrLnR5cGUgPT09IDEgLy8gd2Ugb25seSBjYXJlIGFib3V0IHRoZSBzb2NrZXQgc3RhdGUgZm9yIGNvbm5lY3Rpb24tYmFzZWQgc29ja2V0c1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gU09DS0ZTLndlYnNvY2tldF9zb2NrX29wcy5nZXRQZWVyKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvY2ssXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc29jay5kYWRkcixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb2NrLmRwb3J0XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOiBudWxsO1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICBzb2NrLnJlY3ZfcXVldWUubGVuZ3RoIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAhZGVzdCB8fCAvLyBjb25uZWN0aW9uLWxlc3Mgc29ja2V0cyBhcmUgYWx3YXlzIHJlYWR5IHRvIHJlYWRcbiAgICAgICAgICAgICAgICAgICAgICAgIChkZXN0ICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzdC5zb2NrZXQucmVhZHlTdGF0ZSA9PT0gZGVzdC5zb2NrZXQuQ0xPU0lORykgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgIChkZXN0ICYmIGRlc3Quc29ja2V0LnJlYWR5U3RhdGUgPT09IGRlc3Quc29ja2V0LkNMT1NFRClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBsZXQgcmVjdiByZXR1cm4gMCBvbmNlIGNsb3NlZFxuICAgICAgICAgICAgICAgICAgICAgICAgbWFzayB8PSA2NCB8IDE7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgIWRlc3QgfHwgLy8gY29ubmVjdGlvbi1sZXNzIHNvY2tldHMgYXJlIGFsd2F5cyByZWFkeSB0byB3cml0ZVxuICAgICAgICAgICAgICAgICAgICAgICAgKGRlc3QgJiYgZGVzdC5zb2NrZXQucmVhZHlTdGF0ZSA9PT0gZGVzdC5zb2NrZXQuT1BFTilcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtYXNrIHw9IDQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgKGRlc3QgJiZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXN0LnNvY2tldC5yZWFkeVN0YXRlID09PSBkZXN0LnNvY2tldC5DTE9TSU5HKSB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgKGRlc3QgJiYgZGVzdC5zb2NrZXQucmVhZHlTdGF0ZSA9PT0gZGVzdC5zb2NrZXQuQ0xPU0VEKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG1hc2sgfD0gMTY7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1hc2s7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBpb2N0bDogZnVuY3Rpb24oc29jaywgcmVxdWVzdCwgYXJnKSB7XG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAocmVxdWVzdCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAyMTUzMTpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgYnl0ZXMgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzb2NrLnJlY3ZfcXVldWUubGVuZ3RoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJ5dGVzID0gc29jay5yZWN2X3F1ZXVlWzBdLmRhdGEubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBIRUFQMzJbYXJnID4+IDJdID0gYnl0ZXM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBFUlJOT19DT0RFUy5FSU5WQUw7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGNsb3NlOiBmdW5jdGlvbihzb2NrKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIGlmIHdlJ3ZlIHNwYXduZWQgYSBsaXN0ZW4gc2VydmVyLCBjbG9zZSBpdFxuICAgICAgICAgICAgICAgICAgICBpZiAoc29jay5zZXJ2ZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc29jay5zZXJ2ZXIuY2xvc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHt9XG4gICAgICAgICAgICAgICAgICAgICAgICBzb2NrLnNlcnZlciA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgLy8gY2xvc2UgYW55IHBlZXIgY29ubmVjdGlvbnNcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcGVlcnMgPSBPYmplY3Qua2V5cyhzb2NrLnBlZXJzKTtcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCBwZWVycy5sZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcGVlciA9IHNvY2sucGVlcnNbcGVlcnNbaV1dO1xuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwZWVyLnNvY2tldC5jbG9zZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBjYXRjaCAoZSkge31cbiAgICAgICAgICAgICAgICAgICAgICAgIFNPQ0tGUy53ZWJzb2NrZXRfc29ja19vcHMucmVtb3ZlUGVlcihzb2NrLCBwZWVyKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGJpbmQ6IGZ1bmN0aW9uKHNvY2ssIGFkZHIsIHBvcnQpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZW9mIHNvY2suc2FkZHIgIT09ICd1bmRlZmluZWQnIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICB0eXBlb2Ygc29jay5zcG9ydCAhPT0gJ3VuZGVmaW5lZCdcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FSU5WQUwpOyAvLyBhbHJlYWR5IGJvdW5kXG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgc29jay5zYWRkciA9IGFkZHI7XG4gICAgICAgICAgICAgICAgICAgIHNvY2suc3BvcnQgPSBwb3J0IHx8IF9ta3BvcnQoKTtcbiAgICAgICAgICAgICAgICAgICAgLy8gaW4gb3JkZXIgdG8gZW11bGF0ZSBkZ3JhbSBzb2NrZXRzLCB3ZSBuZWVkIHRvIGxhdW5jaCBhIGxpc3RlbiBzZXJ2ZXIgd2hlbiBiaW5kaW5nIG9uIGEgY29ubmVjdGlvbi1sZXNzIHNvY2tldFxuICAgICAgICAgICAgICAgICAgICAvLyBub3RlOiB0aGlzIGlzIG9ubHkgcmVxdWlyZWQgb24gdGhlIHNlcnZlciBzaWRlXG4gICAgICAgICAgICAgICAgICAgIGlmIChzb2NrLnR5cGUgPT09IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNsb3NlIHRoZSBleGlzdGluZyBzZXJ2ZXIgaWYgaXQgZXhpc3RzXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc29jay5zZXJ2ZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb2NrLnNlcnZlci5jbG9zZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvY2suc2VydmVyID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHN3YWxsb3cgZXJyb3Igb3BlcmF0aW9uIG5vdCBzdXBwb3J0ZWQgZXJyb3IgdGhhdCBvY2N1cnMgd2hlbiBiaW5kaW5nIGluIHRoZVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gYnJvd3NlciB3aGVyZSB0aGlzIGlzbid0IHN1cHBvcnRlZFxuICAgICAgICAgICAgICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb2NrLnNvY2tfb3BzLmxpc3Rlbihzb2NrLCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIShlIGluc3RhbmNlb2YgRlMuRXJybm9FcnJvcikpIHRocm93IGU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGUuZXJybm8gIT09IEVSUk5PX0NPREVTLkVPUE5PVFNVUFApIHRocm93IGU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICAgIGNvbm5lY3Q6IGZ1bmN0aW9uKHNvY2ssIGFkZHIsIHBvcnQpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNvY2suc2VydmVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RTLkVPUE5PVFNVUFApO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgIHR5cGVvZiBzb2NrLmRhZGRyICE9PSAndW5kZWZpbmVkJyAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgdHlwZW9mIHNvY2suZHBvcnQgIT09ICd1bmRlZmluZWQnXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZGVzdCA9IFNPQ0tGUy53ZWJzb2NrZXRfc29ja19vcHMuZ2V0UGVlcihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb2NrLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvY2suZGFkZHIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc29jay5kcG9ydFxuICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkZXN0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXN0LnNvY2tldC5yZWFkeVN0YXRlID09PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXN0LnNvY2tldC5DT05ORUNUSU5HXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVBTFJFQURZKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FSVNDT05OKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgLy8gYWRkIHRoZSBzb2NrZXQgdG8gb3VyIHBlZXIgbGlzdCBhbmQgc2V0IG91ciBkZXN0aW5hdGlvbiBhZGRyZXNzIC8gcG9ydCB0byBtYXRjaFxuICAgICAgICAgICAgICAgICAgICBjb25zdCBwZWVyID0gU09DS0ZTLndlYnNvY2tldF9zb2NrX29wcy5jcmVhdGVQZWVyKFxuICAgICAgICAgICAgICAgICAgICAgICAgc29jayxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZHIsXG4gICAgICAgICAgICAgICAgICAgICAgICBwb3J0XG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHNvY2suZGFkZHIgPSBwZWVyLmFkZHI7XG4gICAgICAgICAgICAgICAgICAgIHNvY2suZHBvcnQgPSBwZWVyLnBvcnQ7XG4gICAgICAgICAgICAgICAgICAgIC8vIGFsd2F5cyBcImZhaWxcIiBpbiBub24tYmxvY2tpbmcgbW9kZVxuICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FSU5QUk9HUkVTUyk7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBsaXN0ZW46IGZ1bmN0aW9uKHNvY2spIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHNvY2suc2VydmVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FSU5WQUwpOyAvLyBhbHJlYWR5IGxpc3RlbmluZ1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IFdlYlNvY2tldFNlcnZlciA9IHJlcXVpcmUoJ3dzJykuU2VydmVyO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBob3N0ID0gc29jay5zYWRkcjtcbiAgICAgICAgICAgICAgICAgICAgc29jay5zZXJ2ZXIgPSBuZXcgV2ViU29ja2V0U2VydmVyKHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGhvc3Q6IGhvc3QsXG4gICAgICAgICAgICAgICAgICAgICAgICBwb3J0OiBzb2NrLnNwb3J0XG4gICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICBzb2NrLnNlcnZlci5vbignY29ubmVjdGlvbicsIGZ1bmN0aW9uKHdzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoc29jay50eXBlID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgbmV3c29jayA9IFNPQ0tGUy5jcmVhdGVTb2NrZXQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvY2suZmFtaWx5LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb2NrLnR5cGUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNvY2sucHJvdG9jb2xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNyZWF0ZSBhIHBlZXIgb24gdGhlIG5ldyBzb2NrZXRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBwZWVyID0gU09DS0ZTLndlYnNvY2tldF9zb2NrX29wcy5jcmVhdGVQZWVyKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdzb2NrLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3c1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV3c29jay5kYWRkciA9IHBlZXIuYWRkcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdzb2NrLmRwb3J0ID0gcGVlci5wb3J0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHB1c2ggdG8gcXVldWUgZm9yIGFjY2VwdCB0byBwaWNrIHVwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc29jay5wZW5kaW5nLnB1c2gobmV3c29jayk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNyZWF0ZSBhIHBlZXIgb24gdGhlIGxpc3RlbiBzb2NrZXQgc28gY2FsbGluZyBzZW5kdG8gd2l0aCB0aGUgbGlzdGVuIHNvY2tldCBhbmQgYW4gYWRkcmVzcyB3aWxsIHJlc29sdmUgdG8gdGhlIGNvcnJlY3QgY2xpZW50XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgU09DS0ZTLndlYnNvY2tldF9zb2NrX29wcy5jcmVhdGVQZWVyKHNvY2ssIHdzKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIHNvY2suc2VydmVyLm9uKCdjbG9zZWQnLCBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHNvY2suc2VydmVyID0gbnVsbDtcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgIHNvY2suc2VydmVyLm9uKCdlcnJvcicsIGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gZG9uJ3QgdGhyb3dcbiAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBhY2NlcHQ6IGZ1bmN0aW9uKGxpc3RlbnNvY2spIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFsaXN0ZW5zb2NrLnNlcnZlcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRUlOVkFMKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBuZXdzb2NrID0gbGlzdGVuc29jay5wZW5kaW5nLnNoaWZ0KCk7XG4gICAgICAgICAgICAgICAgICAgIG5ld3NvY2suc3RyZWFtLmZsYWdzID0gbGlzdGVuc29jay5zdHJlYW0uZmxhZ3M7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuZXdzb2NrO1xuICAgICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgICAgZ2V0bmFtZTogZnVuY3Rpb24oc29jaywgcGVlcikge1xuICAgICAgICAgICAgICAgICAgICBsZXQgYWRkciwgcG9ydDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKHBlZXIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb2NrLmRhZGRyID09PSB1bmRlZmluZWQgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb2NrLmRwb3J0ID09PSB1bmRlZmluZWRcbiAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVOT1RDT05OKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZHIgPSBzb2NrLmRhZGRyO1xuICAgICAgICAgICAgICAgICAgICAgICAgcG9ydCA9IHNvY2suZHBvcnQ7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhZGRyID0gc29jay5zYWRkciB8fCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgcG9ydCA9IHNvY2suc3BvcnQgfHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm4geyBhZGRyOiBhZGRyLCBwb3J0OiBwb3J0IH07XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICBzZW5kbXNnOiBmdW5jdGlvbihzb2NrLCBidWZmZXIsIG9mZnNldCwgbGVuZ3RoLCBhZGRyLCBwb3J0KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChzb2NrLnR5cGUgPT09IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGNvbm5lY3Rpb24tbGVzcyBzb2NrZXRzIHdpbGwgaG9ub3IgdGhlIG1lc3NhZ2UgYWRkcmVzcywgYW5kIG90aGVyd2lzZSBmYWxsIGJhY2sgdG8gdGhlIGJvdW5kIGRlc3RpbmF0aW9uIGFkZHJlc3NcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhZGRyID09PSB1bmRlZmluZWQgfHwgcG9ydCA9PT0gdW5kZWZpbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkciA9IHNvY2suZGFkZHI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcG9ydCA9IHNvY2suZHBvcnQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBpZiB0aGVyZSB3YXMgbm8gYWRkcmVzcyB0byBmYWxsIGJhY2sgdG8sIGVycm9yIG91dFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFkZHIgPT09IHVuZGVmaW5lZCB8fCBwb3J0ID09PSB1bmRlZmluZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FREVTVEFERFJSRVEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gY29ubmVjdGlvbi1iYXNlZCBzb2NrZXRzIHdpbGwgb25seSB1c2UgdGhlIGJvdW5kXG4gICAgICAgICAgICAgICAgICAgICAgICBhZGRyID0gc29jay5kYWRkcjtcbiAgICAgICAgICAgICAgICAgICAgICAgIHBvcnQgPSBzb2NrLmRwb3J0O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIC8vIGZpbmQgdGhlIHBlZXIgZm9yIHRoZSBkZXN0aW5hdGlvbiBhZGRyZXNzXG4gICAgICAgICAgICAgICAgICAgIGxldCBkZXN0ID0gU09DS0ZTLndlYnNvY2tldF9zb2NrX29wcy5nZXRQZWVyKFxuICAgICAgICAgICAgICAgICAgICAgICAgc29jayxcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkZHIsXG4gICAgICAgICAgICAgICAgICAgICAgICBwb3J0XG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIC8vIGVhcmx5IG91dCBpZiBub3QgY29ubmVjdGVkIHdpdGggYSBjb25uZWN0aW9uLWJhc2VkIHNvY2tldFxuICAgICAgICAgICAgICAgICAgICBpZiAoc29jay50eXBlID09PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIWRlc3QgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXN0LnNvY2tldC5yZWFkeVN0YXRlID09PSBkZXN0LnNvY2tldC5DTE9TSU5HIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzdC5zb2NrZXQucmVhZHlTdGF0ZSA9PT0gZGVzdC5zb2NrZXQuQ0xPU0VEXG4gICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FTk9UQ09OTik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc3Quc29ja2V0LnJlYWR5U3RhdGUgPT09IGRlc3Quc29ja2V0LkNPTk5FQ1RJTkdcbiAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVBR0FJTik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgLy8gY3JlYXRlIGEgY29weSBvZiB0aGUgaW5jb21pbmcgZGF0YSB0byBzZW5kLCBhcyB0aGUgV2ViU29ja2V0IEFQSSBkb2Vzbid0IHdvcmsgZW50aXJlbHkgd2l0aCBhbiBBcnJheUJ1ZmZlclZpZXcsIGl0J2xsIGp1c3Qgc2VuZCB0aGUgZW50aXJlIHVuZGVybHlpbmcgYnVmZmVyXG4gICAgICAgICAgICAgICAgICAgIGxldCBkYXRhO1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICBidWZmZXIgaW5zdGFuY2VvZiBBcnJheSB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgYnVmZmVyIGluc3RhbmNlb2YgQXJyYXlCdWZmZXJcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkYXRhID0gYnVmZmVyLnNsaWNlKG9mZnNldCwgb2Zmc2V0ICsgbGVuZ3RoKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFycmF5QnVmZmVyVmlld1xuICAgICAgICAgICAgICAgICAgICAgICAgZGF0YSA9IGJ1ZmZlci5idWZmZXIuc2xpY2UoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVmZmVyLmJ5dGVPZmZzZXQgKyBvZmZzZXQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVmZmVyLmJ5dGVPZmZzZXQgKyBvZmZzZXQgKyBsZW5ndGhcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgLy8gaWYgd2UncmUgZW11bGF0aW5nIGEgY29ubmVjdGlvbi1sZXNzIGRncmFtIHNvY2tldCBhbmQgZG9uJ3QgaGF2ZSBhIGNhY2hlZCBjb25uZWN0aW9uLCBxdWV1ZSB0aGUgYnVmZmVyIHRvIHNlbmQgdXBvbiBjb25uZWN0IGFuZCBsaWUsIHNheWluZyB0aGUgZGF0YSB3YXMgc2VudCBub3cuXG4gICAgICAgICAgICAgICAgICAgIGlmIChzb2NrLnR5cGUgPT09IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAhZGVzdCB8fFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc3Quc29ja2V0LnJlYWR5U3RhdGUgIT09IGRlc3Quc29ja2V0Lk9QRU5cbiAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIGlmIHdlJ3JlIG5vdCBjb25uZWN0ZWQsIG9wZW4gYSBuZXcgY29ubmVjdGlvblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIWRlc3QgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzdC5zb2NrZXQucmVhZHlTdGF0ZSA9PT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc3Quc29ja2V0LkNMT1NJTkcgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzdC5zb2NrZXQucmVhZHlTdGF0ZSA9PT0gZGVzdC5zb2NrZXQuQ0xPU0VEXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc3QgPSBTT0NLRlMud2Vic29ja2V0X3NvY2tfb3BzLmNyZWF0ZVBlZXIoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb2NrLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWRkcixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBvcnRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVzdC5kZ3JhbV9zZW5kX3F1ZXVlLnB1c2goZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGxlbmd0aDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gc2VuZCB0aGUgYWN0dWFsIGRhdGFcbiAgICAgICAgICAgICAgICAgICAgICAgIGRlc3Quc29ja2V0LnNlbmQoZGF0YSk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB0aHJvdyBuZXcgRlMuRXJybm9FcnJvcihFUlJOT19DT0RFUy5FSU5WQUwpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgICByZWN2bXNnOiBmdW5jdGlvbihzb2NrLCBsZW5ndGgpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gaHR0cDovL3B1YnMub3Blbmdyb3VwLm9yZy9vbmxpbmVwdWJzLzc5MDg3OTkveG5zL3JlY3Ztc2cuaHRtbFxuICAgICAgICAgICAgICAgICAgICBpZiAoc29jay50eXBlID09PSAxICYmIHNvY2suc2VydmVyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyB0Y3Agc2VydmVycyBzaG91bGQgbm90IGJlIHJlY3YoKSdpbmcgb24gdGhlIGxpc3RlbiBzb2NrZXRcbiAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVOT1RDT05OKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjb25zdCBxdWV1ZWQgPSBzb2NrLnJlY3ZfcXVldWUuc2hpZnQoKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCFxdWV1ZWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzb2NrLnR5cGUgPT09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBkZXN0ID0gU09DS0ZTLndlYnNvY2tldF9zb2NrX29wcy5nZXRQZWVyKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb2NrLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb2NrLmRhZGRyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzb2NrLmRwb3J0XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIWRlc3QpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaWYgd2UgaGF2ZSBhIGRlc3RpbmF0aW9uIGFkZHJlc3MgYnV0IGFyZSBub3QgY29ubmVjdGVkLCBlcnJvciBvdXRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRU5PVENPTk4pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc3Quc29ja2V0LnJlYWR5U3RhdGUgPT09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZXN0LnNvY2tldC5DTE9TSU5HIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlc3Quc29ja2V0LnJlYWR5U3RhdGUgPT09IGRlc3Quc29ja2V0LkNMT1NFRFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyByZXR1cm4gbnVsbCBpZiB0aGUgc29ja2V0IGhhcyBjbG9zZWRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG51bGw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gZWxzZSwgb3VyIHNvY2tldCBpcyBpbiBhIHZhbGlkIHN0YXRlIGJ1dCB0cnVseSBoYXMgbm90aGluZyBhdmFpbGFibGVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdGhyb3cgbmV3IEZTLkVycm5vRXJyb3IoRVJSTk9fQ09ERVMuRUFHQUlOKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHRocm93IG5ldyBGUy5FcnJub0Vycm9yKEVSUk5PX0NPREVTLkVBR0FJTik7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgLy8gcXVldWVkLmRhdGEgd2lsbCBiZSBhbiBBcnJheUJ1ZmZlciBpZiBpdCdzIHVuYWR1bHRlcmF0ZWQsIGJ1dCBpZiBpdCdzIHJlcXVldWVkIFRDUCBkYXRhIGl0J2xsIGJlIGFuIEFycmF5QnVmZmVyVmlld1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBxdWV1ZWRMZW5ndGggPVxuICAgICAgICAgICAgICAgICAgICAgICAgcXVldWVkLmRhdGEuYnl0ZUxlbmd0aCB8fCBxdWV1ZWQuZGF0YS5sZW5ndGg7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHF1ZXVlZE9mZnNldCA9IHF1ZXVlZC5kYXRhLmJ5dGVPZmZzZXQgfHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY29uc3QgcXVldWVkQnVmZmVyID0gcXVldWVkLmRhdGEuYnVmZmVyIHx8IHF1ZXVlZC5kYXRhO1xuICAgICAgICAgICAgICAgICAgICBjb25zdCBieXRlc1JlYWQgPSBNYXRoLm1pbihsZW5ndGgsIHF1ZXVlZExlbmd0aCk7XG4gICAgICAgICAgICAgICAgICAgIGNvbnN0IHJlcyA9IHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJ1ZmZlcjogbmV3IFVpbnQ4QXJyYXkoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVldWVkQnVmZmVyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1ZXVlZE9mZnNldCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBieXRlc1JlYWRcbiAgICAgICAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgICAgICAgICBhZGRyOiBxdWV1ZWQuYWRkcixcbiAgICAgICAgICAgICAgICAgICAgICAgIHBvcnQ6IHF1ZXVlZC5wb3J0XG4gICAgICAgICAgICAgICAgICAgIH07XG4gICAgICAgICAgICAgICAgICAgIC8vIHB1c2ggYmFjayBhbnkgdW5yZWFkIGRhdGEgZm9yIFRDUCBjb25uZWN0aW9uc1xuICAgICAgICAgICAgICAgICAgICBpZiAoc29jay50eXBlID09PSAxICYmIGJ5dGVzUmVhZCA8IHF1ZXVlZExlbmd0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgYnl0ZXNSZW1haW5pbmcgPSBxdWV1ZWRMZW5ndGggLSBieXRlc1JlYWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBxdWV1ZWQuZGF0YSA9IG5ldyBVaW50OEFycmF5KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHF1ZXVlZEJ1ZmZlcixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBxdWV1ZWRPZmZzZXQgKyBieXRlc1JlYWQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnl0ZXNSZW1haW5pbmdcbiAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICBzb2NrLnJlY3ZfcXVldWUudW5zaGlmdChxdWV1ZWQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiByZXM7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuICAgICAgICBmdW5jdGlvbiBfc2VuZChmZCwgYnVmLCBsZW4pIHtcbiAgICAgICAgICAgIGNvbnN0IHNvY2sgPSBTT0NLRlMuZ2V0U29ja2V0KGZkKTtcbiAgICAgICAgICAgIGlmICghc29jaykge1xuICAgICAgICAgICAgICAgIF9fX3NldEVyck5vKEVSUk5PX0NPREVTLkVCQURGKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gX3dyaXRlKGZkLCBidWYsIGxlbik7XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gX3B3cml0ZShmaWxkZXMsIGJ1ZiwgbmJ5dGUsIG9mZnNldCkge1xuICAgICAgICAgICAgLy8gc3NpemVfdCBwd3JpdGUoaW50IGZpbGRlcywgY29uc3Qgdm9pZCAqYnVmLCBzaXplX3QgbmJ5dGUsIG9mZl90IG9mZnNldCk7XG4gICAgICAgICAgICAvLyBodHRwOi8vcHVicy5vcGVuZ3JvdXAub3JnL29ubGluZXB1YnMvMDAwMDk1Mzk5L2Z1bmN0aW9ucy93cml0ZS5odG1sXG4gICAgICAgICAgICBjb25zdCBzdHJlYW0gPSBGUy5nZXRTdHJlYW0oZmlsZGVzKTtcbiAgICAgICAgICAgIGlmICghc3RyZWFtKSB7XG4gICAgICAgICAgICAgICAgX19fc2V0RXJyTm8oRVJSTk9fQ09ERVMuRUJBREYpO1xuICAgICAgICAgICAgICAgIHJldHVybiAtMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgY29uc3Qgc2xhYiA9IEhFQVA4O1xuICAgICAgICAgICAgICAgIHJldHVybiBGUy53cml0ZShzdHJlYW0sIHNsYWIsIGJ1ZiwgbmJ5dGUsIG9mZnNldCk7XG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgRlMuaGFuZGxlRlNFcnJvcihlKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gX3dyaXRlKGZpbGRlcywgYnVmLCBuYnl0ZSkge1xuICAgICAgICAgICAgLy8gc3NpemVfdCB3cml0ZShpbnQgZmlsZGVzLCBjb25zdCB2b2lkICpidWYsIHNpemVfdCBuYnl0ZSk7XG4gICAgICAgICAgICAvLyBodHRwOi8vcHVicy5vcGVuZ3JvdXAub3JnL29ubGluZXB1YnMvMDAwMDk1Mzk5L2Z1bmN0aW9ucy93cml0ZS5odG1sXG4gICAgICAgICAgICBjb25zdCBzdHJlYW0gPSBGUy5nZXRTdHJlYW0oZmlsZGVzKTtcbiAgICAgICAgICAgIGlmICghc3RyZWFtKSB7XG4gICAgICAgICAgICAgICAgX19fc2V0RXJyTm8oRVJSTk9fQ09ERVMuRUJBREYpO1xuICAgICAgICAgICAgICAgIHJldHVybiAtMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgY29uc3Qgc2xhYiA9IEhFQVA4O1xuICAgICAgICAgICAgICAgIHJldHVybiBGUy53cml0ZShzdHJlYW0sIHNsYWIsIGJ1ZiwgbmJ5dGUpO1xuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIEZTLmhhbmRsZUZTRXJyb3IoZSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIC0xO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIF9md3JpdGUocHRyLCBzaXplLCBuaXRlbXMsIHN0cmVhbSkge1xuICAgICAgICAgICAgLy8gc2l6ZV90IGZ3cml0ZShjb25zdCB2b2lkICpyZXN0cmljdCBwdHIsIHNpemVfdCBzaXplLCBzaXplX3Qgbml0ZW1zLCBGSUxFICpyZXN0cmljdCBzdHJlYW0pO1xuICAgICAgICAgICAgLy8gaHR0cDovL3B1YnMub3Blbmdyb3VwLm9yZy9vbmxpbmVwdWJzLzAwMDA5NTM5OS9mdW5jdGlvbnMvZndyaXRlLmh0bWxcbiAgICAgICAgICAgIGNvbnN0IGJ5dGVzVG9Xcml0ZSA9IG5pdGVtcyAqIHNpemU7XG4gICAgICAgICAgICBpZiAoYnl0ZXNUb1dyaXRlID09IDApIHJldHVybiAwO1xuICAgICAgICAgICAgY29uc3QgYnl0ZXNXcml0dGVuID0gX3dyaXRlKHN0cmVhbSwgcHRyLCBieXRlc1RvV3JpdGUpO1xuICAgICAgICAgICAgaWYgKGJ5dGVzV3JpdHRlbiA9PSAtMSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHN0cmVhbU9iaiA9IEZTLmdldFN0cmVhbShzdHJlYW0pO1xuICAgICAgICAgICAgICAgIGlmIChzdHJlYW1PYmopIHN0cmVhbU9iai5lcnJvciA9IHRydWU7XG4gICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIHJldHVybiBNYXRoLmZsb29yKGJ5dGVzV3JpdHRlbiAvIHNpemUpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIF9fcmVhbGx5TmVnYXRpdmUoeCkge1xuICAgICAgICAgICAgcmV0dXJuIHggPCAwIHx8ICh4ID09PSAwICYmIDEgLyB4ID09PSAtSW5maW5pdHkpO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIF9fZm9ybWF0U3RyaW5nKGZvcm1hdCwgdmFyYXJncykge1xuICAgICAgICAgICAgbGV0IHRleHRJbmRleCA9IGZvcm1hdDtcbiAgICAgICAgICAgIGxldCBhcmdJbmRleCA9IDA7XG4gICAgICAgICAgICBmdW5jdGlvbiBnZXROZXh0QXJnKHR5cGUpIHtcbiAgICAgICAgICAgICAgICAvLyBOT1RFOiBFeHBsaWNpdGx5IGlnbm9yaW5nIHR5cGUgc2FmZXR5LiBPdGhlcndpc2UgdGhpcyBmYWlsczpcbiAgICAgICAgICAgICAgICAvLyAgICAgICBpbnQgeCA9IDQ7IHByaW50ZihcIiVjXFxuXCIsIChjaGFyKXgpO1xuICAgICAgICAgICAgICAgIGxldCByZXQ7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGUgPT09ICdkb3VibGUnKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldCA9IEhFQVBGNjRbKHZhcmFyZ3MgKyBhcmdJbmRleCkgPj4gM107XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICh0eXBlID09ICdpNjQnKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldCA9IFtcbiAgICAgICAgICAgICAgICAgICAgICAgIEhFQVAzMlsodmFyYXJncyArIGFyZ0luZGV4KSA+PiAyXSxcbiAgICAgICAgICAgICAgICAgICAgICAgIEhFQVAzMlsodmFyYXJncyArIChhcmdJbmRleCArIDgpKSA+PiAyXVxuICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgICAgICBhcmdJbmRleCArPSA4OyAvLyBlYWNoIDMyLWJpdCBjaHVuayBpcyBpbiBhIDY0LWJpdCBibG9ja1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHR5cGUgPSAnaTMyJzsgLy8gdmFyYXJncyBhcmUgYWx3YXlzIGkzMiwgaTY0LCBvciBkb3VibGVcbiAgICAgICAgICAgICAgICAgICAgcmV0ID0gSEVBUDMyWyh2YXJhcmdzICsgYXJnSW5kZXgpID4+IDJdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBhcmdJbmRleCArPSBNYXRoLm1heChcbiAgICAgICAgICAgICAgICAgICAgUnVudGltZS5nZXROYXRpdmVGaWVsZFNpemUodHlwZSksXG4gICAgICAgICAgICAgICAgICAgIFJ1bnRpbWUuZ2V0QWxpZ25TaXplKHR5cGUsIG51bGwsIHRydWUpXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdmFyIHJldCA9IFtdO1xuICAgICAgICAgICAgdmFyIGN1cnIsIG5leHQsIGN1cnJBcmc7XG4gICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHN0YXJ0VGV4dEluZGV4ID0gdGV4dEluZGV4O1xuICAgICAgICAgICAgICAgIGN1cnIgPSBIRUFQOFt0ZXh0SW5kZXhdO1xuICAgICAgICAgICAgICAgIGlmIChjdXJyID09PSAwKSBicmVhaztcbiAgICAgICAgICAgICAgICBuZXh0ID0gSEVBUDhbKHRleHRJbmRleCArIDEpIHwgMF07XG4gICAgICAgICAgICAgICAgaWYgKGN1cnIgPT0gMzcpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gSGFuZGxlIGZsYWdzLlxuICAgICAgICAgICAgICAgICAgICBsZXQgZmxhZ0Fsd2F5c1NpZ25lZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICBsZXQgZmxhZ0xlZnRBbGlnbiA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICBsZXQgZmxhZ0FsdGVybmF0aXZlID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgIGxldCBmbGFnWmVyb1BhZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICBsZXQgZmxhZ1BhZFNpZ24gPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgZmxhZ3NMb29wOiB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChuZXh0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSA0MzpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ0Fsd2F5c1NpZ25lZCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgNDU6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdMZWZ0QWxpZ24gPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDM1OlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGFnQWx0ZXJuYXRpdmUgPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDQ4OlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZmxhZ1plcm9QYWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIGZsYWdzTG9vcDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdaZXJvUGFkID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAzMjpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ1BhZFNpZ24gPSB0cnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBmbGFnc0xvb3A7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB0ZXh0SW5kZXgrKztcbiAgICAgICAgICAgICAgICAgICAgICAgIG5leHQgPSBIRUFQOFsodGV4dEluZGV4ICsgMSkgfCAwXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAvLyBIYW5kbGUgd2lkdGguXG4gICAgICAgICAgICAgICAgICAgIGxldCB3aWR0aCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIGlmIChuZXh0ID09IDQyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aWR0aCA9IGdldE5leHRBcmcoJ2kzMicpO1xuICAgICAgICAgICAgICAgICAgICAgICAgdGV4dEluZGV4Kys7XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXh0ID0gSEVBUDhbKHRleHRJbmRleCArIDEpIHwgMF07XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAobmV4dCA+PSA0OCAmJiBuZXh0IDw9IDU3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2lkdGggPSB3aWR0aCAqIDEwICsgKG5leHQgLSA0OCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdGV4dEluZGV4Kys7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV4dCA9IEhFQVA4Wyh0ZXh0SW5kZXggKyAxKSB8IDBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIC8vIEhhbmRsZSBwcmVjaXNpb24uXG4gICAgICAgICAgICAgICAgICAgIGxldCBwcmVjaXNpb25TZXQgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG5leHQgPT0gNDYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBwcmVjaXNpb24gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgcHJlY2lzaW9uU2V0ID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHRleHRJbmRleCsrO1xuICAgICAgICAgICAgICAgICAgICAgICAgbmV4dCA9IEhFQVA4Wyh0ZXh0SW5kZXggKyAxKSB8IDBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5leHQgPT0gNDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmVjaXNpb24gPSBnZXROZXh0QXJnKCdpMzInKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0SW5kZXgrKztcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcHJlY2lzaW9uQ2hyID0gSEVBUDhbKHRleHRJbmRleCArIDEpIHwgMF07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChwcmVjaXNpb25DaHIgPCA0OCB8fCBwcmVjaXNpb25DaHIgPiA1NylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmVjaXNpb24gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJlY2lzaW9uICogMTAgKyAocHJlY2lzaW9uQ2hyIC0gNDgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0SW5kZXgrKztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBuZXh0ID0gSEVBUDhbKHRleHRJbmRleCArIDEpIHwgMF07XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgcHJlY2lzaW9uID0gNjsgLy8gU3RhbmRhcmQgZGVmYXVsdC5cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAvLyBIYW5kbGUgaW50ZWdlciBzaXplcy4gV0FSTklORzogVGhlc2UgYXNzdW1lIGEgMzItYml0IGFyY2hpdGVjdHVyZSFcbiAgICAgICAgICAgICAgICAgICAgbGV0IGFyZ1NpemU7XG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoU3RyaW5nLmZyb21DaGFyQ29kZShuZXh0KSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnaCc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5leHROZXh0ID0gSEVBUDhbKHRleHRJbmRleCArIDIpIHwgMF07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5leHROZXh0ID09IDEwNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0SW5kZXgrKztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnU2l6ZSA9IDE7IC8vIGNoYXIgKGFjdHVhbGx5IGkzMiBpbiB2YXJhcmdzKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ1NpemUgPSAyOyAvLyBzaG9ydCAoYWN0dWFsbHkgaTMyIGluIHZhcmFyZ3MpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnbCc6XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIG5leHROZXh0ID0gSEVBUDhbKHRleHRJbmRleCArIDIpIHwgMF07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5leHROZXh0ID09IDEwOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ZXh0SW5kZXgrKztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnU2l6ZSA9IDg7IC8vIGxvbmcgbG9uZ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ1NpemUgPSA0OyAvLyBsb25nXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnTCc6IC8vIGxvbmcgbG9uZ1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAncSc6IC8vIGludDY0X3RcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ2onOiAvLyBpbnRtYXhfdFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ1NpemUgPSA4O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAneic6IC8vIHNpemVfdFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAndCc6IC8vIHB0cmRpZmZfdFxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnSSc6IC8vIHNpZ25lZCBwdHJkaWZmX3Qgb3IgdW5zaWduZWQgc2l6ZV90XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnU2l6ZSA9IDQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ1NpemUgPSBudWxsO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmIChhcmdTaXplKSB0ZXh0SW5kZXgrKztcbiAgICAgICAgICAgICAgICAgICAgbmV4dCA9IEhFQVA4Wyh0ZXh0SW5kZXggKyAxKSB8IDBdO1xuICAgICAgICAgICAgICAgICAgICAvLyBIYW5kbGUgdHlwZSBzcGVjaWZpZXIuXG4gICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoU3RyaW5nLmZyb21DaGFyQ29kZShuZXh0KSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnZCc6XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdpJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ3UnOlxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnbyc6XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICd4JzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ1gnOlxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAncCc6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBJbnRlZ2VyLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHNpZ25lZCA9IG5leHQgPT0gMTAwIHx8IG5leHQgPT0gMTA1O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ1NpemUgPSBhcmdTaXplIHx8IDQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGN1cnJBcmcgPSBnZXROZXh0QXJnKCdpJyArIGFyZ1NpemUgKiA4KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBvcmlnQXJnID0gY3VyckFyZztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgYXJnVGV4dDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBGbGF0dGVuIGk2NC0xIFtsb3csIGhpZ2hdIGludG8gYSAoc2xpZ2h0bHkgcm91bmRlZCkgZG91YmxlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFyZ1NpemUgPT0gOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyQXJnID0gUnVudGltZS5tYWtlQmlnSW50KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VyckFyZ1swXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJBcmdbMV0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXh0ID09IDExN1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUcnVuY2F0ZSB0byByZXF1ZXN0ZWQgc2l6ZS5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYXJnU2l6ZSA8PSA0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGxpbWl0ID0gTWF0aC5wb3coMjU2LCBhcmdTaXplKSAtIDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJBcmcgPSAoc2lnbmVkID8gcmVTaWduIDogdW5TaWduKShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJBcmcgJiBsaW1pdCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ1NpemUgKiA4XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEZvcm1hdCB0aGUgbnVtYmVyLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGN1cnJBYnNBcmcgPSBNYXRoLmFicyhjdXJyQXJnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgcHJlZml4ID0gJyc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5leHQgPT0gMTAwIHx8IG5leHQgPT0gMTA1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhcmdTaXplID09IDggJiYgaTY0TWF0aClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ1RleHQgPSBpNjRNYXRoLnN0cmluZ2lmeShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvcmlnQXJnWzBdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9yaWdBcmdbMV0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbnVsbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnVGV4dCA9IHJlU2lnbihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyQXJnLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDggKiBhcmdTaXplLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkudG9TdHJpbmcoMTApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobmV4dCA9PSAxMTcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFyZ1NpemUgPT0gOCAmJiBpNjRNYXRoKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnVGV4dCA9IGk2NE1hdGguc3RyaW5naWZ5KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG9yaWdBcmdbMF0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgb3JpZ0FyZ1sxXSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmdUZXh0ID0gdW5TaWduKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJBcmcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOCAqIGFyZ1NpemUsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKS50b1N0cmluZygxMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJBcmcgPSBNYXRoLmFicyhjdXJyQXJnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKG5leHQgPT0gMTExKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ1RleHQgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGZsYWdBbHRlcm5hdGl2ZSA/ICcwJyA6ICcnKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJyQWJzQXJnLnRvU3RyaW5nKDgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobmV4dCA9PSAxMjAgfHwgbmV4dCA9PSA4OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmVmaXggPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ0FsdGVybmF0aXZlICYmIGN1cnJBcmcgIT0gMCA/ICcweCcgOiAnJztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGFyZ1NpemUgPT0gOCAmJiBpNjRNYXRoKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAob3JpZ0FyZ1sxXSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ1RleHQgPSAob3JpZ0FyZ1sxXSA+Pj4gMCkudG9TdHJpbmcoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgbG93ZXIgPSAob3JpZ0FyZ1swXSA+Pj4gMCkudG9TdHJpbmcoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAobG93ZXIubGVuZ3RoIDwgOClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbG93ZXIgPSAnMCcgKyBsb3dlcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmdUZXh0ICs9IGxvd2VyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmdUZXh0ID0gKG9yaWdBcmdbMF0gPj4+IDApLnRvU3RyaW5nKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY3VyckFyZyA8IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFJlcHJlc2VudCBuZWdhdGl2ZSBudW1iZXJzIGluIGhleCBhcyAyJ3MgY29tcGxlbWVudC5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1cnJBcmcgPSAtY3VyckFyZztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ1RleHQgPSAoY3VyckFic0FyZyAtIDEpLnRvU3RyaW5nKDE2KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGJ1ZmZlciA9IFtdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBhcmdUZXh0Lmxlbmd0aDsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnVmZmVyLnB1c2goXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDB4ZiAtIHBhcnNlSW50KGFyZ1RleHRbaV0sIDE2KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLnRvU3RyaW5nKDE2KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmdUZXh0ID0gYnVmZmVyLmpvaW4oJycpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGFyZ1RleHQubGVuZ3RoIDwgYXJnU2l6ZSAqIDIpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnVGV4dCA9ICdmJyArIGFyZ1RleHQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmdUZXh0ID0gY3VyckFic0FyZy50b1N0cmluZygxNik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5leHQgPT0gODgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZWZpeCA9IHByZWZpeC50b1VwcGVyQ2FzZSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnVGV4dCA9IGFyZ1RleHQudG9VcHBlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobmV4dCA9PSAxMTIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN1cnJBYnNBcmcgPT09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ1RleHQgPSAnKG5pbCknO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJlZml4ID0gJzB4JztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ1RleHQgPSBjdXJyQWJzQXJnLnRvU3RyaW5nKDE2KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocHJlY2lzaW9uU2V0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlIChhcmdUZXh0Lmxlbmd0aCA8IHByZWNpc2lvbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnVGV4dCA9ICcwJyArIGFyZ1RleHQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQWRkIHNpZ24gaWYgbmVlZGVkXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN1cnJBcmcgPj0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZmxhZ0Fsd2F5c1NpZ25lZCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJlZml4ID0gJysnICsgcHJlZml4O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGZsYWdQYWRTaWduKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmVmaXggPSAnICcgKyBwcmVmaXg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTW92ZSBzaWduIHRvIHByZWZpeCBzbyB3ZSB6ZXJvLXBhZCBhZnRlciB0aGUgc2lnblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhcmdUZXh0LmNoYXJBdCgwKSA9PSAnLScpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJlZml4ID0gJy0nICsgcHJlZml4O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmdUZXh0ID0gYXJnVGV4dC5zdWJzdHIoMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFkZCBwYWRkaW5nLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlIChwcmVmaXgubGVuZ3RoICsgYXJnVGV4dC5sZW5ndGggPCB3aWR0aCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZmxhZ0xlZnRBbGlnbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnVGV4dCArPSAnICc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZmxhZ1plcm9QYWQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmdUZXh0ID0gJzAnICsgYXJnVGV4dDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJlZml4ID0gJyAnICsgcHJlZml4O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEluc2VydCB0aGUgcmVzdWx0IGludG8gdGhlIGJ1ZmZlci5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmdUZXh0ID0gcHJlZml4ICsgYXJnVGV4dDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmdUZXh0LnNwbGl0KCcnKS5mb3JFYWNoKGZ1bmN0aW9uKGNocikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXQucHVzaChjaHIuY2hhckNvZGVBdCgwKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdmJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ0YnOlxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnZSc6XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdFJzpcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ2cnOlxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnRyc6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBGbG9hdC5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgY3VyckFyZyA9IGdldE5leHRBcmcoJ2RvdWJsZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHZhciBhcmdUZXh0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpc05hTihjdXJyQXJnKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmdUZXh0ID0gJ25hbic7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdaZXJvUGFkID0gZmFsc2U7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICghaXNGaW5pdGUoY3VyckFyZykpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnVGV4dCA9IChjdXJyQXJnIDwgMCA/ICctJyA6ICcnKSArICdpbmYnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmbGFnWmVyb1BhZCA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBpc0dlbmVyYWwgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGVmZmVjdGl2ZVByZWNpc2lvbiA9IE1hdGgubWluKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJlY2lzaW9uLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ29udmVydCBnL0cgdG8gZi9GIG9yIGUvRSwgYXMgcGVyOlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBodHRwOi8vcHVicy5vcGVuZ3JvdXAub3JnL29ubGluZXB1YnMvOTY5OTkxOTc5OS9mdW5jdGlvbnMvcHJpbnRmLmh0bWxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5leHQgPT0gMTAzIHx8IG5leHQgPT0gNzEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzR2VuZXJhbCA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmVjaXNpb24gPSBwcmVjaXNpb24gfHwgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGV4cG9uZW50ID0gcGFyc2VJbnQoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VyckFyZ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAudG9FeHBvbmVudGlhbChlZmZlY3RpdmVQcmVjaXNpb24pXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC5zcGxpdCgnZScpWzFdLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZWNpc2lvbiA+IGV4cG9uZW50ICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZXhwb25lbnQgPj0gLTRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG5leHQgPSAobmV4dCA9PSAxMDNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyAnZidcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAnRidcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApLmNoYXJDb2RlQXQoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcHJlY2lzaW9uIC09IGV4cG9uZW50ICsgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbmV4dCA9IChuZXh0ID09IDEwM1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA/ICdlJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ICdFJ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkuY2hhckNvZGVBdCgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwcmVjaXNpb24tLTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVmZmVjdGl2ZVByZWNpc2lvbiA9IE1hdGgubWluKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHByZWNpc2lvbixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobmV4dCA9PSAxMDEgfHwgbmV4dCA9PSA2OSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnVGV4dCA9IGN1cnJBcmcudG9FeHBvbmVudGlhbChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlZmZlY3RpdmVQcmVjaXNpb25cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBNYWtlIHN1cmUgdGhlIGV4cG9uZW50IGhhcyBhdCBsZWFzdCAyIGRpZ2l0cy5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgvW2VFXVstK11cXGQkLy50ZXN0KGFyZ1RleHQpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnVGV4dCA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ1RleHQuc2xpY2UoMCwgLTEpICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJzAnICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnVGV4dC5zbGljZSgtMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAobmV4dCA9PSAxMDIgfHwgbmV4dCA9PSA3MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnVGV4dCA9IGN1cnJBcmcudG9GaXhlZChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlZmZlY3RpdmVQcmVjaXNpb25cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VyckFyZyA9PT0gMCAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF9fcmVhbGx5TmVnYXRpdmUoY3VyckFyZylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ1RleHQgPSAnLScgKyBhcmdUZXh0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IHBhcnRzID0gYXJnVGV4dC5zcGxpdCgnZScpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaXNHZW5lcmFsICYmICFmbGFnQWx0ZXJuYXRpdmUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIERpc2NhcmQgdHJhaWxpbmcgemVyb3MgYW5kIHBlcmlvZHMuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFydHNbMF0ubGVuZ3RoID4gMSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnRzWzBdLmluZGV4T2YoJy4nKSAhPSAtMSAmJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChwYXJ0c1swXS5zbGljZSgtMSkgPT0gJzAnIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHBhcnRzWzBdLnNsaWNlKC0xKSA9PSAnLicpXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJ0c1swXSA9IHBhcnRzWzBdLnNsaWNlKDAsIC0xKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIE1ha2Ugc3VyZSB3ZSBoYXZlIGEgcGVyaW9kIGluIGFsdGVybmF0aXZlIG1vZGUuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmxhZ0FsdGVybmF0aXZlICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnVGV4dC5pbmRleE9mKCcuJykgPT0gLTFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwYXJ0c1swXSArPSAnLic7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBaZXJvIHBhZCB1bnRpbCByZXF1aXJlZCBwcmVjaXNpb24uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAocHJlY2lzaW9uID4gZWZmZWN0aXZlUHJlY2lzaW9uKyspXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFydHNbMF0gKz0gJzAnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ1RleHQgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcGFydHNbMF0gK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHBhcnRzLmxlbmd0aCA+IDEgPyAnZScgKyBwYXJ0c1sxXSA6ICcnKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ2FwaXRhbGl6ZSAnRScgaWYgbmVlZGVkLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobmV4dCA9PSA2OSkgYXJnVGV4dCA9IGFyZ1RleHQudG9VcHBlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQWRkIHNpZ24uXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjdXJyQXJnID49IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmbGFnQWx3YXlzU2lnbmVkKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnVGV4dCA9ICcrJyArIGFyZ1RleHQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGZsYWdQYWRTaWduKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnVGV4dCA9ICcgJyArIGFyZ1RleHQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQWRkIHBhZGRpbmcuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKGFyZ1RleHQubGVuZ3RoIDwgd2lkdGgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGZsYWdMZWZ0QWxpZ24pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ1RleHQgKz0gJyAnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZsYWdaZXJvUGFkICYmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFyZ1RleHRbMF0gPT0gJy0nIHx8IGFyZ1RleHRbMF0gPT0gJysnKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnVGV4dCA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyZ1RleHRbMF0gKyAnMCcgKyBhcmdUZXh0LnNsaWNlKDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcmdUZXh0ID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGZsYWdaZXJvUGFkID8gJzAnIDogJyAnKSArIGFyZ1RleHQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQWRqdXN0IGNhc2UuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG5leHQgPCA5NykgYXJnVGV4dCA9IGFyZ1RleHQudG9VcHBlckNhc2UoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBJbnNlcnQgdGhlIHJlc3VsdCBpbnRvIHRoZSBidWZmZXIuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnVGV4dC5zcGxpdCgnJykuZm9yRWFjaChmdW5jdGlvbihjaHIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0LnB1c2goY2hyLmNoYXJDb2RlQXQoMCkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAncyc6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBTdHJpbmcuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGFyZyA9IGdldE5leHRBcmcoJ2k4KicpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBhcmdMZW5ndGggPSBhcmdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBfc3RybGVuKGFyZylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAnKG51bGwpJy5sZW5ndGg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHByZWNpc2lvblNldClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXJnTGVuZ3RoID0gTWF0aC5taW4oYXJnTGVuZ3RoLCBwcmVjaXNpb24pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghZmxhZ0xlZnRBbGlnbikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAoYXJnTGVuZ3RoIDwgd2lkdGgtLSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0LnB1c2goMzIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhcmcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IDA7IGkgPCBhcmdMZW5ndGg7IGkrKykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0LnB1c2goSEVBUFU4W2FyZysrIHwgMF0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0ID0gcmV0LmNvbmNhdChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludEFycmF5RnJvbVN0cmluZyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnKG51bGwpJy5zdWJzdHIoMCwgYXJnTGVuZ3RoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0cnVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmbGFnTGVmdEFsaWduKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlIChhcmdMZW5ndGggPCB3aWR0aC0tKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXQucHVzaCgzMik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdjJzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIENoYXJhY3Rlci5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZmxhZ0xlZnRBbGlnbikgcmV0LnB1c2goZ2V0TmV4dEFyZygnaTgnKSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKC0td2lkdGggPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldC5wdXNoKDMyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCFmbGFnTGVmdEFsaWduKSByZXQucHVzaChnZXROZXh0QXJnKCdpOCcpKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ24nOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gV3JpdGUgdGhlIGxlbmd0aCB3cml0dGVuIHNvIGZhciB0byB0aGUgbmV4dCBwYXJhbWV0ZXIuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgcHRyID0gZ2V0TmV4dEFyZygnaTMyKicpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEhFQVAzMltwdHIgPj4gMl0gPSByZXQubGVuZ3RoO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnJSc6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBMaXRlcmFsIHBlcmNlbnQgc2lnbi5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXQucHVzaChjdXJyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBVbmtub3duIHNwZWNpZmllcnMgcmVtYWluIHVudG91Y2hlZC5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgaSA9IHN0YXJ0VGV4dEluZGV4O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpIDwgdGV4dEluZGV4ICsgMjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSsrXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldC5wdXNoKEhFQVA4W2ldKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgdGV4dEluZGV4ICs9IDI7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0LnB1c2goY3Vycik7XG4gICAgICAgICAgICAgICAgICAgIHRleHRJbmRleCArPSAxO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXQ7XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gX2ZwcmludGYoc3RyZWFtLCBmb3JtYXQsIHZhcmFyZ3MpIHtcbiAgICAgICAgICAgIC8vIGludCBmcHJpbnRmKEZJTEUgKnJlc3RyaWN0IHN0cmVhbSwgY29uc3QgY2hhciAqcmVzdHJpY3QgZm9ybWF0LCAuLi4pO1xuICAgICAgICAgICAgLy8gaHR0cDovL3B1YnMub3Blbmdyb3VwLm9yZy9vbmxpbmVwdWJzLzAwMDA5NTM5OS9mdW5jdGlvbnMvcHJpbnRmLmh0bWxcbiAgICAgICAgICAgIGNvbnN0IHJlc3VsdCA9IF9fZm9ybWF0U3RyaW5nKGZvcm1hdCwgdmFyYXJncyk7XG4gICAgICAgICAgICBjb25zdCBzdGFjayA9IFJ1bnRpbWUuc3RhY2tTYXZlKCk7XG4gICAgICAgICAgICBjb25zdCByZXQgPSBfZndyaXRlKFxuICAgICAgICAgICAgICAgIGFsbG9jYXRlKHJlc3VsdCwgJ2k4JywgQUxMT0NfU1RBQ0spLFxuICAgICAgICAgICAgICAgIDEsXG4gICAgICAgICAgICAgICAgcmVzdWx0Lmxlbmd0aCxcbiAgICAgICAgICAgICAgICBzdHJlYW1cbiAgICAgICAgICAgICk7XG4gICAgICAgICAgICBSdW50aW1lLnN0YWNrUmVzdG9yZShzdGFjayk7XG4gICAgICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIF9yZWN2KGZkLCBidWYsIGxlbikge1xuICAgICAgICAgICAgY29uc3Qgc29jayA9IFNPQ0tGUy5nZXRTb2NrZXQoZmQpO1xuICAgICAgICAgICAgaWYgKCFzb2NrKSB7XG4gICAgICAgICAgICAgICAgX19fc2V0RXJyTm8oRVJSTk9fQ09ERVMuRUJBREYpO1xuICAgICAgICAgICAgICAgIHJldHVybiAtMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiBfcmVhZChmZCwgYnVmLCBsZW4pO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIF9wcmVhZChmaWxkZXMsIGJ1ZiwgbmJ5dGUsIG9mZnNldCkge1xuICAgICAgICAgICAgLy8gc3NpemVfdCBwcmVhZChpbnQgZmlsZGVzLCB2b2lkICpidWYsIHNpemVfdCBuYnl0ZSwgb2ZmX3Qgb2Zmc2V0KTtcbiAgICAgICAgICAgIC8vIGh0dHA6Ly9wdWJzLm9wZW5ncm91cC5vcmcvb25saW5lcHVicy8wMDAwOTUzOTkvZnVuY3Rpb25zL3JlYWQuaHRtbFxuICAgICAgICAgICAgY29uc3Qgc3RyZWFtID0gRlMuZ2V0U3RyZWFtKGZpbGRlcyk7XG4gICAgICAgICAgICBpZiAoIXN0cmVhbSkge1xuICAgICAgICAgICAgICAgIF9fX3NldEVyck5vKEVSUk5PX0NPREVTLkVCQURGKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIGNvbnN0IHNsYWIgPSBIRUFQODtcbiAgICAgICAgICAgICAgICByZXR1cm4gRlMucmVhZChzdHJlYW0sIHNsYWIsIGJ1ZiwgbmJ5dGUsIG9mZnNldCk7XG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgRlMuaGFuZGxlRlNFcnJvcihlKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gX3JlYWQoZmlsZGVzLCBidWYsIG5ieXRlKSB7XG4gICAgICAgICAgICAvLyBzc2l6ZV90IHJlYWQoaW50IGZpbGRlcywgdm9pZCAqYnVmLCBzaXplX3QgbmJ5dGUpO1xuICAgICAgICAgICAgLy8gaHR0cDovL3B1YnMub3Blbmdyb3VwLm9yZy9vbmxpbmVwdWJzLzAwMDA5NTM5OS9mdW5jdGlvbnMvcmVhZC5odG1sXG4gICAgICAgICAgICBjb25zdCBzdHJlYW0gPSBGUy5nZXRTdHJlYW0oZmlsZGVzKTtcbiAgICAgICAgICAgIGlmICghc3RyZWFtKSB7XG4gICAgICAgICAgICAgICAgX19fc2V0RXJyTm8oRVJSTk9fQ09ERVMuRUJBREYpO1xuICAgICAgICAgICAgICAgIHJldHVybiAtMTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgY29uc3Qgc2xhYiA9IEhFQVA4O1xuICAgICAgICAgICAgICAgIHJldHV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c3RyZWFtLCBwdHIsIGJ5dGVzVG9SZWFkKTtcbiAgICAgICAgICAgIGlmIChlcnIgPT0gLTEpIHtcbiAgICAgICAgICAgICAgICBpZiAoc3RyZWFtT2JqKSBzdHJlYW1PYmouZXJyb3IgPSB0cnVlO1xuICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYnl0ZXNSZWFkICs9IGVycjtcbiAgICAgICAgICAgIGlmIChieXRlc1JlYWQgPCBieXRlc1RvUmVhZCkgc3RyZWFtT2JqLmVvZiA9IHRydWU7XG4gICAgICAgICAgICByZXR1cm4gTWF0aC5mbG9vcihieXRlc1JlYWQgLyBzaXplKTtcbiAgICAgICAgfVxuICAgICAgICBNb2R1bGVbJ19tZW1jbXAnXSA9IF9tZW1jbXA7XG4gICAgICAgIGZ1bmN0aW9uIF9sc2VlayhmaWxkZXMsIG9mZnNldCwgd2hlbmNlKSB7XG4gICAgICAgICAgICAvLyBvZmZfdCBsc2VlayhpbnQgZmlsZGVzLCBvZmZfdCBvZmZzZXQsIGludCB3aGVuY2UpO1xuICAgICAgICAgICAgLy8gaHR0cDovL3B1YnMub3Blbmdyb3VwLm9yZy9vbmxpbmVwdWJzLzAwMDA5NTM5OS9mdW5jdGlvbnMvbHNlZWsuaHRtbFxuICAgICAgICAgICAgY29uc3Qgc3RyZWFtID0gRlMuZ2V0U3RyZWFtKGZpbGRlcyk7XG4gICAgICAgICAgICBpZiAoIXN0cmVhbSkge1xuICAgICAgICAgICAgICAgIF9fX3NldEVyck5vKEVSUk5PX0NPREVTLkVCQURGKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHJldHVybiBGUy5sbHNlZWsoc3RyZWFtLCBvZmZzZXQsIHdoZW5jZSk7XG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgRlMuaGFuZGxlRlNFcnJvcihlKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gX2ZzZWVrKHN0cmVhbSwgb2Zmc2V0LCB3aGVuY2UpIHtcbiAgICAgICAgICAgIC8vIGludCBmc2VlayhGSUxFICpzdHJlYW0sIGxvbmcgb2Zmc2V0LCBpbnQgd2hlbmNlKTtcbiAgICAgICAgICAgIC8vIGh0dHA6Ly9wdWJzLm9wZW5ncm91cC5vcmcvb25saW5lcHVicy8wMDAwOTUzOTkvZnVuY3Rpb25zL2ZzZWVrLmh0bWxcbiAgICAgICAgICAgIGNvbnN0IHJldCA9IF9sc2VlayhzdHJlYW0sIG9mZnNldCwgd2hlbmNlKTtcbiAgICAgICAgICAgIGlmIChyZXQgPT0gLTEpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBzdHJlYW0gPSBGUy5nZXRTdHJlYW0oc3RyZWFtKTtcbiAgICAgICAgICAgIHN0cmVhbS5lb2YgPSBmYWxzZTtcbiAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIF9jbG9zZShmaWxkZXMpIHtcbiAgICAgICAgICAgIC8vIGludCBjbG9zZShpbnQgZmlsZGVzKTtcbiAgICAgICAgICAgIC8vIGh0dHA6Ly9wdWJzLm9wZW5ncm91cC5vcmcvb25saW5lcHVicy8wMDAwOTUzOTkvZnVuY3Rpb25zL2Nsb3NlLmh0bWxcbiAgICAgICAgICAgIGNvbnN0IHN0cmVhbSA9IEZTLmdldFN0cmVhbShmaWxkZXMpO1xuICAgICAgICAgICAgaWYgKCFzdHJlYW0pIHtcbiAgICAgICAgICAgICAgICBfX19zZXRFcnJObyhFUlJOT19DT0RFUy5FQkFERik7XG4gICAgICAgICAgICAgICAgcmV0dXJuIC0xO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgICAgICBGUy5jbG9zZShzdHJlYW0pO1xuICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgfSBjYXRjaCAoZSkge1xuICAgICAgICAgICAgICAgIEZTLmhhbmRsZUZTRXJyb3IoZSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIC0xO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIF9mc3luYyhmaWxkZXMpIHtcbiAgICAgICAgICAgIC8vIGludCBmc3luYyhpbnQgZmlsZGVzKTtcbiAgICAgICAgICAgIC8vIGh0dHA6Ly9wdWJzLm9wZW5ncm91cC5vcmcvb25saW5lcHVicy8wMDAwOTUzOTkvZnVuY3Rpb25zL2ZzeW5jLmh0bWxcbiAgICAgICAgICAgIGNvbnN0IHN0cmVhbSA9IEZTLmdldFN0cmVhbShmaWxkZXMpO1xuICAgICAgICAgICAgaWYgKHN0cmVhbSkge1xuICAgICAgICAgICAgICAgIC8vIFdlIHdyaXRlIGRpcmVjdGx5IHRvIHRoZSBmaWxlIHN5c3RlbSwgc28gdGhlcmUncyBub3RoaW5nIHRvIGRvIGhlcmUuXG4gICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgIF9fX3NldEVyck5vKEVSUk5PX0NPREVTLkVCQURGKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gX2ZjbG9zZShzdHJlYW0pIHtcbiAgICAgICAgICAgIC8vIGludCBmY2xvc2UoRklMRSAqc3RyZWFtKTtcbiAgICAgICAgICAgIC8vIGh0dHA6Ly9wdWJzLm9wZW5ncm91cC5vcmcvb25saW5lcHVicy8wMDAwOTUzOTkvZnVuY3Rpb25zL2ZjbG9zZS5odG1sXG4gICAgICAgICAgICBfZnN5bmMoc3RyZWFtKTtcbiAgICAgICAgICAgIHJldHVybiBfY2xvc2Uoc3RyZWFtKTtcbiAgICAgICAgfVxuICAgICAgICBmdW5jdGlvbiBfcHJpbnRmKGZvcm1hdCwgdmFyYXJncykge1xuICAgICAgICAgICAgLy8gaW50IHByaW50Zihjb25zdCBjaGFyICpyZXN0cmljdCBmb3JtYXQsIC4uLik7XG4gICAgICAgICAgICAvLyBodHRwOi8vcHVicy5vcGVuZ3JvdXAub3JnL29ubGluZXB1YnMvMDAwMDk1Mzk5L2Z1bmN0aW9ucy9wcmludGYuaHRtbFxuICAgICAgICAgICAgY29uc3Qgc3Rkb3V0ID0gSEVBUDMyW19zdGRvdXQgPj4gMl07XG4gICAgICAgICAgICByZXR1cm4gX2ZwcmludGYoc3Rkb3V0LCBmb3JtYXQsIHZhcmFyZ3MpO1xuICAgICAgICB9XG4gICAgICAgIE1vZHVsZVsnX21lbXNldCddID0gX21lbXNldDtcbiAgICAgICAgTW9kdWxlWydfbWVtY3B5J10gPSBfbWVtY3B5O1xuICAgICAgICBjb25zdCBfbGx2bV9wb3dfZjY0ID0gTWF0aF9wb3c7XG4gICAgICAgIGNvbnN0IF9zaW4gPSBNYXRoX3NpbjtcbiAgICAgICAgZnVuY3Rpb24gX3N0cnJjaHIocHRyLCBjaHIpIHtcbiAgICAgICAgICAgIGxldCBwdHIyID0gcHRyICsgX3N0cmxlbihwdHIpO1xuICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgIGlmIChIRUFQOFtwdHIyXSA9PSBjaHIpIHJldHVybiBwdHIyO1xuICAgICAgICAgICAgICAgIHB0cjItLTtcbiAgICAgICAgICAgIH0gd2hpbGUgKHB0cjIgPj0gcHRyKTtcbiAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICB9XG4gICAgICAgIGxldCBfX19zdHJ0b2tfc3RhdGUgPSAwO1xuICAgICAgICBmdW5jdGlvbiBfc3RydG9rX3IocywgZGVsaW0sIGxhc3RzKSB7XG4gICAgICAgICAgICBjb25zdCBza2lwX2xlYWRpbmdfZGVsaW0gPSAxO1xuICAgICAgICAgICAgbGV0IHNwYW5wO1xuICAgICAgICAgICAgbGV0IGMsIHNjO1xuICAgICAgICAgICAgbGV0IHRvaztcbiAgICAgICAgICAgIGlmIChzID09IDAgJiYgKHMgPSBnZXRWYWx1ZShsYXN0cywgJ2k4KicpKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBjb250OiB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgIGMgPSBnZXRWYWx1ZShzKyssICdpOCcpO1xuICAgICAgICAgICAgICAgIGZvciAoc3BhbnAgPSBkZWxpbTsgKHNjID0gZ2V0VmFsdWUoc3BhbnArKywgJ2k4JykpICE9IDA7ICkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoYyA9PSBzYykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHNraXBfbGVhZGluZ19kZWxpbSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlIGNvbnQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNldFZhbHVlKGxhc3RzLCBzLCAnaTgqJyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2V0VmFsdWUocyAtIDEsIDAsICdpOCcpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzIC0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGlmIChjID09IDApIHtcbiAgICAgICAgICAgICAgICBzZXRWYWx1ZShsYXN0cywgMCwgJ2k4KicpO1xuICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdG9rID0gcyAtIDE7XG4gICAgICAgICAgICBmb3IgKDs7KSB7XG4gICAgICAgICAgICAgICAgYyA9IGdldFZhbHVlKHMrKywgJ2k4Jyk7XG4gICAgICAgICAgICAgICAgc3BhbnAgPSBkZWxpbTtcbiAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoc2MgPSBnZXRWYWx1ZShzcGFucCsrLCAnaTgnKSkgPT0gYykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGMgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZXRWYWx1ZShzIC0gMSwgMCwgJ2k4Jyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBzZXRWYWx1ZShsYXN0cywgcywgJ2k4KicpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRvaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKHNjICE9IDApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgYWJvcnQoJ3N0cnRva19yIGVycm9yIScpO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIF9zdHJ0b2socywgZGVsaW0pIHtcbiAgICAgICAgICAgIHJldHVybiBfc3RydG9rX3IocywgZGVsaW0sIF9fX3N0cnRva19zdGF0ZSk7XG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gX3N0cm5jbXAocHgsIHB5LCBuKSB7XG4gICAgICAgICAgICBsZXQgaSA9IDA7XG4gICAgICAgICAgICB3aGlsZSAoaSA8IG4pIHtcbiAgICAgICAgICAgICAgICBjb25zdCB4ID0gSEVBUFU4WyhweCArIGkpIHwgMF07XG4gICAgICAgICAgICAgICAgY29uc3QgeSA9IEhFQVBVOFsocHkgKyBpKSB8IDBdO1xuICAgICAgICAgICAgICAgIGlmICh4ID09IHkgJiYgeCA9PSAwKSByZXR1cm4gMDtcbiAgICAgICAgICAgICAgICBpZiAoeCA9PSAwKSByZXR1cm4gLTE7XG4gICAgICAgICAgICAgICAgaWYgKHkgPT0gMCkgcmV0dXJuIDE7XG4gICAgICAgICAgICAgICAgaWYgKHggPT0geSkge1xuICAgICAgICAgICAgICAgICAgICBpKys7XG4gICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB4ID4geSA/IDEgOiAtMTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgfVxuICAgICAgICBmdW5jdGlvbiBfc3RyY21wKHB4LCBweSkge1xuICAgICAgICAgICAgcmV0dXJuIF9zdHJuY21wKHB4LCBweSwgVE9UQUxfTUVNT1JZKTtcbiAgICAgICAgfVxuICAgICAgICBNb2R1bGVbJ19zdHJuY3B5J10gPSBfc3RybmNweTtcbiAgICAgICAgZnVuY3Rpb24gX2lzc3BhY2UoY2hyKSB7XG4gICAgICAgICAgICByZXR1cm4gY2hyID09IDMyIHx8IChjaHIgPj0gOSAmJiBjaHIgPD0gMTMpO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIF9fcGFyc2VJbnQoc3RyLCBlbmRwdHIsIGJhc2UsIG1pbiwgbWF4LCBiaXRzLCB1bnNpZ24pIHtcbiAgICAgICAgICAgIC8vIFNraXAgc3BhY2UuXG4gICAgICAgICAgICB3aGlsZSAoX2lzc3BhY2UoSEVBUDhbc3RyXSkpIHN0cisrO1xuICAgICAgICAgICAgLy8gQ2hlY2sgZm9yIGEgcGx1cy9taW51cyBzaWduLlxuICAgICAgICAgICAgbGV0IG11bHRpcGxpZXIgPSAxO1xuICAgICAgICAgICAgaWYgKEhFQVA4W3N0cl0gPT0gNDUpIHtcbiAgICAgICAgICAgICAgICBtdWx0aXBsaWVyID0gLTE7XG4gICAgICAgICAgICAgICAgc3RyKys7XG4gICAgICAgICAgICB9IGVsc2UgaWYgKEhFQVA4W3N0cl0gPT0gNDMpIHtcbiAgICAgICAgICAgICAgICBzdHIrKztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIEZpbmQgYmFzZS5cbiAgICAgICAgICAgIGxldCBmaW5hbEJhc2UgPSBiYXNlO1xuICAgICAgICAgICAgaWYgKCFmaW5hbEJhc2UpIHtcbiAgICAgICAgICAgICAgICBpZiAoSEVBUDhbc3RyXSA9PSA0OCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICBIRUFQOFsoc3RyICsgMSkgfCAwXSA9PSAxMjAgfHxcbiAgICAgICAgICAgICAgICAgICAgICAgIEhFQVA4WyhzdHIgKyAxKSB8IDBdID09IDg4XG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZmluYWxCYXNlID0gMTY7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHIgKz0gMjtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGZpbmFsQmFzZSA9IDg7XG4gICAgICAgICAgICAgICAgICAgICAgICBzdHIrKztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gZWxzZSBpZiAoZmluYWxCYXNlID09IDE2KSB7XG4gICAgICAgICAgICAgICAgaWYgKEhFQVA4W3N0cl0gPT0gNDgpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgSEVBUDhbKHN0ciArIDEpIHwgMF0gPT0gMTIwIHx8XG4gICAgICAgICAgICAgICAgICAgICAgICBIRUFQOFsoc3RyICsgMSkgfCAwXSA9PSA4OFxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHN0ciArPSAyO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKCFmaW5hbEJhc2UpIGZpbmFsQmFzZSA9IDEwO1xuICAgICAgICAgICAgLy8gR2V0IGRpZ2l0cy5cbiAgICAgICAgICAgIGxldCBjaHI7XG4gICAgICAgICAgICBsZXQgcmV0ID0gMDtcbiAgICAgICAgICAgIHdoaWxlICgoY2hyID0gSEVBUDhbc3RyXSkgIT0gMCkge1xuICAgICAgICAgICAgICAgIGNvbnN0IGRpZ2l0ID0gcGFyc2VJbnQoU3RyaW5nLmZyb21DaGFyQ29kZShjaHIpLCBmaW5hbEJhc2UpO1xuICAgICAgICAgICAgICAgIGlmIChpc05hTihkaWdpdCkpIHtcbiAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0ID0gcmV0ICogZmluYWxCYXNlICsgZGlnaXQ7XG4gICAgICAgICAgICAgICAgICAgIHN0cisrO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIEFwcGx5IHNpZ24uXG4gICAgICAgICAgICByZXQgKj0gbXVsdGlwbGllcjtcbiAgICAgICAgICAgIC8vIFNldCBlbmQgcG9pbnRlci5cbiAgICAgICAgICAgIGlmIChlbmRwdHIpIHtcbiAgICAgICAgICAgICAgICBIRUFQMzJbZW5kcHRyID4+IDJdID0gc3RyO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gVW5zaWduIGlmIG5lZWRlZC5cbiAgICAgICAgICAgIGlmICh1bnNpZ24pIHtcbiAgICAgICAgICAgICAgICBpZiAoTWF0aC5hYnMocmV0KSA+IG1heCkge1xuICAgICAgICAgICAgICAgICAgICByZXQgPSBtYXg7XG4gICAgICAgICAgICAgICAgICAgIF9fX3NldEVyck5vKEVSUk5PX0NPREVTLkVSQU5HRSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0ID0gdW5TaWduKHJldCwgYml0cyk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gVmFsaWRhdGUgcmFuZ2UuXG4gICAgICAgICAgICBpZiAocmV0ID4gbWF4IHx8IHJldCA8IG1pbikge1xuICAgICAgICAgICAgICAgIHJldCA9IHJldCA+IG1heCA/IG1heCA6IG1pbjtcbiAgICAgICAgICAgICAgICBfX19zZXRFcnJObyhFUlJOT19DT0RFUy5FUkFOR0UpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgaWYgKGJpdHMgPT0gNjQpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgICAoYXNtWydzZXRUZW1wUmV0MCddKFxuICAgICAgICAgICAgICAgICAgICAgICAgKCh0ZW1wRG91YmxlID0gcmV0KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICtNYXRoX2Ficyh0ZW1wRG91YmxlKSA+PSArMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gdGVtcERvdWJsZSA+ICswXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgID8gKE1hdGhfbWluKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArTWF0aF9mbG9vcih0ZW1wRG91YmxlIC8gKzQyOTQ5NjcyOTYpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArNDI5NDk2NzI5NVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA+Pj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogfn4rTWF0aF9jZWlsKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodGVtcERvdWJsZSAtICsofn50ZW1wRG91YmxlID4+PiAwKSkgL1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKzQyOTQ5NjcyOTZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApID4+PiAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOiAwKVxuICAgICAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICAgICAgICByZXQgPj4+IDApIHwgMFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICByZXR1cm4gcmV0O1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIF9zdHJ0b2woc3RyLCBlbmRwdHIsIGJhc2UpIHtcbiAgICAgICAgICAgIHJldHVybiBfX3BhcnNlSW50KHN0ciwgZW5kcHRyLCBiYXNlLCAtMjE0NzQ4MzY0OCwgMjE0NzQ4MzY0NywgMzIpOyAvLyBMT05HX01JTiwgTE9OR19NQVguXG4gICAgICAgIH1cbiAgICAgICAgZnVuY3Rpb24gX2F0b2kocHRyKSB7XG4gICAgICAgICAgICByZXR1cm4gX3N0cnRvbChwdHIsIG51bGwsIDEwKTtcbiAgICAgICAgfVxuICAgICAgICBmdW5jdGlvbiBfc3RyY2hyKHB0ciwgY2hyKSB7XG4gICAgICAgICAgICBwdHItLTtcbiAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICBwdHIrKztcbiAgICAgICAgICAgICAgICB2YXIgdmFsID0gSEVBUDhbcHRyXTtcbiAgICAgICAgICAgICAgICBpZiAodmFsID09IGNocikgcmV0dXJuIHB0cjtcbiAgICAgICAgICAgIH0gd2hpbGUgKHZhbCk7XG4gICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgfVxuICAgICAgICBmdW5jdGlvbiBfYWJvcnQoKSB7XG4gICAgICAgICAgICBNb2R1bGVbJ2Fib3J0J10oKTtcbiAgICAgICAgfVxuICAgICAgICBmdW5jdGlvbiBfX19lcnJub19sb2NhdGlvbigpIHtcbiAgICAgICAgICAgIHJldHVybiBfX19lcnJub19zdGF0ZTtcbiAgICAgICAgfVxuICAgICAgICBmdW5jdGlvbiBfc2JyayhieXRlcykge1xuICAgICAgICAgICAgLypcbiAgICAgICAgICAgICAgICBJbXBsZW1lbnQgYSBMaW51eC1saWtlICdtZW1vcnkgYXJlYScgZm9yIG91ciAncHJvY2VzcycuXG4gICAgICAgICAgICAgICAgQ2hhbmdlcyB0aGUgc2l6ZSBvZiB0aGUgbWVtb3J5IGFyZWEgYnkgfGJ5dGVzfC5cbiAgICAgICAgICAgICAgICBSZXR1cm5zIHRoZSBhZGRyZXNzIG9mIHRoZSBwcmV2aW91cyB0b3AgKCdicmVhaycpIG9mIHRoZSBtZW1vcnkgYXJlYS5cbiAgICAgICAgICAgICAgICBXZSBjb250cm9sIHRoZSBcImR5bmFtaWNcIiBtZW1vcnkgLSBEWU5BTUlDX0JBU0UgdG8gRFlOQU1JQ1RPUC5cbiAgICAgICAgICAgICovXG4gICAgICAgICAgICBjb25zdCBzZWxmID0gX3Nicms7XG4gICAgICAgICAgICBpZiAoIXNlbGYuY2FsbGVkKSB7XG4gICAgICAgICAgICAgICAgRFlOQU1JQ1RPUCA9IGFsaWduTWVtb3J5UGFnZShEWU5BTUlDVE9QKTsgLy8gbWFrZSBzdXJlIHdlIHN0YXJ0IG91dCBhbGlnbmVkXG4gICAgICAgICAgICAgICAgc2VsZi5jYWxsZWQgPSB0cnVlO1xuICAgICAgICAgICAgICAgIGFzc2VydChSdW50aW1lLmR5bmFtaWNBbGxvYyk7XG4gICAgICAgICAgICAgICAgc2VsZi5hbGxvYyA9IFJ1bnRpbWUuZHluYW1pY0FsbG9jO1xuICAgICAgICAgICAgICAgIFJ1bnRpbWUuZHluYW1pY0FsbG9jID0gZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgICAgIGFib3J0KCdjYW5ub3QgZHluYW1pY2FsbHkgYWxsb2NhdGUsIHNicmsgbm93IGhhcyBjb250cm9sJyk7XG4gICAgICAgICAgICAgICAgfTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGNvbnN0IHJldCA9IERZTkFNSUNUT1A7XG4gICAgICAgICAgICBpZiAoYnl0ZXMgIT0gMCkgc2VsZi5hbGxvYyhieXRlcyk7XG4gICAgICAgICAgICByZXR1cm4gcmV0OyAvLyBQcmV2aW91cyBicmVhayBsb2NhdGlvbi5cbiAgICAgICAgfVxuICAgICAgICBmdW5jdGlvbiBfc3lzY29uZihuYW1lKSB7XG4gICAgICAgICAgICAvLyBsb25nIHN5c2NvbmYoaW50IG5hbWUpO1xuICAgICAgICAgICAgLy8gaHR0cDovL3B1YnMub3Blbmdyb3VwLm9yZy9vbmxpbmVwdWJzLzAwOTY5NTM5OS9mdW5jdGlvbnMvc3lzY29uZi5odG1sXG4gICAgICAgICAgICBzd2l0Y2ggKG5hbWUpIHtcbiAgICAgICAgICAgICAgICBjYXNlIDMwOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gUEFHRV9TSVpFO1xuICAgICAgICAgICAgICAgIGNhc2UgMTMyOlxuICAgICAgICAgICAgICAgIGNhc2UgMTMzOlxuICAgICAgICAgICAgICAgIGNhc2UgMTI6XG4gICAgICAgICAgICAgICAgY2FzZSAxMzc6XG4gICAgICAgICAgICAgICAgY2FzZSAxMzg6XG4gICAgICAgICAgICAgICAgY2FzZSAxNTpcbiAgICAgICAgICAgICAgICBjYXNlIDIzNTpcbiAgICAgICAgICAgICAgICBjYXNlIDE2OlxuICAgICAgICAgICAgICAgIGNhc2UgMTc6XG4gICAgICAgICAgICAgICAgY2FzZSAxODpcbiAgICAgICAgICAgICAgICBjYXNlIDE5OlxuICAgICAgICAgICAgICAgIGNhc2UgMjA6XG4gICAgICAgICAgICAgICAgY2FzZSAxNDk6XG4gICAgICAgICAgICAgICAgY2FzZSAxMzpcbiAgICAgICAgICAgICAgICBjYXNlIDEwOlxuICAgICAgICAgICAgICAgIGNhc2UgMjM2OlxuICAgICAgICAgICAgICAgIGNhc2UgMTUzOlxuICAgICAgICAgICAgICAgIGNhc2UgOTpcbiAgICAgICAgICAgICAgICBjYXNlIDIxOlxuICAgICAgICAgICAgICAgIGNhc2UgMjI6XG4gICAgICAgICAgICAgICAgY2FzZSAxNTk6XG4gICAgICAgICAgICAgICAgY2FzZSAxNTQ6XG4gICAgICAgICAgICAgICAgY2FzZSAxNDpcbiAgICAgICAgICAgICAgICBjYXNlIDc3OlxuICAgICAgICAgICAgICAgIGNhc2UgNzg6XG4gICAgICAgICAgICAgICAgY2FzZSAxMzk6XG4gICAgICAgICAgICAgICAgY2FzZSA4MDpcbiAgICAgICAgICAgICAgICBjYXNlIDgxOlxuICAgICAgICAgICAgICAgIGNhc2UgNzk6XG4gICAgICAgICAgICAgICAgY2FzZSA4MjpcbiAgICAgICAgICAgICAgICBjYXNlIDY4OlxuICAgICAgICAgICAgICAgIGNhc2UgNjc6XG4gICAgICAgICAgICAgICAgY2FzZSAxNjQ6XG4gICAgICAgICAgICAgICAgY2FzZSAxMTpcbiAgICAgICAgICAgICAgICBjYXNlIDI5OlxuICAgICAgICAgICAgICAgIGNhc2UgNDc6XG4gICAgICAgICAgICAgICAgY2FzZSA0ODpcbiAgICAgICAgICAgICAgICBjYXNlIDk1OlxuICAgICAgICAgICAgICAgIGNhc2UgNTI6XG4gICAgICAgICAgICAgICAgY2FzZSA1MTpcbiAgICAgICAgICAgICAgICBjYXNlIDQ2OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gMjAwODA5O1xuICAgICAgICAgICAgICAgIGNhc2UgMjc6XG4gICAgICAgICAgICAgICAgY2FzZSAyNDY6XG4gICAgICAgICAgICAgICAgY2FzZSAxMjc6XG4gICAgICAgICAgICAgICAgY2FzZSAxMjg6XG4gICAgICAgICAgICAgICAgY2FzZSAyMzpcbiAgICAgICAgICAgICAgICBjYXNlIDI0OlxuICAgICAgICAgICAgICAgIGNhc2UgMTYwOlxuICAgICAgICAgICAgICAgIGNhc2UgMTYxOlxuICAgICAgICAgICAgICAgIGNhc2UgMTgxOlxuICAgICAgICAgICAgICAgIGNhc2UgMTgyOlxuICAgICAgICAgICAgICAgIGNhc2UgMjQyOlxuICAgICAgICAgICAgICAgIGNhc2UgMTgzOlxuICAgICAgICAgICAgICAgIGNhc2UgMTg0OlxuICAgICAgICAgICAgICAgIGNhc2UgMjQzOlxuICAgICAgICAgICAgICAgIGNhc2UgMjQ0OlxuICAgICAgICAgICAgICAgIGNhc2UgMjQ1OlxuICAgICAgICAgICAgICAgIGNhc2UgMTY1OlxuICAgICAgICAgICAgICAgIGNhc2UgMTc4OlxuICAgICAgICAgICAgICAgIGNhc2UgMTc5OlxuICAgICAgICAgICAgICAgIGNhc2UgNDk6XG4gICAgICAgICAgICAgICAgY2FzZSA1MDpcbiAgICAgICAgICAgICAgICBjYXNlIDE2ODpcbiAgICAgICAgICAgICAgICBjYXNlIDE2OTpcbiAgICAgICAgICAgICAgICBjYXNlIDE3NTpcbiAgICAgICAgICAgICAgICBjYXNlIDE3MDpcbiAgICAgICAgICAgICAgICBjYXNlIDE3MTpcbiAgICAgICAgICAgICAgICBjYXNlIDE3MjpcbiAgICAgICAgICAgICAgICBjYXNlIDk3OlxuICAgICAgICAgICAgICAgIGNhc2UgNzY6XG4gICAgICAgICAgICAgICAgY2FzZSAzMjpcbiAgICAgICAgICAgICAgICBjYXNlIDE3MzpcbiAgICAgICAgICAgICAgICBjYXNlIDM1OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gLTE7XG4gICAgICAgICAgICAgICAgY2FzZSAxNzY6XG4gICAgICAgICAgICAgICAgY2FzZSAxNzc6XG4gICAgICAgICAgICAgICAgY2FzZSA3OlxuICAgICAgICAgICAgICAgIGNhc2UgMTU1OlxuICAgICAgICAgICAgICAgIGNhc2UgODpcbiAgICAgICAgICAgICAgICBjYXNlIDE1NzpcbiAgICAgICAgICAgICAgICBjYXNlIDEyNTpcbiAgICAgICAgICAgICAgICBjYXNlIDEyNjpcbiAgICAgICAgICAgICAgICBjYXNlIDkyOlxuICAgICAgICAgICAgICAgIGNhc2UgOTM6XG4gICAgICAgICAgICAgICAgY2FzZSAxMjk6XG4gICAgICAgICAgICAgICAgY2FzZSAxMzA6XG4gICAgICAgICAgICAgICAgY2FzZSAxMzE6XG4gICAgICAgICAgICAgICAgY2FzZSA5NDpcbiAgICAgICAgICAgICAgICBjYXNlIDkxOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gMTtcbiAgICAgICAgICAgICAgICBjYXNlIDc0OlxuICAgICAgICAgICAgICAgIGNhc2UgNjA6XG4gICAgICAgICAgICAgICAgY2FzZSA2OTpcbiAgICAgICAgICAgICAgICBjYXNlIDcwOlxuICAgICAgICAgICAgICAgIGNhc2UgNDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDEwMjQ7XG4gICAgICAgICAgICAgICAgY2FzZSAzMTpcbiAgICAgICAgICAgICAgICBjYXNlIDQyOlxuICAgICAgICAgICAgICAgIGNhc2UgNzI6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAzMjtcbiAgICAgICAgICAgICAgICBjYXNlIDg3OlxuICAgICAgICAgICAgICAgIGNhc2UgMjY6XG4gICAgICAgICAgICAgICAgY2FzZSAzMzpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDIxNDc0ODM2NDc7XG4gICAgICAgICAgICAgICAgY2FzZSAzNDpcbiAgICAgICAgICAgICAgICBjYXNlIDE6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiA0NzgzOTtcbiAgICAgICAgICAgICAgICBjYXNlIDM4OlxuICAgICAgICAgICAgICAgIGNhc2UgMzY6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiA5OTtcbiAgICAgICAgICAgICAgICBjYXNlIDQzOlxuICAgICAgICAgICAgICAgIGNhc2UgMzc6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAyMDQ4O1xuICAgICAgICAgICAgICAgIGNhc2UgMDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDIwOTcxNTI7XG4gICAgICAgICAgICAgICAgY2FzZSAzOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gNjU1MzY7XG4gICAgICAgICAgICAgICAgY2FzZSAyODpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDMyNzY4O1xuICAgICAgICAgICAgICAgIGNhc2UgNDQ6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAzMjc2NztcbiAgICAgICAgICAgICAgICBjYXNlIDc1OlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gMTYzODQ7XG4gICAgICAgICAgICAgICAgY2FzZSAzOTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDEwMDA7XG4gICAgICAgICAgICAgICAgY2FzZSA4OTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDcwMDtcbiAgICAgICAgICAgICAgICBjYXNlIDcxOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gMjU2O1xuICAgICAgICAgICAgICAgIGNhc2UgNDA6XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiAyNTU7XG4gICAgICAgICAgICAgICAgY2FzZSAyOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gMTAwO1xuICAgICAgICAgICAgICAgIGNhc2UgMTgwOlxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gNjQ7XG4gICAgICAgICAgICAgICAgY2FzZSAyNTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDIwO1xuICAgICAgICAgICAgICAgIGNhc2UgNTpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDE2O1xuICAgICAgICAgICAgICAgIGNhc2UgNjpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDY7XG4gICAgICAgICAgICAgICAgY2FzZSA3MzpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDQ7XG4gICAgICAgICAgICAgICAgY2FzZSA4NDpcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBfX19zZXRFcnJObyhFUlJOT19DT0RFUy5FSU5WQUwpO1xuICAgICAgICAgICAgcmV0dXJuIC0xO1xuICAgICAgICB9XG4gICAgICAgIGZ1bmN0aW9uIF90aW1lKHB0cikge1xuICAgICAgICAgICAgY29uc3QgcmV0ID0gTWF0aC5mbG9vcihEYXRlLm5vdygpIC8gMTAwMCk7XG4gICAgICAgICAgICBpZiAocHRyKSB7XG4gICAgICAgICAgICAgICAgSEVBUDMyW3B0ciA+PiAyXSA9IHJldDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHJldHVybiByZXQ7XG4gICAgICAgIH1cblxuICAgICAgICBGUy5zdGF0aWNJbml0KCk7XG4gICAgICAgIF9fQVRJTklUX18udW5zaGlmdCh7XG4gICAgICAgICAgICBmdW5jOiBmdW5jdGlvbigpIHtcbiAgICAgICAgICAgICAgICBpZiAoIU1vZHVsZVsnbm9GU0luaXQnXSAmJiAhRlMuaW5pdC5pbml0aWFsaXplZCkgRlMuaW5pdCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcbiAgICAgICAgX19BVE1BSU5fXy5wdXNoKHtcbiAgICAgICAgICAgIGZ1bmM6IGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgIEZTLmlnbm9yZVBlcm1pc3Npb25zID0gZmFsc2U7XG4gICAgICAgICAgICB9XG4gICAgICAgIH0pO1xuICAgICAgICBfX0FURVhJVF9fLnB1c2goe1xuICAgICAgICAgICAgZnVuYzogZnVuY3Rpb24oKSB7XG4gICAgICAgICAgICAgICAgRlMucXVpdCgpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9KTtcblxuICAgICAgICBNb2R1bGVbJ0ZTX2NyZWF0ZUZvbGRlciddID0gRlMuY3JlYXRlRm9sZGVyO1xuICAgICAgIC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b2YgZSAhPT0gJ251bWJlcicgJiYgZSAhPT0gJ2xvbmdqbXAnKSB0aHJvdyBlO1xuICAgICAgICAgICAgICAgIGFzbVsnc2V0VGhyZXcnXSgxLCAwKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuXG4gICAgICAgIGZ1bmN0aW9uIGludm9rZV9paWlpaShpbmRleCwgYTEsIGEyLCBhMywgYTQpIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIE1vZHVsZVsnZHluQ2FsbF9paWlpaSddKGluZGV4LCBhMSwgYTIsIGEzLCBhNCk7XG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBlICE9PSAnbnVtYmVyJyAmJiBlICE9PSAnbG9uZ2ptcCcpIHRocm93IGU7XG4gICAgICAgICAgICAgICAgYXNtWydzZXRUaHJldyddKDEsIDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gaW52b2tlX3ZpaWkoaW5kZXgsIGExLCBhMiwgYTMpIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgTW9kdWxlWydkeW5DYWxsX3ZpaWknXShpbmRleCwgYTEsIGEyLCBhMyk7XG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBlICE9PSAnbnVtYmVyJyAmJiBlICE9PSAnbG9uZ2ptcCcpIHRocm93IGU7XG4gICAgICAgICAgICAgICAgYXNtWydzZXRUaHJldyddKDEsIDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gaW52b2tlX3YoaW5kZXgpIHtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgTW9kdWxlWydkeW5DYWxsX3YnXShpbmRleCk7XG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBlICE9PSAnbnVtYmVyJyAmJiBlICE9PSAnbG9uZ2ptcCcpIHRocm93IGU7XG4gICAgICAgICAgICAgICAgYXNtWydzZXRUaHJldyddKDEsIDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gaW52b2tlX2lpaShpbmRleCwgYTEsIGEyKSB7XG4gICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgIHJldHVybiBNb2R1bGVbJ2R5bkNhbGxfaWlpJ10oaW5kZXgsIGExLCBhMik7XG4gICAgICAgICAgICB9IGNhdGNoIChlKSB7XG4gICAgICAgICAgICAgICAgaWYgKHR5cGVvZiBlICE9PSAnbnVtYmVyJyAmJiBlICE9PSAnbG9uZ2ptcCcpIHRocm93IGU7XG4gICAgICAgICAgICAgICAgYXNtWydzZXRUaHJldyddKDEsIDApO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gYXNtUHJpbnRJbnQoeCwgeSkge1xuICAgICAgICAgICAgY29uc29sZS5sb2coJ2ludCAnICsgeCArICcsJyArIHkpO1xuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gYXNtUHJpbnRGbG9hdCh4LCB5KSB7XG4gICAgICAgICAgICBjb25zb2xlLmxvZygnZmxvYXQgJyArIHggKyAnLCcgKyB5KTtcbiAgICAgICAgfVxuXG4gICAgICAgIC8vIEVNU0NSSVBURU5fU1RBUlRfQVNNXG5cbiAgICAgICAgdmFyIGFzbSA9IChmdW5jdGlvbihnbG9iYWwsIGVudiwgYnVmZmVyKSB7XG4gICAgICAgICAgICAndXNlIGFzbSc7XG4gICAgICAgICAgICBsZXQgYSA9IG5ldyBnbG9iYWwuSW50OEFycmF5KGJ1ZmZlcik7XG4gICAgICAgICAgICBsZXQgYiA9IG5ldyBnbG9iYWwuSW50MTZBcnJheShidWZmZXIpO1xuICAgICAgICAgICAgbGV0IGMgPSBuZXcgZ2xvYmFsLkludDMyQXJyYXkoYnVmZmVyKTtcbiAgICAgICAgICAgIGxldCBkID0gbmV3IGdsb2JhbC5VaW50OEFycmF5KGJ1ZmZlcik7XG4gICAgICAgICAgICBsZXQgZSA9IG5ldyBnbG9iYWwuVWludDE2QXJyYXkoYnVmZmVyKTtcbiAgICAgICAgICAgIGxldCBmID0gbmV3IGdsb2JhbC5VaW50MzJBcnJheShidWZmZXIpO1xuICAgICAgICAgICAgbGV0IGcgPSBuZXcgZ2xvYmFsLkZsb2F0MzJBcnJheShidWZmZXIpO1xuICAgICAgICAgICAgbGV0IGggPSBuZXcgZ2xvYmFsLkZsb2F0NjRBcnJheShidWZmZXIpO1xuICAgICAgICAgICAgbGV0IGkgPSBlbnYuU1RBQ0tUT1AgfCAwO1xuICAgICAgICAgICAgbGV0IGogPSBlbnYuU1RBQ0tfTUFYIHwgMDtcbiAgICAgICAgICAgIGxldCBrID0gZW52LnRlbXBEb3VibGVQdHIgfCAwO1xuICAgICAgICAgICAgbGV0IGwgPSBlbnYuQUJPUlQgfCAwO1xuICAgICAgICAgICAgbGV0IG0gPSBlbnYuX3N0ZGVyciB8IDA7XG4gICAgICAgICAgICBsZXQgbiA9ICtlbnYuTmFOO1xuICAgICAgICAgICAgbGV0IG8gPSArZW52LkluZmluaXR5O1xuICAgICAgICAgICAgbGV0IHAgPSAwO1xuICAgICAgICAgICAgbGV0IHEgPSAwO1xuICAgICAgICAgICAgbGV0IHIgPSAwO1xuICAgICAgICAgICAgbGV0IHMgPSAwO1xuICAgICAgICAgICAgbGV0IHQgPSAwLFxuICAgICAgICAgICAgICAgIHUgPSAwLFxuICAgICAgICAgICAgICAgIHYgPSAwLFxuICAgICAgICAgICAgICAgIHcgPSAwLFxuICAgICAgICAgICAgICAgIHggPSAwLjAsXG4gICAgICAgICAgICAgICAgeSA9IDAsXG4gICAgICAgICAgICAgICAgeiA9IDAsXG4gICAgICAgICAgICAgICAgQSA9IDAsXG4gICAgICAgICAgICAgICAgQiA9IDAuMDtcbiAgICAgICAgICAgIGxldCBDID0gMDtcbiAgICAgICAgICAgIGxldCBEID0gMDtcbiAgICAgICAgICAgIGxldCBFID0gMDtcbiAgICAgICAgICAgIGxldCBGID0gMDtcbiAgICAgICAgICAgIGxldCBHID0gMDtcbiAgICAgICAgICAgIGxldCBIID0gMDtcbiAgICAgICAgICAgIGxldCBJID0gMDtcbiAgICAgICAgICAgIGxldCBKID0gMDtcbiAgICAgICAgICAgIGxldCBLID0gMDtcbiAgICAgICAgICAgIGxldCBMID0gMDtcbiAgICAgICAgICAgIGxldCBNID0gZ2xvYmFsLk1hdGguZmxvb3I7XG4gICAgICAgICAgICBsZXQgTiA9IGdsb2JhbC5NYXRoLmFicztcbiAgICAgICAgICAgIGxldCBPID0gZ2xvYmFsLk1hdGguc3FydDtcbiAgICAgICAgICAgIGxldCBQID0gZ2xvYmFsLk1hdGgucG93O1xuICAgICAgICAgICAgbGV0IFEgPSBnbG9iYWwuTWF0aC5jb3M7XG4gICAgICAgICAgICBsZXQgUiA9IGdsb2JhbC5NYXRoLnNpbjtcbiAgICAgICAgICAgIGxldCBTID0gZ2xvYmFsLk1hdGgudGFuO1xuICAgICAgICAgICAgbGV0IFQgPSBnbG9iYWwuTWF0aC5hY29zO1xuICAgICAgICAgICAgbGV0IFUgPSBnbG9iYWwuTWF0aC5hc2luO1xuICAgICAgICAgICAgbGV0IFYgPSBnbG9iYWwuTWF0aC5hdGFuO1xuICAgICAgICAgICAgbGV0IFcgPSBnbG9iYWwuTWF0aC5hdGFuMjtcbiAgICAgICAgICAgIGxldCBYID0gZ2xvYmFsLk1hdGguZXhwO1xuICAgICAgICAgICAgbGV0IFkgPSBnbG9iYWwuTWF0aC5sb2c7XG4gICAgICAgICAgICBsZXQgWiA9IGdsb2JhbC5NYXRoLmNlaWw7XG4gICAgICAgICAgICBsZXQgXyA9IGdsb2JhbC5NYXRoLmltdWw7XG4gICAgICAgICAgICBsZXQgJCA9IGVudi5hYm9ydDtcbiAgICAgICAgICAgIGxldCBhYSA9IGVudi5hc3NlcnQ7XG4gICAgICAgICAgICBsZXQgYWIgPSBlbnYuYXNtUHJpbnRJbnQ7XG4gICAgICAgICAgICBsZXQgYWMgPSBlbnYuYXNtUHJpbnRGbG9hdDtcbiAgICAgICAgICAgIGxldCBhZCA9IGVudi5taW47XG4gICAgICAgICAgICBsZXQgYWUgPSBlbnYuaW52b2tlX2lpO1xuICAgICAgICAgICAgbGV0IGFmID0gZW52Lmludm9rZV92aTtcbiAgICAgICAgICAgIGxldCBhZyA9IGVudi5pbnZva2VfaWlpaWk7XG4gICAgICAgICAgICBsZXQgYWggPSBlbnYuaW52b2tlX3ZpaWk7XG4gICAgICAgICAgICBsZXQgYWkgPSBlbnYuaW52b2tlX3Y7XG4gICAgICAgICAgICBsZXQgYWogPSBlbnYuaW52b2tlX2lpaTtcbiAgICAgICAgICAgIGxldCBhayA9IGVudi5fc3RybmNtcDtcbiAgICAgICAgICAgIGxldCBhbCA9IGVudi5fbHNlZWs7XG4gICAgICAgICAgICBjb25zdCBhbSA9IGVudi5fc3lzY29uZjtcbiAgICAgICAgICAgIGxldCBhbiA9IGVudi5fZnJlYWQ7XG4gICAgICAgICAgICBsZXQgYW8gPSBlbnYuX2ZjbG9zZTtcbiAgICAgICAgICAgIGxldCBhcCA9IGVudi5fc3RydG9rX3I7XG4gICAgICAgICAgICBjb25zdCBhcSA9IGVudi5fYWJvcnQ7XG4gICAgICAgICAgICBsZXQgYXIgPSBlbnYuX2ZwcmludGY7XG4gICAgICAgICAgICBsZXQgYXMgPSBlbnYuX2Nsb3NlO1xuICAgICAgICAgICAgbGV0IGF0ID0gZW52Ll9wcmVhZDtcbiAgICAgICAgICAgIGxldCBhdSA9IGVudi5fZmZsdXNoO1xuICAgICAgICAgICAgbGV0IGF2ID0gZW52Ll9mb3BlbjtcbiAgICAgICAgICAgIGxldCBhdyA9IGVudi5fb3BlbjtcbiAgICAgICAgICAgIGxldCBheCA9IGVudi5fc3RydG9sO1xuICAgICAgICAgICAgbGV0IGF5ID0gZW52Ll9zdHJ0b2s7XG4gICAgICAgICAgICBsZXQgYXogPSBlbnYuX19fc2V0RXJyTm87XG4gICAgICAgICAgICBsZXQgYUEgPSBlbnYuX19yZWFsbHlOZWdhdGl2ZTtcbiAgICAgICAgICAgIGxldCBhQiA9IGVudi5fZnNlZWs7XG4gICAgICAgICAgICBsZXQgYUMgPSBlbnYuX3NlbmQ7XG4gICAgICAgICAgICBsZXQgYUQgPSBlbnYuX3dyaXRlO1xuICAgICAgICAgICAgbGV0IGFFID0gZW52Ll9zdHJyY2hyO1xuICAgICAgICAgICAgbGV0IGFGID0gZW52Ll9zaW47XG4gICAgICAgICAgICBsZXQgYUcgPSBlbnYuX3ByaW50ZjtcbiAgICAgICAgICAgIGxldCBhSCA9IGVudi5fc3RyY2hyO1xuICAgICAgICAgICAgbGV0IGFJID0gZW52Ll9yZWFkO1xuICAgICAgICAgICAgY29uc3QgYUogPSBlbnYuX3RpbWU7XG4gICAgICAgICAgICBjb25zdCBhTCA9IGVudi5fYXRvaTtcbiAgICAgICAgICAgIGNvbnN0IGFRID0gZW52Ll9fX2Vycm5vX2xvY2F0aW9uO1xuICAgICAgICAgICAgY29uc3QgYVMgPSBlbnYuX3Nicms7XG4gICAgICAgICAgICBjb25zdCBhViA9IGVudi5fc3RyY21wO1xuXG4gICAgICAgICAgICAvLyBFTVNDUklQVEVOX1NUQVJUX0ZVTkNTXG5cbiAgICAgICAgICAgIGZ1bmN0aW9uIGEwKGEpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGIgPSAwO1xuICAgICAgICAgICAgICAgIGIgPSBpO1xuICAgICAgICAgICAgICAgIGkgPSAoaSArIGEpIHwgMDtcbiAgICAgICAgICAgICAgICBpID0gKGkgKyA3KSAmIC04O1xuICAgICAgICAgICAgICAgIHJldHVybiBiIHwgMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGExKCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBpIHwgMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGEyKGEpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgaSA9IGE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBhMyhhLCBiKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBpZiAoKHAgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHAgPSBhO1xuICAgICAgICAgICAgICAgICAgICBxID0gYjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBhNChiKSB7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGFba10gPSBhW2JdO1xuICAgICAgICAgICAgICAgIGFbKGsgKyAxKSB8IDBdID0gYVsoYiArIDEpIHwgMF07XG4gICAgICAgICAgICAgICAgYVsoayArIDIpIHwgMF0gPSBhWyhiICsgMikgfCAwXTtcbiAgICAgICAgICAgICAgICBhWyhrICsgMykgfCAwXSA9IGFbKGIgKyAzKSB8IDBdO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYTYoYSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBDID0gYTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGE3KGEpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgRCA9IGE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBhOChhKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIEUgPSBhO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYTkoYSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBGID0gYTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGJhKGEpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgRyA9IGE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBiYihhKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIEggPSBhO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYmMoYSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBJID0gYTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGJkKGEpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgSiA9IGE7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBiZShhKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIEsgPSBhO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYmYoYSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBMID0gYTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGJnKCkge31cbiAgICAgICAgICAgIGZ1bmN0aW9uIGJoKGIpIHtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGQgPSAwLFxuICAgICAgICAgICAgICAgICAgICBlID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGcgPSAwLFxuICAgICAgICAgICAgICAgICAgICBoID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGsgPSAwLFxuICAgICAgICAgICAgICAgICAgICBsID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG4gPSAwO1xuICAgICAgICAgICAgICAgIGQgPSBpO1xuICAgICAgICAgICAgICAgIGkgPSAoaSArIDEwMjQpIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gZCB8IDA7XG4gICAgICAgICAgICAgICAgZiA9IGI7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGYgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGFbZl0gfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBiID0gYXYoZiB8IDAsIDY1NzYpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGcgPSBiO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChiIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGggPSBnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGogPSBoO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgPSBkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBqIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGFbZiB8IDBdIHwgMCkgIT0gNDcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYiA9IGNbMTY2NF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChiIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGsgPSAxNjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFbZSB8IDBdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGwgPSBjMShjW2IgPj4gMl0gfCAwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGwgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9IGUgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG4gPSBjW2IgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGMyKG0gfCAwLCBuIHwgMCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYVsoZSArIChsIC0gMSkpIHwgMF0gfCAwKSAhPSA0Nykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhWyhlICsgbCkgfCAwXSA9IDQ3O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhWyhlICsgKGwgKyAxKSkgfCAwXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYzMoZSB8IDAsIGYgfCAwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsID0gYXYoZSB8IDAsIDY1NzYpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGcgPSBsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChsIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYiA9IGNbKGIgKyA0KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChrIHwgMCkgPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGggPSBnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqID0gaDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBqIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGggPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgaiA9IGg7XG4gICAgICAgICAgICAgICAgICAgICAgICBpID0gZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBqIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgIGggPSAwO1xuICAgICAgICAgICAgICAgIGogPSBoO1xuICAgICAgICAgICAgICAgIGkgPSBkO1xuICAgICAgICAgICAgICAgIHJldHVybiBqIHwgMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGJpKGEpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGIgPSAwO1xuICAgICAgICAgICAgICAgIGIgPSBjJChhKSB8IDA7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGIgfCAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYmooYSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgYiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGQgPSAwLFxuICAgICAgICAgICAgICAgICAgICBlID0gMDtcbiAgICAgICAgICAgICAgICBiID0gYTtcbiAgICAgICAgICAgICAgICBhID0gYmkoOCkgfCAwO1xuICAgICAgICAgICAgICAgIGlmICgoYSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjW2EgPj4gMl0gPSBiaSgoKGMxKGIgfCAwKSB8IDApICsgMSkgfCAwKSB8IDA7XG4gICAgICAgICAgICAgICAgaWYgKChjW2EgPj4gMl0gfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGMwKGEpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZCA9IGNbYSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGUgPSBiO1xuICAgICAgICAgICAgICAgICAgICBjMihkIHwgMCwgZSB8IDApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1soYSArIDQpID4+IDJdID0gY1sxNjY0XTtcbiAgICAgICAgICAgICAgICAgICAgY1sxNjY0XSA9IGE7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBiaygpIHtcbiAgICAgICAgICAgICAgICBsZXQgYSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGIgPSAwO1xuICAgICAgICAgICAgICAgIGEgPSBjWzE2NjRdIHwgMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGEgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBiID0gY1soYSArIDQpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgYzAoY1thID4+IDJdIHwgMCk7XG4gICAgICAgICAgICAgICAgICAgIGMwKGEpO1xuICAgICAgICAgICAgICAgICAgICBhID0gYjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY1sxNjY0XSA9IDA7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYmwoZiwgaCwgaiwgaywgbCwgbiwgbywgcCwgcSkge1xuICAgICAgICAgICAgICAgIGYgPSBmIHwgMDtcbiAgICAgICAgICAgICAgICBoID0gaCB8IDA7XG4gICAgICAgICAgICAgICAgaiA9IGogfCAwO1xuICAgICAgICAgICAgICAgIGsgPSBrIHwgMDtcbiAgICAgICAgICAgICAgICBsID0gbCB8IDA7XG4gICAgICAgICAgICAgICAgbiA9IG4gfCAwO1xuICAgICAgICAgICAgICAgIG8gPSBvIHwgMDtcbiAgICAgICAgICAgICAgICBwID0gcCB8IDA7XG4gICAgICAgICAgICAgICAgcSA9IHEgfCAwO1xuICAgICAgICAgICAgICAgIGxldCByID0gMCxcbiAgICAgICAgICAgICAgICAgICAgcyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHQgPSAwLFxuICAgICAgICAgICAgICAgICAgICB1ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgdiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHcgPSAwLFxuICAgICAgICAgICAgICAgICAgICB4ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgeSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHogPSAwLFxuICAgICAgICAgICAgICAgICAgICBBID0gMCxcbiAgICAgICAgICAgICAgICAgICAgQiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIEMgPSAwLFxuICAgICAgICAgICAgICAgICAgICBEID0gMCxcbiAgICAgICAgICAgICAgICAgICAgRSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIEYgPSAwLFxuICAgICAgICAgICAgICAgICAgICBHID0gMCxcbiAgICAgICAgICAgICAgICAgICAgSCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIEkgPSAwO1xuICAgICAgICAgICAgICAgIGogPSBpO1xuICAgICAgICAgICAgICAgIGkgPSAoaSArIDEwNTYpIHwgMDtcbiAgICAgICAgICAgICAgICByID0gaiB8IDA7XG4gICAgICAgICAgICAgICAgcyA9IChqICsgMTAyNCkgfCAwO1xuICAgICAgICAgICAgICAgIHQgPSAoaiArIDEwMzIpIHwgMDtcbiAgICAgICAgICAgICAgICB1ID0gKGogKyAxMDQwKSB8IDA7XG4gICAgICAgICAgICAgICAgdiA9IChqICsgMTA0OCkgfCAwO1xuICAgICAgICAgICAgICAgIHcgPSBmO1xuICAgICAgICAgICAgICAgIGYgPSBoO1xuICAgICAgICAgICAgICAgIGggPSBrO1xuICAgICAgICAgICAgICAgIGsgPSBsO1xuICAgICAgICAgICAgICAgIGwgPSBuO1xuICAgICAgICAgICAgICAgIG4gPSBvO1xuICAgICAgICAgICAgICAgIG8gPSBwO1xuICAgICAgICAgICAgICAgIHAgPSBxO1xuICAgICAgICAgICAgICAgIHEgPSAwO1xuICAgICAgICAgICAgICAgIGlmICgoZiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgeCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIHkgPSB4O1xuICAgICAgICAgICAgICAgICAgICBpID0gajtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHkgfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB6ID0gYmgoZikgfCAwO1xuICAgICAgICAgICAgICAgIEEgPSB6O1xuICAgICAgICAgICAgICAgIGlmICgoeiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgeiA9IGNbbSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIC8vIF9mcHJpbnRmO1xuICAgICAgICAgICAgICAgICAgICBhcihcbiAgICAgICAgICAgICAgICAgICAgICAgIDY1MTIsXG4gICAgICAgICAgICAgICAgICAgICAgICAoKHogPSBpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChpID0gKGkgKyAxKSB8IDApLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGkgPSAoaSArIDcpICYgLTgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGNbeiA+PiAyXSA9IDApLFxuICAgICAgICAgICAgICAgICAgICAgICAgeikgfCAwXG4gICAgICAgICAgICAgICAgICAgICkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBpID0gejtcbiAgICAgICAgICAgICAgICAgICAgcSA9IDE7XG4gICAgICAgICAgICAgICAgICAgIEIgPSAwO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChjWygxMDQ4ICsgKEIgPDwgMikpID4+IDJdIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgeiA9IGMxKGYgfCAwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKCh6ICsgKGMxKGNbKDEwNDggKyAoQiA8PCAyKSkgPj4gMl0gfCAwKSB8IDApKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID4+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDI0XG4gICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6ID0gciB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQyA9IGY7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYzIoeiB8IDAsIEMgfCAwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQyA9IHIgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHogPSBjWygxMDQ4ICsgKEIgPDwgMikpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjMyhDIHwgMCwgeiB8IDApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6ID0gYmgociB8IDApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBBID0gejtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKHogfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEQgPSA0NjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgQiA9IChCICsgMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICgoRCB8IDApID09IDQ2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBxID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGYgPSByIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoKHEgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHggPSAwO1xuICAgICAgICAgICAgICAgICAgICB5ID0geDtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGo7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB5IHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoMjM5ID09IChhbihyIHwgMCwgMSwgMjM5LCBBIHwgMCkgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChjNChyIHwgMCwgNjI0OCwgMjIpIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYzQociB8IDAsIDU4ODgsIDIyKSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYVsociArIDgyKSB8IDBdIHwgMCkgIT0gMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGFbKHIgKyA4MikgfCAwXSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHggPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5ID0geDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGo7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB5IHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGFbKHIgKyAxNTEpIHwgMF0gfCAwKSAhPSAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYVsociArIDE1MSkgfCAwXSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHggPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5ID0geDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGo7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB5IHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHEgPSBiaSg4KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBjW3EgPj4gMl0gPSBhWyhyICsgMTk4KSB8IDBdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbKHEgKyA0KSA+PiAyXSA9IGJpKCgoY1txID4+IDJdIHwgMCkgKiAxMTYpIHwgMCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgQiA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoQiB8IDApID49IChjW3EgPj4gMl0gfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEID0gMTYyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYUIoQSB8IDAsIDcsIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoMSAhPSAoYW4ocyB8IDAsIDEsIDEsIEEgfCAwKSB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEQgPSA2NjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYgPSAoKGNbKHEgKyA0KSA+PiAyXSB8IDApICsgKChCICogMTE2KSB8IDApKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDEgIT0gKGFuKHQgfCAwLCA0LCAxLCBBIHwgMCkgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEID0gNzM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhmICsgOCkgPj4gMl0gPSBjW3QgPj4gMl07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDEgIT0gKGFuKHQgfCAwLCA0LCAxLCBBIHwgMCkgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEID0gNzU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW2YgPj4gMl0gPSBjW3QgPj4gMl07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDEgIT0gKGFuKHQgfCAwLCA0LCAxLCBBIHwgMCkgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEID0gNzc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhmICsgNCkgPj4gMl0gPSBjW3QgPj4gMl07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDEgIT0gKGFuKHUgfCAwLCAyLCAxLCBBIHwgMCkgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEID0gNzk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhmICsgMTIpID4+IDJdID0gZVt1ID4+IDFdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoMSAhPSAoYW4odCB8IDAsIDQsIDEsIEEgfCAwKSB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEQgPSA4MTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGYgKyAyNCkgPj4gMl0gPSBjW3QgPj4gMl07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDEgIT0gKGFuKHQgfCAwLCA0LCAxLCBBIHwgMCkgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEID0gODM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhmICsgMjgpID4+IDJdID0gY1t0ID4+IDJdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgxICE9IChhbih0IHwgMCwgNCwgMSwgQSB8IDApIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRCA9IDg1O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soZiArIDMyKSA+PiAyXSA9IGNbdCA+PiAyXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhmICsgMTYpID4+IDJdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhmICsgMjApID4+IDJdID0gMTI3O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFCKEEgfCAwLCAyLCAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDEgIT0gKGFuKHYgfCAwLCAxLCAxLCBBIHwgMCkgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEID0gODc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhW3IgfCAwXSA9IGFbdl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoaCB8IDApID09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFbKGYgKyAxMTEpIHwgMF0gPSAoKGFbciB8IDBdIDw8IDMpICsgNCkgJiAxMjc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYVsoZiArIDExMSkgfCAwXSA9IGggJiAxMjc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgxOCAhPSAoYW4ociB8IDAsIDEsIDE4LCBBIHwgMCkgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEID0gOTI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYVsociArIDEzKSB8IDBdIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChhWyhyICsgMTQpIHwgMF0gfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRCA9IDk1O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soZiArIDkyKSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm0odywgYVsociArIDEyKSB8IDBdIHwgMCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soZiArIDk2KSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYm4odywgYVsociArIDEzKSB8IDBdIHwgMCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYVsoZiArIDEwOCkgfCAwXSA9IGFbKHIgKyAxNCkgfCAwXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEID0gOTU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKEQgfCAwKSA9PSA5NSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYVsoZiArIDEwOCkgfCAwXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGYgKyA5NikgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhmICsgOTIpID4+IDJdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGFbKHIgKyAxNikgfCAwXSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYVsociArIDE3KSB8IDBdIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEQgPSA5OTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGYgKyAxMDQpID4+IDJdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBibyh3LCBhWyhyICsgMTYpIHwgMF0gfCAwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhmICsgMTAwKSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHcsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFbKHIgKyAxNSkgfCAwXSB8IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGYgKyAxMDQpID4+IDJdIHwgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYVsoZiArIDEwOSkgfCAwXSA9IGFbKHIgKyAxNykgfCAwXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEID0gOTk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKEQgfCAwKSA9PSA5OSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYVsoZiArIDEwOSkgfCAwXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGYgKyAxMDQpID4+IDJdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soZiArIDEwMCkgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoMSAhPSAoYW4odiB8IDAsIDEsIDEsIEEgfCAwKSB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEQgPSAxMDI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhWyhmICsgMTEwKSB8IDBdID0gYVt2XSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYUIoQSB8IDAsIDQwLCAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChsIHwgMCkgIT0gLTEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYVsoZiArIDExMikgfCAwXSA9IGwgJiAyNTU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYVsoZiArIDExMikgfCAwXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoKGFbKGYgKyAxMTApIHwgMF0gJiA0KSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeiA9IChmICsgMTEwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFbel0gPSAoZFt6XSB8IDMyKSAmIDI1NTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKG4gfCAwKSA9PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKChhWyhmICsgMTEwKSB8IDBdICYgNjApIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeiA9IChmICsgMTEwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhW3pdID0gZFt6XSAmIC02MSAmIDI1NTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgobyB8IDApID09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChhWyhmICsgMTEwKSB8IDBdICYgNjQpIHwgMCkgIT0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeiA9IChmICsgMTEwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFbel0gPSBkW3pdICYgLTY1ICYgMjU1O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgobyB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoKGFbKGYgKyAxMTApIHwgMF0gJiAyOCkgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGM0KHIgfCAwLCA1NTEyLCA2KSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYVsociArIDExKSB8IDBdIHwgMCkgPj1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEQgPSAxMjA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChhWyhmICsgMTEwKSB8IDBdICYgMzIpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB6ID0gKGYgKyAxMTApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhW3pdID0gZFt6XSAmIC02NSAmIDI1NTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEQgPSAxMjA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKEQgfCAwKSA9PSAxMjApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRCA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHogPSAoZiArIDExMCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhW3pdID0gZFt6XSAmIC02NSAmIDI1NTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHogPSAoZiArIDExMCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFbel0gPSBkW3pdICYgLTk3ICYgMjU1O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEUgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoRSB8IDApID49IDYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGYgKyAzNiArIChFIDw8IDIpKSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicSh3LCBhWyhyICsgRSkgfCAwXSB8IDApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soZiArIDYwICsgKEUgPDwgMikpID4+IDJdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyKGFbKHIgKyAoRSArIDYpKSB8IDBdIHwgMCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFID0gKEUgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGYgKyA4OCkgPj4gMl0gPSBiaShjWyhmICsgOCkgPj4gMl0gfCAwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhbihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGYgKyA4OCkgPj4gMl0gfCAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soZiArIDgpID4+IDJdIHwgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBIHwgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEQgPSAxMzI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKChhWyhmICsgMTEwKSB8IDBdICYgMSkgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHogPSBjWyhmICsgOCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDID0gY1soZiArIDg4KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEYgPSBiaShjWyhmICsgOCkgPj4gMl0gPDwgMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHID0gRjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSCA9IEY7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGID0gejtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHogPSAoRiAtIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoRiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEYgPSBDO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQyA9IChGICsgMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSSA9IEg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBIID0gKEkgKyAyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiW0kgPj4gMV0gPSAoKGFbRl0gJiAyNTUpIDw8IDgpICYgNjU1MzU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQyA9IGNbKGYgKyA4OCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhmICsgODgpID4+IDJdID0gRztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYzAoQyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEggPSAoZiArIDgpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tIID4+IDJdID0gY1tIID4+IDJdIDw8IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEggPSBmIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tIID4+IDJdID0gY1tIID4+IDJdIDw8IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEggPSAoZiArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tIID4+IDJdID0gY1tIID4+IDJdIDw8IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoKGFbKGYgKyAxMTApIHwgMF0gJiAyKSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSCA9ICgoY1soZiArIDgpID4+IDJdIHwgMCkgLyAyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHogPSBjWyhmICsgODgpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEYgPSBIO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSCA9IChGIC0gMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChGIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRiA9IHo7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB6ID0gKEYgKyAyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiW0YgPj4gMV0gPSAoYltGID4+IDFdIF4gMzI3NjgpICYgNjU1MzU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCgoYVsoZiArIDExMCkgfCAwXSAmIDE2KSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnMoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhmICsgODgpID4+IDJdIHwgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGYgKyA4KSA+PiAyXSB8IDApIC8gMikgfCAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHogPSBjW2YgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW2YgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbKGYgKyA4KSA+PiAyXSB8IDApIC1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjWyhmICsgNCkgPj4gMl0gfCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soZiArIDQpID4+IDJdID0gKGNbKGYgKyA4KSA+PiAyXSB8IDApIC0gejtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeiA9IChmICsgMTEwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFbel0gPSBkW3pdICYgLTE3ICYgMjU1O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB6ID0gKGYgKyAxMTApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYVt6XSA9IChkW3pdIHwgNCkgJiAyNTU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoayB8IDApICE9IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdbKGYgKyA4NCkgPj4gMl0gPSArKGsgfCAwKSAvIDEwMC4wO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHogPSAoKGNbKGYgKyA4KSA+PiAyXSB8IDApIC8gMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBIID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQyA9IGNbKGYgKyA4OCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRyA9IHo7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB6ID0gKEcgLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKEcgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHID0gQztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEMgPSAoRyArIDIpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEYgPSBiW0cgPj4gMV0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCgoKEYgPDwgMTYpID4+IDE2KSB8IDApIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEYgPSAtKChGIDw8IDE2KSA+PiAxNikgJiA2NTUzNTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChGIDw8IDE2KSA+PiAxNikgfCAwKSA+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgoSCA8PCAxNikgPj4gMTYpIHwgMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEggPSBGO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdbKGYgKyA4NCkgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzI3NjguMCAvICsoKChIIDw8IDE2KSA+PiAxNikgfCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQyA9IChmICsgOCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbQyA+PiAyXSA9ICgoY1tDID4+IDJdIHwgMCkgLyAyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQyA9IGYgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbQyA+PiAyXSA9ICgoY1tDID4+IDJdIHwgMCkgLyAyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQyA9IChmICsgNCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbQyA+PiAyXSA9ICgoY1tDID4+IDJdIHwgMCkgLyAyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQyA9IChmICsgOCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbQyA+PiAyXSA9IGNbQyA+PiAyXSA8PCAxMjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBDID0gZiB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tDID4+IDJdID0gY1tDID4+IDJdIDw8IDEyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEMgPSAoZiArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW0MgPj4gMl0gPSBjW0MgPj4gMl0gPDwgMTI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgQyA9IGYgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbQyA+PiAyXSA9IGNbQyA+PiAyXSB8ICgoYVtzXSAmIDE1KSA8PCA4KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBDID0gKGYgKyA0KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tDID4+IDJdID0gY1tDID4+IDJdIHwgKCgoZFtzXSA+PiA0KSAmIDE1KSA8PCA4KTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYVsoZiArIDExMikgfCAwXSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoKGFbKGYgKyAxMTApIHwgMF0gJiA0KSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNGKHcsIGYpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChwIHwgMCkgPT0gMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhmICsgOCkgPj4gMl0gPSBjWyhmICsgNCkgPj4gMl07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEIgPSAoQiArIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoRCB8IDApICE9IDY2KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoRCB8IDApICE9IDczKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKEQgfCAwKSAhPSA3NSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoRCB8IDApICE9IDc3KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoRCB8IDApICE9IDc5KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKEQgfCAwKSAhPSA4MSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoRCB8IDApICE9IDgzKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoRCB8IDApICE9IDg1KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKEQgfCAwKSAhPSA4NylcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoRCB8IDApICE9IDkyKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEQgfCAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChEIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTMyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoRCB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeCA9IHE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeSA9IHg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGo7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgRSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoRSB8IDApID49IChCIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGMwKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjWyhxICsgNCkgPj4gMl0gfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChFICogMTE2KSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4OCkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfCAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBFID0gKEUgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBjMChjWyhxICsgNCkgPj4gMl0gfCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGMwKHEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgeCA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICB5ID0geDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGkgPSBqO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHkgfCAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgeCA9IDA7XG4gICAgICAgICAgICAgICAgeSA9IHg7XG4gICAgICAgICAgICAgICAgaSA9IGo7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHkgfCAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYm0oYSwgYikge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGQgPSAwLFxuICAgICAgICAgICAgICAgICAgICBlID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZiA9IDA7XG4gICAgICAgICAgICAgICAgZCA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IGI7XG4gICAgICAgICAgICAgICAgaWYgKChhIDw8IDI0KSA+PiAyNCAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGIgPSAoKChjWyhkICsgMTMwNjApID4+IDJdIHwgMCkgKiAzOCkgfCAwKSA8PCAxNjtcbiAgICAgICAgICAgICAgICAgICAgZSA9ICgoYiB8IDApIC8gKF8oY1soZCArIDQpID4+IDJdIHwgMCwgYSAmIDI1NSkgfCAwKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBmID0gZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGYgfCAwO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGUgPSAwO1xuICAgICAgICAgICAgICAgICAgICBmID0gZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGYgfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGJuKGEsIGIpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBkID0gMDtcbiAgICAgICAgICAgICAgICBkID0gYTtcbiAgICAgICAgICAgICAgICBhID0gKF8oY1soZCArIDEzMDYwKSA+PiAyXSA8PCAxMCwgYiAmIDI1NSkgfCAwKSA8PCA1O1xuICAgICAgICAgICAgICAgIHJldHVybiAoXG4gICAgICAgICAgICAgICAgICAgICgoYSB8IDApIC8gKCgoY1soZCArIDQpID4+IDJdIHwgMCkgKiAzOCkgfCAwIHwgMCkpIHwgMCB8IDBcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYm8oYSwgYikge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgcmV0dXJuIChcbiAgICAgICAgICAgICAgICAgICAgKCgoKGNbKGEgKyA0KSA+PiAyXSB8IDApICogMzgpIHwgMCB8IDApIC9cbiAgICAgICAgICAgICAgICAgICAgICAgICgoKChiICYgMjU1KSA8PCAxKSA8PCA1KSB8IDApKSB8XG4gICAgICAgICAgICAgICAgICAgIDAgfFxuICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGJwKGEsIGIsIGQpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGYgPSAwLFxuICAgICAgICAgICAgICAgICAgICBnID0gMDtcbiAgICAgICAgICAgICAgICBlID0gYjtcbiAgICAgICAgICAgICAgICBpZiAoKGUgPDwgMjQpID4+IDI0ICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgZiA9IH5+KFxuICAgICAgICAgICAgICAgICAgICAgICAgKCsoZCB8IDApICogMzguMCAqIDY1NTM2LjApIC9cbiAgICAgICAgICAgICAgICAgICAgICAgICsoXyhjWyhhICsgNCkgPj4gMl0gfCAwLCBlICYgMjU1KSB8IDApXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIGcgPSBmO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZyB8IDA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZiA9IDA7XG4gICAgICAgICAgICAgICAgICAgIGcgPSBmO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZyB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYnEoYSwgYikge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGQgPSAwO1xuICAgICAgICAgICAgICAgIGQgPSBhO1xuICAgICAgICAgICAgICAgIGEgPSBiO1xuICAgICAgICAgICAgICAgIGIgPSAoMyAtICgoKGEgJiAyNTUpID4+IDYpICYgMykpIHwgMDtcbiAgICAgICAgICAgICAgICBiID0gKGIgKiAzKSB8IDA7XG4gICAgICAgICAgICAgICAgYiA9IChhICYgNjMpIDw8IGI7XG4gICAgICAgICAgICAgICAgYiA9XG4gICAgICAgICAgICAgICAgICAgIF8oXG4gICAgICAgICAgICAgICAgICAgICAgICAoKChiICogNDQxMDApIHwgMCB8IDApIC8gKGNbKGQgKyA0KSA+PiAyXSB8IDApKSB8IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICBjWyhkICsgMTMwNjApID4+IDJdIHwgMFxuICAgICAgICAgICAgICAgICAgICApIHwgMDtcbiAgICAgICAgICAgICAgICByZXR1cm4gKGIgPDwgMTApIHwgMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGJyKGEpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgcmV0dXJuICgoYSAmIDI1NSkgPDwgMjIpIHwgMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGJzKGEsIGMsIGQpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgYyA9IGMgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGYgPSAwO1xuICAgICAgICAgICAgICAgIGUgPSBhO1xuICAgICAgICAgICAgICAgIGEgPSBjO1xuICAgICAgICAgICAgICAgIGMgPSBkO1xuICAgICAgICAgICAgICAgIGQgPSAoZSArIChjIDw8IDEpKSB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IChlICsgKGEgPDwgMSkpIHwgMDtcbiAgICAgICAgICAgICAgICBjID0gKGMgLSBhKSB8IDA7XG4gICAgICAgICAgICAgICAgYyA9ICgoYyB8IDApIC8gMikgfCAwO1xuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGEgPSBjO1xuICAgICAgICAgICAgICAgICAgICBjID0gKGEgLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoYSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGEgPSBiW2UgPj4gMV0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBmID0gZTtcbiAgICAgICAgICAgICAgICAgICAgZSA9IChmICsgMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICBiW2YgPj4gMV0gPSBiW2QgPj4gMV0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBmID0gZDtcbiAgICAgICAgICAgICAgICAgICAgZCA9IChmIC0gMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICBiW2YgPj4gMV0gPSBhO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBtaWRfc29uZ19nZXRfbnVtX21pc3NpbmdfaW5zdHJ1bWVudHNcbiAgICAgICAgICAgIC8vIHRha2VzIGEgbnVtYmVyIChhKVxuICAgICAgICAgICAgLy8gcmV0dXJucyBhIG51bWJlclxuICAgICAgICAgICAgZnVuY3Rpb24gYnQoYSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICByZXR1cm4gY1soYSArIDEzMTM2KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIC8vIG1pZF9zb25nX2dldF9taXNzaW5nX2luc3RydW1lbnRcbiAgICAgICAgICAgIGZ1bmN0aW9uIGJ1KGEsIGIpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBkID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGYgPSAwO1xuICAgICAgICAgICAgICAgIGQgPSBhO1xuICAgICAgICAgICAgICAgIGEgPSBiO1xuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChhIHwgMCkgPj0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgLy8gc3RvcHMgd2hlbiByZWFjaGVkIGxhc3QgaW5zdHJ1bWVudFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChhIHwgMCkgPj0gKGNbKGQgKyAxMzEzNikgPj4gMl0gfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gcGF0aCB0byBwYXRjaCBmaWxlXG4gICAgICAgICAgICAgICAgICAgICAgICBlID0gY1soZCArIDEzMTQwICsgKGEgPDwgMikpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGYgPSBlO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGYgfCAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgZSA9IDA7XG4gICAgICAgICAgICAgICAgZiA9IGU7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGYgfCAwO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAvLyByZXR1cm5zIG51bWJlciBvZiBtaXNzaW5nIHBhdGNoZXNcbiAgICAgICAgICAgIGZ1bmN0aW9uIGJ2KGEpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGIgPSAwLFxuICAgICAgICAgICAgICAgICAgICBkID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZSA9IDA7XG4gICAgICAgICAgICAgICAgYiA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IDEyODtcbiAgICAgICAgICAgICAgICBkID0gMDtcbiAgICAgICAgICAgICAgICBjWyhiICsgMTMxMzYpID4+IDJdID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICBlID0gYTtcbiAgICAgICAgICAgICAgICAgICAgYSA9IChlIC0gMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGUgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAvLyBnZXQgbnVtYmVyIG9mIGluc3RydW1lbnQgcGF0Y2hlc1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGNbKGIgKyAyOCArIChhIDw8IDIpKSA+PiAyXSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGQgPSAoZCArIChidyhiLCAwLCBhKSB8IDApKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgLy8gZ2V0IG51bWJlciBvZiBkcnVtIHBhdGNoZXNcbiAgICAgICAgICAgICAgICAgICAgaWYgKChjWyhiICsgNTQwICsgKGEgPDwgMikpID4+IDJdIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZCA9IChkICsgKGJ3KGIsIDEsIGEpIHwgMCkpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gZCB8IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBidyhhLCBiLCBkKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBkID0gZCB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGggPSAwLFxuICAgICAgICAgICAgICAgICAgICBqID0gMCxcbiAgICAgICAgICAgICAgICAgICAgayA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGwgPSAwLFxuICAgICAgICAgICAgICAgICAgICBuID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHAgPSAwLFxuICAgICAgICAgICAgICAgICAgICBxID0gMCxcbiAgICAgICAgICAgICAgICAgICAgciA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHMgPSAwLFxuICAgICAgICAgICAgICAgICAgICB0ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgdSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHYgPSAwLFxuICAgICAgICAgICAgICAgICAgICB3ID0gMDtcbiAgICAgICAgICAgICAgICBlID0gaTtcbiAgICAgICAgICAgICAgICBmID0gYTtcbiAgICAgICAgICAgICAgICBhID0gYjtcbiAgICAgICAgICAgICAgICBiID0gZDtcbiAgICAgICAgICAgICAgICBkID0gMDtcbiAgICAgICAgICAgICAgICBpZiAoKGEgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGcgPSBjWyhmICsgNTQwICsgKGIgPDwgMikpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBnID0gY1soZiArIDI4ICsgKGIgPDwgMikpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaCA9IGc7XG4gICAgICAgICAgICAgICAgaWYgKChoIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBqID0gMDtcbiAgICAgICAgICAgICAgICAgICAgayA9IGo7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBlO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gayB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGcgPSAwO1xuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZyB8IDApID49IDEyOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChjWyhoICsgNCArIChnIDw8IDIpKSA+PiAyXSB8IDApID09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soaCArIDQgKyAoZyA8PCAyKSkgPj4gMl0gPSBiQihmLCBhLCBiLCBnKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChjWyhoICsgNCArIChnIDw8IDIpKSA+PiAyXSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbKChjW2ggPj4gMl0gfCAwKSArICgoZyAqIDI4KSB8IDApKSA+PiAyXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGwgPSBmO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKChjW2ggPj4gMl0gfCAwKSArICgoZyAqIDI4KSB8IDApKSA+PiAyXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvID0gKGEgfCAwKSAhPSAwID8gMSA6IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbaCA+PiAyXSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChnICogMjgpIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMikgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbaCA+PiAyXSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChnICogMjgpIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjW2ggPj4gMl0gfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoZyAqIDI4KSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNCkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0xXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgciA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjW2ggPj4gMl0gfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGcgKiAyOCkgfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChhIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMgPSBnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzID0gLTE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByID0gcztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbaCA+PiAyXSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChnICogMjgpIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNikgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0xXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdCA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjW2ggPj4gMl0gfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGcgKiAyOCkgfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNikgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQgPSAoYSB8IDApICE9IDAgPyAxIDogLTE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjW2ggPj4gMl0gfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoZyAqIDI4KSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjApID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1toID4+IDJdIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChnICogMjgpIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjApID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ID0gKGEgfCAwKSAhPSAwID8gMSA6IC0xO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHYgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmwoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1toID4+IDJdIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChnICogMjgpIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjQpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8IDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhoICsgNCArIChnIDw8IDIpKSA+PiAyXSA9IHY7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgodiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHYgPSBjW20gPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjW2ggPj4gMl0gfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGcgKiAyOCkgfCAwKSkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHByaW50cyAnTWlzc2luZyBwYXRjaDogYXJhY2huby04OC5wYXQnIG9yICdNaXNzaW5nIHBhdGNoOiBNVDMyRHJ1bXMvbXQzMmRydW0tNi5wYXQnXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2IHwgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1MTIwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgodiA9IGkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpID0gKGkgKyA4KSB8IDApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjW3YgPj4gMl0gPSBxKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2KSB8IDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IHY7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGNbKGYgKyAxMzEzNikgPj4gMl0gfCAwKSA8IDI1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSBjW20gPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAgPSBjWyhmICsgMTMxMzYpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0gdjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMzE0MCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1soZiArIDEzMTM2KSA+PiAyXSA8PCAyKSkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1toID4+IDJdIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoZyAqIDI4KSB8IDApKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2ID0gKGYgKyAxMzEzNikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbdiA+PiAyXSA9IChjW3YgPj4gMl0gfCAwKSArIDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gKGQgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGIgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGEgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1soZiArIDU0MCkgPj4gMl0gfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGcgPDwgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1soZiArIDU0MCkgPj4gMl0gfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGcgPDwgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gLTE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjWyhmICsgMjgpID4+IDJdIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChnIDw8IDIpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA9PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGYgKyAyOCkgPj4gMl0gfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGcgPDwgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gLTE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGggKyA0ICsgKGcgPDwgMikpID4+IDJdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IChkICsgMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3ID0gMjQ2O1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3ID0gMjQ2O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCh3IHwgMCkgPT0gMjQ2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB3ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBnID0gKGcgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGogPSBkO1xuICAgICAgICAgICAgICAgIGsgPSBqO1xuICAgICAgICAgICAgICAgIGkgPSBlO1xuICAgICAgICAgICAgICAgIHJldHVybiBrIHwgMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGJ4KGEpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGIgPSAwLFxuICAgICAgICAgICAgICAgICAgICBkID0gMDtcbiAgICAgICAgICAgICAgICBiID0gYTtcbiAgICAgICAgICAgICAgICBhID0gMTI4O1xuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGQgPSBhO1xuICAgICAgICAgICAgICAgICAgICBhID0gKGQgLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZCB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICgoY1soYiArIDI4ICsgKGEgPDwgMikpID4+IDJdIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnkoYiwgMCwgYSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKChjWyhiICsgNTQwICsgKGEgPDwgMikpID4+IDJdIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnkoYiwgMSwgYSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYnkoYSwgYiwgZCkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgZCA9IGQgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBlID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZiA9IDA7XG4gICAgICAgICAgICAgICAgZSA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IGQ7XG4gICAgICAgICAgICAgICAgaWYgKChiIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBmID0gY1soZSArIDU0MCArIChhIDw8IDIpKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZiA9IGNbKGUgKyAyOCArIChhIDw8IDIpKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGEgPSBmO1xuICAgICAgICAgICAgICAgIGYgPSAwO1xuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZiB8IDApID49IDEyOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKChjWyhhICsgNCArIChmIDw8IDIpKSA+PiAyXSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY1soYSArIDQgKyAoZiA8PCAyKSkgPj4gMl0gfCAwKSAhPSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJBKGNbKGEgKyA0ICsgKGYgPDwgMikpID4+IDJdIHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBjWyhhICsgNCArIChmIDw8IDIpKSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZiA9IChmICsgMSkgfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBieihhLCBiKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBmID0gMDtcbiAgICAgICAgICAgICAgICBkID0gYTtcbiAgICAgICAgICAgICAgICBhID0gYmwoZCwgYiwgMCwgLTEsIC0xLCAtMSwgMCwgMCwgMCkgfCAwO1xuICAgICAgICAgICAgICAgIGlmICgoYSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgY1soZCArIDEwNTIpID4+IDJdID0gYTtcbiAgICAgICAgICAgICAgICAgICAgY1soZCArIDEwNTYpID4+IDJdID0gLTE7XG4gICAgICAgICAgICAgICAgICAgIGUgPSAwO1xuICAgICAgICAgICAgICAgICAgICBmID0gZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGYgfCAwO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGUgPSAtMTtcbiAgICAgICAgICAgICAgICAgICAgZiA9IGU7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBiQShhKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBiID0gMDtcbiAgICAgICAgICAgICAgICBiID0gYTtcbiAgICAgICAgICAgICAgICBpZiAoKGIgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYSA9IDA7XG4gICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChhIHwgMCkgPj0gKGNbYiA+PiAyXSB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjMChcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbKChjWyhiICsgNCkgPj4gMl0gfCAwKSArICgoYSAqIDExNikgfCAwKSArIDg4KSA+PiAyXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICBhID0gKGEgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGMwKGNbKGIgKyA0KSA+PiAyXSB8IDApO1xuICAgICAgICAgICAgICAgIGMwKGIpO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGJCKGEsIGIsIGQsIGUpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGYgPSAwLFxuICAgICAgICAgICAgICAgICAgICBnID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGkgPSAwLFxuICAgICAgICAgICAgICAgICAgICBqID0gMDtcbiAgICAgICAgICAgICAgICBmID0gYTtcbiAgICAgICAgICAgICAgICBhID0gYjtcbiAgICAgICAgICAgICAgICBiID0gZDtcbiAgICAgICAgICAgICAgICBkID0gZTtcbiAgICAgICAgICAgICAgICBpZiAoKGNbKGYgKyAyNCkgPj4gMl0gfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGcgPSAwO1xuICAgICAgICAgICAgICAgICAgICBoID0gZztcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGggfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBhID0gKGEgfCAwKSAhPSAwID8gLTIxNDc0ODM2NDggOiAwO1xuICAgICAgICAgICAgICAgIGUgPSAwO1xuICAgICAgICAgICAgICAgIEwzNjg6IHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgIGUgPj4+IDAgPj1cbiAgICAgICAgICAgICAgICAgICAgICAgIChjWygoY1soZiArIDI0KSA+PiAyXSB8IDApICsgNCkgPj4gMl0gfCAwKSA+Pj4gMFxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGkgPVxuICAgICAgICAgICAgICAgICAgICAgICAgKChjWygoY1soZiArIDI0KSA+PiAyXSB8IDApICsgOCkgPj4gMl0gfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKChlICogMjApIHwgMCkpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbKChjWyhpICsgNCkgPj4gMl0gfCAwKSArIDQpID4+IDJdICZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLTIxNDc0ODM2NDgpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYSB8IDApXG4gICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKChjWygoY1soaSArIDQpID4+IDJdIHwgMCkgKyA0KSA+PiAyXSB8IDApID4+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOCkgJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjU1KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYiB8IDApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjWygoY1soaSArIDQpID4+IDJdIHwgMCkgKyA4KSA+PiAyXSB8IDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkIHwgMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaiA9IDI5NTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDM2ODtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICBlID0gKGUgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChlIHwgMCkgPT0gKGNbKChjWyhmICsgMjQpID4+IDJdIHwgMCkgKyA0KSA+PiAyXSB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGIgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlID4+PiAwID49XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjWygoY1soZiArIDI0KSA+PiAyXSB8IDApICsgNCkgPj4gMl0gfCAwKSA+Pj4gMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1soKGNbKGYgKyAyNCkgPj4gMl0gfCAwKSArIDgpID4+IDJdIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChlICogMjApIHwgMCkpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1soKGNbKGkgKyA0KSA+PiAyXSB8IDApICsgNCkgPj4gMl0gJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLTIxNDc0ODM2NDgpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhIHwgMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbKChjWyhpICsgNCkgPj4gMl0gfCAwKSArIDgpID4+IDJdIHwgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkIHwgMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqID0gMzA0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZSA9IChlICsgMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgaWYgKChlIHwgMCkgPT0gKGNbKChjWyhmICsgMjQpID4+IDJdIHwgMCkgKyA0KSA+PiAyXSB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgIGcgPSAwO1xuICAgICAgICAgICAgICAgICAgICBoID0gZztcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGggfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBqID0gYmkoOCkgfCAwO1xuICAgICAgICAgICAgICAgIGNbaiA+PiAyXSA9IGNbY1soaSArIDQpID4+IDJdID4+IDJdO1xuICAgICAgICAgICAgICAgIGNbKGogKyA0KSA+PiAyXSA9IGJpKCgoY1tqID4+IDJdIHwgMCkgKiAxMTYpIHwgMCkgfCAwO1xuICAgICAgICAgICAgICAgIGM1KGNbKGogKyA0KSA+PiAyXSB8IDAsIDAsICgoY1tqID4+IDJdIHwgMCkgKiAxMTYpIHwgMCB8IDApO1xuICAgICAgICAgICAgICAgIGUgPSAwO1xuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlID4+PiAwID49IChjW2NbKGkgKyA0KSA+PiAyXSA+PiAyXSB8IDApID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBiQyhmLCAoKGNbKGogKyA0KSA+PiAyXSB8IDApICsgKChlICogMTE2KSB8IDApKSB8IDAsIGksIGUpO1xuICAgICAgICAgICAgICAgICAgICBlID0gKGUgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGcgPSBqO1xuICAgICAgICAgICAgICAgIGggPSBnO1xuICAgICAgICAgICAgICAgIHJldHVybiBoIHwgMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGJDKGIsIGYsIGgsIGkpIHtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgZiA9IGYgfCAwO1xuICAgICAgICAgICAgICAgIGggPSBoIHwgMDtcbiAgICAgICAgICAgICAgICBpID0gaSB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGogPSAwLFxuICAgICAgICAgICAgICAgICAgICBrID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG0gPSAwLFxuICAgICAgICAgICAgICAgICAgICBuID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHAgPSAwLFxuICAgICAgICAgICAgICAgICAgICBxID0gMCxcbiAgICAgICAgICAgICAgICAgICAgciA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHMgPSAwLFxuICAgICAgICAgICAgICAgICAgICB0ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgdSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHYgPSAwLFxuICAgICAgICAgICAgICAgICAgICB3ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgeCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHkgPSAwLFxuICAgICAgICAgICAgICAgICAgICB6ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgQSA9IDAuMCxcbiAgICAgICAgICAgICAgICAgICAgQiA9IDAuMCxcbiAgICAgICAgICAgICAgICAgICAgQyA9IDAuMCxcbiAgICAgICAgICAgICAgICAgICAgRCA9IDAuMDtcbiAgICAgICAgICAgICAgICBqID0gYjtcbiAgICAgICAgICAgICAgICBiID0gZjtcbiAgICAgICAgICAgICAgICBmID0gaDtcbiAgICAgICAgICAgICAgICBoID0gKChjWyhmICsgOCkgPj4gMl0gfCAwKSArICgoaSAqIDI0KSB8IDApKSB8IDA7XG4gICAgICAgICAgICAgICAgaSA9XG4gICAgICAgICAgICAgICAgICAgICgoY1soKGNbKGogKyAyNCkgPj4gMl0gfCAwKSArIDIwKSA+PiAyXSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICgoKGNbKChjWyhoICsgNCkgPj4gMl0gfCAwKSArIDgpID4+IDJdIHwgMCkgKiAyMCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApKSB8XG4gICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgayA9ICgxMDU2ICsgKChlW2NbaCA+PiAyXSA+PiAxXSB8IDApIDw8IDIpKSB8IDA7XG4gICAgICAgICAgICAgICAgY1soYiArIDI0KSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgIGRba10gfFxuICAgICAgICAgICAgICAgICAgICAoZFsoayArIDEpIHwgMF0gPDwgOCkgfFxuICAgICAgICAgICAgICAgICAgICAoZFsoayArIDIpIHwgMF0gPDwgMTYpIHxcbiAgICAgICAgICAgICAgICAgICAgKGRbKGsgKyAzKSB8IDBdIDw8IDI0KTtcbiAgICAgICAgICAgICAgICBrID0gKDEwNTYgKyAoKGVbKChjW2ggPj4gMl0gfCAwKSArIDIpID4+IDFdIHwgMCkgPDwgMikpIHwgMDtcbiAgICAgICAgICAgICAgICBjWyhiICsgMjgpID4+IDJdID1cbiAgICAgICAgICAgICAgICAgICAgZFtrXSB8XG4gICAgICAgICAgICAgICAgICAgIChkWyhrICsgMSkgfCAwXSA8PCA4KSB8XG4gICAgICAgICAgICAgICAgICAgIChkWyhrICsgMikgfCAwXSA8PCAxNikgfFxuICAgICAgICAgICAgICAgICAgICAoZFsoayArIDMpIHwgMF0gPDwgMjQpO1xuICAgICAgICAgICAgICAgIGsgPVxuICAgICAgICAgICAgICAgICAgICAoMTA1NiArICgoZVsoKGNbKGggKyA4KSA+PiAyXSB8IDApICsgNCkgPj4gMV0gfCAwKSA8PCAyKSkgfFxuICAgICAgICAgICAgICAgICAgICAwO1xuICAgICAgICAgICAgICAgIGNbKGIgKyAzMikgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICBkW2tdIHxcbiAgICAgICAgICAgICAgICAgICAgKGRbKGsgKyAxKSB8IDBdIDw8IDgpIHxcbiAgICAgICAgICAgICAgICAgICAgKGRbKGsgKyAyKSB8IDBdIDw8IDE2KSB8XG4gICAgICAgICAgICAgICAgICAgIChkWyhrICsgMykgfCAwXSA8PCAyNCk7XG4gICAgICAgICAgICAgICAgY1soYiArIDE2KSA+PiAyXSA9IGVbKChjW2ggPj4gMl0gfCAwKSArIDQpID4+IDFdIHwgMDtcbiAgICAgICAgICAgICAgICBjWyhiICsgMjApID4+IDJdID0gZVsoKGNbaCA+PiAyXSB8IDApICsgNikgPj4gMV0gfCAwO1xuICAgICAgICAgICAgICAgIGFbKGIgKyAxMTApIHwgMF0gPSAxO1xuICAgICAgICAgICAgICAgIGNbKGIgKyAxMikgPj4gMl0gPSBjWygoY1tpID4+IDJdIHwgMCkgKyA0KSA+PiAyXTtcbiAgICAgICAgICAgICAgICBjWyhiICsgOCkgPj4gMl0gPSAoKChjWyhpICsgOCkgPj4gMl0gfCAwKSA+Pj4gMCkgLyAyKSB8IDA7XG4gICAgICAgICAgICAgICAgY1soYiArIDg4KSA+PiAyXSA9IGJpKGNbKGkgKyA4KSA+PiAyXSB8IDApIHwgMDtcbiAgICAgICAgICAgICAgICBrID0gY1soYiArIDg4KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgbCA9IGNbKGkgKyA0KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgbSA9IGNbKGkgKyA4KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgYzYoayB8IDAsIGwgfCAwLCBtKSB8IDA7XG4gICAgICAgICAgICAgICAgaWYgKChjWygoY1soaCArIDgpID4+IDJdIHwgMCkgKyAxNikgPj4gMl0gfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIG0gPSAoYiArIDExMCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBhW21dID0gKGRbbV0gfCAwIHwgMzYpICYgMjU1O1xuICAgICAgICAgICAgICAgICAgICBjW2IgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgKCgoY1soKGNbKGggKyAxMikgPj4gMl0gfCAwKSArIDgpID4+IDJdIHwgMCkgPj4+IDApIC9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAyKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAwO1xuICAgICAgICAgICAgICAgICAgICBjWyhiICsgNCkgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgKGNbYiA+PiAyXSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICgoKChjWygoY1soaCArIDEyKSA+PiAyXSB8IDApICsgMTIpID4+IDJdIHwgMCkgPj4+IDApIC9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAyKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGdbKGIgKyA4NCkgPj4gMl0gPSAxLjA7XG4gICAgICAgICAgICAgICAgaWYgKCgoYVsoYiArIDExMCkgfCAwXSAmIDMyKSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgbiA9IGI7XG4gICAgICAgICAgICAgICAgICAgIG8gPSAobiArIDgpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgcCA9IGNbbyA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIHEgPSBwIDw8IDEyO1xuICAgICAgICAgICAgICAgICAgICBjW28gPj4gMl0gPSBxO1xuICAgICAgICAgICAgICAgICAgICByID0gYjtcbiAgICAgICAgICAgICAgICAgICAgcyA9IHIgfCAwO1xuICAgICAgICAgICAgICAgICAgICB0ID0gY1tzID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgdSA9IHQgPDwgMTI7XG4gICAgICAgICAgICAgICAgICAgIGNbcyA+PiAyXSA9IHU7XG4gICAgICAgICAgICAgICAgICAgIHYgPSBiO1xuICAgICAgICAgICAgICAgICAgICB3ID0gKHYgKyA0KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIHggPSBjW3cgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICB5ID0geCA8PCAxMjtcbiAgICAgICAgICAgICAgICAgICAgY1t3ID4+IDJdID0geTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBtID0gMDtcbiAgICAgICAgICAgICAgICBsID0gMDtcbiAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoY1soZiArIDEyKSA+PiAyXSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1soKGNbKGYgKyAxMikgPj4gMl0gfCAwKSArIDQpID4+IDJdIHwgMCkgPj4+IDAgPD1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB6ID0gMzI2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChjWyhmICsgMTYpID4+IDJdIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHogPSAzMjY7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBtID0gY1soZiArIDEyKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBsID0gY1soZiArIDE2KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB6ID0gMzI2O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgaWYgKCh6IHwgMCkgPT0gMzI2KSB7XG4gICAgICAgICAgICAgICAgICAgIG0gPSBjWyhoICsgMTYpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgbCA9IGNbKGggKyAyMCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBoID0gYkQoY1sobSArIDQpID4+IDJdIHwgMCwgbCwgNTE4KSB8IDA7XG4gICAgICAgICAgICAgICAgQSA9ICtiRShoKTtcbiAgICAgICAgICAgICAgICBoID0gYkQoY1sobSArIDQpID4+IDJdIHwgMCwgbCwgNTI0KSB8IDA7XG4gICAgICAgICAgICAgICAgQiA9ICtiRShoKTtcbiAgICAgICAgICAgICAgICBoID0gYkQoY1sobSArIDQpID4+IDJdIHwgMCwgbCwgNTE5KSB8IDA7XG4gICAgICAgICAgICAgICAgQyA9ICtiRShoKTtcbiAgICAgICAgICAgICAgICBoID0gYkQoY1sobSArIDQpID4+IDJdIHwgMCwgbCwgNTIxKSB8IDA7XG4gICAgICAgICAgICAgICAgRCA9ICtiRShoKTtcbiAgICAgICAgICAgICAgICBoID0gYkQoY1sobSArIDQpID4+IDJdIHwgMCwgbCwgNTIyKSB8IDA7XG4gICAgICAgICAgICAgICAgeiA9IH5+KCgxLjAgLSArYkYoaCkpICogMjUwLjApO1xuICAgICAgICAgICAgICAgIGggPSBiRChjWyhtICsgNCkgPj4gMl0gfCAwLCBsLCA0KSB8IDA7XG4gICAgICAgICAgICAgICAgYVsoYiArIDExMSkgfCAwXSA9IH5+KCgrYkYoaCkgKyAwLjUpICogMTI3LjApICYgMjU1O1xuICAgICAgICAgICAgICAgIGNbKGIgKyA2MCkgPj4gMl0gPSBiRygyNTUpIHwgMDtcbiAgICAgICAgICAgICAgICBjWyhiICsgMzYpID4+IDJdID0gYkgoaiwgMjU1LCBjWyhiICsgMTIpID4+IDJdIHwgMCwgQSkgfCAwO1xuICAgICAgICAgICAgICAgIGNbKGIgKyA2NCkgPj4gMl0gPSBiRygyNTApIHwgMDtcbiAgICAgICAgICAgICAgICBjWyhiICsgNDApID4+IDJdID0gYkgoaiwgNSwgY1soYiArIDEyKSA+PiAyXSB8IDAsIEIpIHwgMDtcbiAgICAgICAgICAgICAgICBjWyhiICsgNjgpID4+IDJdID0gYkcoeikgfCAwO1xuICAgICAgICAgICAgICAgIGNbKGIgKyA0NCkgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICBiSChqLCAoMjU1IC0geikgfCAwLCBjWyhiICsgMTIpID4+IDJdIHwgMCwgQykgfCAwO1xuICAgICAgICAgICAgICAgIGNbKGIgKyA3MikgPj4gMl0gPSBiRygwKSB8IDA7XG4gICAgICAgICAgICAgICAgY1soYiArIDQ4KSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgIGJIKGosICh6ICsgNSkgfCAwLCBjWyhiICsgMTIpID4+IDJdIHwgMCwgRCkgfCAwO1xuICAgICAgICAgICAgICAgIGNbKGIgKyA3NikgPj4gMl0gPSBiRygwKSB8IDA7XG4gICAgICAgICAgICAgICAgY1soYiArIDUyKSA+PiAyXSA9IGJHKDEpIHwgMDtcbiAgICAgICAgICAgICAgICBjWyhiICsgODApID4+IDJdID0gYkcoMCkgfCAwO1xuICAgICAgICAgICAgICAgIGNbKGIgKyA1NikgPj4gMl0gPSBiRygxKSB8IDA7XG4gICAgICAgICAgICAgICAgeiA9IChiICsgMTEwKSB8IDA7XG4gICAgICAgICAgICAgICAgYVt6XSA9IChkW3pdIHwgMCB8IDY0KSAmIDI1NTtcbiAgICAgICAgICAgICAgICBuID0gYjtcbiAgICAgICAgICAgICAgICBvID0gKG4gKyA4KSB8IDA7XG4gICAgICAgICAgICAgICAgcCA9IGNbbyA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgcSA9IHAgPDwgMTI7XG4gICAgICAgICAgICAgICAgY1tvID4+IDJdID0gcTtcbiAgICAgICAgICAgICAgICByID0gYjtcbiAgICAgICAgICAgICAgICBzID0gciB8IDA7XG4gICAgICAgICAgICAgICAgdCA9IGNbcyA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgdSA9IHQgPDwgMTI7XG4gICAgICAgICAgICAgICAgY1tzID4+IDJdID0gdTtcbiAgICAgICAgICAgICAgICB2ID0gYjtcbiAgICAgICAgICAgICAgICB3ID0gKHYgKyA0KSB8IDA7XG4gICAgICAgICAgICAgICAgeCA9IGNbdyA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgeSA9IHggPDwgMTI7XG4gICAgICAgICAgICAgICAgY1t3ID4+IDJdID0geTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBiRChhLCBiLCBkKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBkID0gZCB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGYgPSAwLFxuICAgICAgICAgICAgICAgICAgICBnID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaCA9IDA7XG4gICAgICAgICAgICAgICAgZiA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IGI7XG4gICAgICAgICAgICAgICAgYiA9IGQ7XG4gICAgICAgICAgICAgICAgZCA9IDA7XG4gICAgICAgICAgICAgICAgZyA9IDA7XG4gICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGcgPj4+IDAgPj0gZiA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaCA9IChhICsgKChnICogMTIpIHwgMCkpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChlWyhoICsgNCkgPj4gMV0gfCAwIHwgMCkgPT0gKChiICYgNjU1MzUpIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGVbaCA+PiAxXSB8IDAgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZVsoaCArIDIpID4+IDFdIHwgMCB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZVsoaCArIDYpID4+IDFdIHwgMCB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQgPSAoZCArIChjWyhoICsgOCkgPj4gMl0gfCAwKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGcgPSAoZyArIDEpIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIGQgfCAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYkUoYSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgYiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGMgPSAwLjAsXG4gICAgICAgICAgICAgICAgICAgIGQgPSAwLjA7XG4gICAgICAgICAgICAgICAgYiA9IGE7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGIgfCAwKSAhPSAtMjE0NzQ4MzY0OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChiIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgYyA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgK1AoMi4wLCArKCsoKChiIHwgMCkgLyA2NTUzNikgfCAwIHwgMCkgLyAxMjAwLjApKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMS4wZTM7XG4gICAgICAgICAgICAgICAgICAgICAgICBkID0gYztcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiArZDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgIGMgPSAwLjA7XG4gICAgICAgICAgICAgICAgZCA9IGM7XG4gICAgICAgICAgICAgICAgcmV0dXJuICtkO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYkYoYSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICByZXR1cm4gKygrKCgoYSB8IDApIC8gNjU1MzYpIHwgMCB8IDApIC8gMS4wZTMpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYkcoYSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICByZXR1cm4gKGEgPDwgMjIpIHwgMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGJIKGEsIGIsIGQsIGUpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gK2U7XG4gICAgICAgICAgICAgICAgbGV0IGYgPSAwLjA7XG4gICAgICAgICAgICAgICAgZCA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IGI7XG4gICAgICAgICAgICAgICAgZiA9IGU7XG4gICAgICAgICAgICAgICAgaWYgKGYgPCA2LjApIHtcbiAgICAgICAgICAgICAgICAgICAgZiA9IDYuMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKChhIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBhID0gMjU1O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBhID0gYSA8PCAyMjtcbiAgICAgICAgICAgICAgICByZXR1cm4gKFxuICAgICAgICAgICAgICAgICAgICB+fihcbiAgICAgICAgICAgICAgICAgICAgICAgICgoKyhhIHwgMCkgLyArKGNbKGQgKyA0KSA+PiAyXSB8IDApKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKyhjWyhkICsgMTMwNjApID4+IDJdIHwgMCkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEuMGUzKSAvXG4gICAgICAgICAgICAgICAgICAgICAgICBmXG4gICAgICAgICAgICAgICAgICAgICkgfCAwXG4gICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGJJKGIsIGUpIHtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGUgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGggPSAwLFxuICAgICAgICAgICAgICAgICAgICBpID0gMDtcbiAgICAgICAgICAgICAgICBmID0gYjtcbiAgICAgICAgICAgICAgICBiID0gZTtcbiAgICAgICAgICAgICAgICBlID0gY1soZiArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkgKyAyMjApID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBpZiAoKGUgfCAwKSA+IDUpIHtcbiAgICAgICAgICAgICAgICAgICAgYVsoZiArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkpIHwgMF0gPSAwO1xuICAgICAgICAgICAgICAgICAgICBnID0gMTtcbiAgICAgICAgICAgICAgICAgICAgaCA9IGc7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBoIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAoKGFbXG4gICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGYgKyAxNzI0ICsgKChiICogMjM2KSB8IDApICsgNCkgPj4gMl0gfCAwKSArIDExMCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgXSAmXG4gICAgICAgICAgICAgICAgICAgICAgICA2NCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGRbKGYgKyAxNzI0ICsgKChiICogMjM2KSB8IDApKSB8IDBdIHwgMCB8IDApID09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGkgPSAzNjE7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGYgKyAxNzI0ICsgKChiICogMjM2KSB8IDApKSB8IDBdIHwgMCB8IDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IDM2MTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGkgfCAwKSA9PSAzNjEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGUgfCAwKSA8PSAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhmICsgMTcyNCArICgoYiAqIDIzNikgfCAwKSArIDMyKSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZyA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaCA9IGc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGggfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY1soZiArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkgKyAyMjApID4+IDJdID0gZSArIDE7XG4gICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAoY1soZiArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkgKyAyNCkgPj4gMl0gfCAwKSA9PVxuICAgICAgICAgICAgICAgICAgICAoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICgoY1soZiArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkgKyA0KSA+PiAyXSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA2MCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGUgPDwgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgIDApXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGcgPSBiSShmLCBiKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGggPSBnO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gaCB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNbKGYgKyAxNzI0ICsgKChiICogMjM2KSB8IDApICsgMjgpID4+IDJdID1cbiAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICgoY1soZiArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkgKyA0KSA+PiAyXSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA2MCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGUgPDwgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgIGNbKGYgKyAxNzI0ICsgKChiICogMjM2KSB8IDApICsgMzIpID4+IDJdID1cbiAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICgoY1soZiArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkgKyA0KSA+PiAyXSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAzNiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGUgPDwgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgKGNbKGYgKyAxNzI0ICsgKChiICogMjM2KSB8IDApICsgMjgpID4+IDJdIHwgMCkgPFxuICAgICAgICAgICAgICAgICAgICAoY1soZiArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkgKyAyNCkgPj4gMl0gfCAwKVxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICBjWyhmICsgMTcyNCArICgoYiAqIDIzNikgfCAwKSArIDMyKSA+PiAyXSA9IC0oXG4gICAgICAgICAgICAgICAgICAgICAgICBjWyhmICsgMTcyNCArICgoYiAqIDIzNikgfCAwKSArIDMyKSA+PiAyXSB8IDBcbiAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZyA9IDA7XG4gICAgICAgICAgICAgICAgaCA9IGc7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGggfCAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYkooYiwgZSkge1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGYgPSAwLFxuICAgICAgICAgICAgICAgICAgICBpID0gMC4wLFxuICAgICAgICAgICAgICAgICAgICBqID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbCA9IDAuMDtcbiAgICAgICAgICAgICAgICBmID0gYjtcbiAgICAgICAgICAgICAgICBiID0gZTtcbiAgICAgICAgICAgICAgICBpID0gK2dbKGYgKyAxNzI0ICsgKChiICogMjM2KSB8IDApICsgNjgpID4+IDJdO1xuICAgICAgICAgICAgICAgIGlmICgoY1soZiArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkgKyAyMzIpID4+IDJdIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGNbKGYgKyAxNzI0ICsgKChiICogMjM2KSB8IDApICsgNDgpID4+IDJdIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGkgKiArZ1soZiArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkgKyA3NikgPj4gMl07XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgKChhW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1soZiArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkgKyA0KSA+PiAyXSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTEwKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgIF0gJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDY0KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoOCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1soZiArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkgKyAyNCkgPj4gMl0gPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIzKSA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMykpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgaSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjW2sgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkW2VdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGUgKyAxKSB8IDBdIDw8IDgpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGUgKyAyKSB8IDBdIDw8IDE2KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhlICsgMykgfCAwXSA8PCAyNCkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjWyhrICsgNCkgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWyhlICsgNCkgfCAwXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhlICsgNSkgfCAwXSA8PCA4KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhlICsgNikgfCAwXSA8PCAxNikgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZSArIDcpIHwgMF0gPDwgMjQpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAraFtrID4+IDNdKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBqID0gfn4oaSAqIDQwOTYuMCk7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoaiB8IDApID4gODE5MSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaiA9IDgxOTE7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY1soZiArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkgKyA2MCkgPj4gMl0gPSBqO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGwgPSArZ1soZiArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkgKyA3MikgPj4gMl07XG4gICAgICAgICAgICAgICAgaWYgKChjWyhmICsgMTcyNCArICgoYiAqIDIzNikgfCAwKSArIDQ4KSA+PiAyXSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGkgKiArZ1soZiArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkgKyA3NikgPj4gMl07XG4gICAgICAgICAgICAgICAgICAgIGwgPSBsICogK2dbKGYgKyAxNzI0ICsgKChiICogMjM2KSB8IDApICsgNzYpID4+IDJdO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICgoYVtcbiAgICAgICAgICAgICAgICAgICAgICAgICgoY1soZiArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkgKyA0KSA+PiAyXSB8IDApICsgMTEwKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICBdICZcbiAgICAgICAgICAgICAgICAgICAgICAgIDY0KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGUgPVxuICAgICAgICAgICAgICAgICAgICAgICAgKDggK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1soZiArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkgKyAyNCkgPj4gMl0gPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjMpIDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMpKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAwO1xuICAgICAgICAgICAgICAgICAgICBpID1cbiAgICAgICAgICAgICAgICAgICAgICAgIGkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgKChjW2sgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbZV0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhlICsgMSkgfCAwXSA8PCA4KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGUgKyAyKSB8IDBdIDw8IDE2KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGUgKyAzKSB8IDBdIDw8IDI0KSksXG4gICAgICAgICAgICAgICAgICAgICAgICAoY1soayArIDQpID4+IDJdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWyhlICsgNCkgfCAwXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGUgKyA1KSB8IDBdIDw8IDgpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZSArIDYpIHwgMF0gPDwgMTYpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZSArIDcpIHwgMF0gPDwgMjQpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICtoW2sgPj4gM10pO1xuICAgICAgICAgICAgICAgICAgICBlID1cbiAgICAgICAgICAgICAgICAgICAgICAgICg4ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGYgKyAxNzI0ICsgKChiICogMjM2KSB8IDApICsgMjQpID4+IDJdID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIzKSA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzKSkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgbCA9XG4gICAgICAgICAgICAgICAgICAgICAgICBsICpcbiAgICAgICAgICAgICAgICAgICAgICAgICgoY1trID4+IDJdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkW2VdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZSArIDEpIHwgMF0gPDwgOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhlICsgMikgfCAwXSA8PCAxNikgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhlICsgMykgfCAwXSA8PCAyNCkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGNbKGsgKyA0KSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsoZSArIDQpIHwgMF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhlICsgNSkgfCAwXSA8PCA4KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGUgKyA2KSB8IDBdIDw8IDE2KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGUgKyA3KSB8IDBdIDw8IDI0KSksXG4gICAgICAgICAgICAgICAgICAgICAgICAraFtrID4+IDNdKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaiA9IH5+KGkgKiA0MDk2LjApO1xuICAgICAgICAgICAgICAgIGlmICgoaiB8IDApID4gODE5MSkge1xuICAgICAgICAgICAgICAgICAgICBqID0gODE5MTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZSA9IH5+KGwgKiA0MDk2LjApO1xuICAgICAgICAgICAgICAgIGlmICgoZSB8IDApID4gODE5MSkge1xuICAgICAgICAgICAgICAgICAgICBlID0gODE5MTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY1soZiArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkgKyA2MCkgPj4gMl0gPSBqO1xuICAgICAgICAgICAgICAgIGNbKGYgKyAxNzI0ICsgKChiICogMjM2KSB8IDApICsgNjQpID4+IDJdID0gZTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBiSyhiLCBlLCBmLCBnKSB7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGUgPSBlIHwgMDtcbiAgICAgICAgICAgICAgICBmID0gZiB8IDA7XG4gICAgICAgICAgICAgICAgZyA9IGcgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBoID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGsgPSAwLFxuICAgICAgICAgICAgICAgICAgICBsID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbSA9IDA7XG4gICAgICAgICAgICAgICAgaCA9IGk7XG4gICAgICAgICAgICAgICAgaSA9IChpICsgOCkgfCAwO1xuICAgICAgICAgICAgICAgIGogPSBoIHwgMDtcbiAgICAgICAgICAgICAgICBrID0gYjtcbiAgICAgICAgICAgICAgICBiID0gZTtcbiAgICAgICAgICAgICAgICBlID0gZjtcbiAgICAgICAgICAgICAgICBjW2ogPj4gMl0gPSBnO1xuICAgICAgICAgICAgICAgIGcgPSAoayArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkpIHwgMDtcbiAgICAgICAgICAgICAgICBpZiAoKGRbZyB8IDBdIHwgMCB8IDApID09IDQpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChjW2ogPj4gMl0gfCAwKSA+PSAyMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY1tqID4+IDJdID0gMjA7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbCA9IGN5KGssIGUsIGopIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgYkwoaywgbCwgYiwgZSwgY1tqID4+IDJdIHwgMCk7XG4gICAgICAgICAgICAgICAgICAgIGFbZyB8IDBdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGg7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbCA9IGN5KGssIGUsIGopIHwgMDtcbiAgICAgICAgICAgICAgICBpZiAoKChjWyhrICsgOCkgPj4gMl0gJiAxKSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChjWyhnICsgMzIpID4+IDJdIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0gPSA0MDI7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY1soZyArIDQ4KSA+PiAyXSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9IDQwMjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJOKGssIGwsIGIsIGUsIGNbaiA+PiAyXSB8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChtIHwgMCkgPT0gNDAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBiTShrLCBsLCBiLCBlLCBjW2ogPj4gMl0gfCAwKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoY1soZyArIDIzMikgPj4gMl0gfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChjWyhnICsgMzIpID4+IDJdIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtID0gNDA4O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY1soZyArIDQ4KSA+PiAyXSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0gPSA0MDg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiUChrLCBsLCBiLCBlLCBjW2ogPj4gMl0gfCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgobSB8IDApID09IDQwOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJPKGssIGwsIGIsIGUsIGNbaiA+PiAyXSB8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChjWyhnICsgMjMyKSA+PiAyXSB8IDApID09IDMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY1soZyArIDMyKSA+PiAyXSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0gPSA0MTQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGNbKGcgKyA0OCkgPj4gMl0gfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9IDQxNDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJSKGssIGwsIGIsIGUsIGNbaiA+PiAyXSB8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChtIHwgMCkgPT0gNDE0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJRKGssIGwsIGIsIGUsIGNbaiA+PiAyXSB8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChjWyhnICsgMjMyKSA+PiAyXSB8IDApID09IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYiA9IChiICsgNCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY1soZyArIDMyKSA+PiAyXSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0gPSA0MjE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGNbKGcgKyA0OCkgPj4gMl0gfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9IDQyMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJUKGssIGwsIGIsIGUsIGNbaiA+PiAyXSB8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChtIHwgMCkgPT0gNDIxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJTKGssIGwsIGIsIGUsIGNbaiA+PiAyXSB8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpID0gaDtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBiTChhLCBkLCBlLCBmLCBnKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgZiA9IGYgfCAwO1xuICAgICAgICAgICAgICAgIGcgPSBnIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgaCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGkgPSAwLFxuICAgICAgICAgICAgICAgICAgICBqID0gMCxcbiAgICAgICAgICAgICAgICAgICAgayA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGwgPSAwLFxuICAgICAgICAgICAgICAgICAgICBtID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG8gPSAwO1xuICAgICAgICAgICAgICAgIGggPSBhO1xuICAgICAgICAgICAgICAgIGEgPSBkO1xuICAgICAgICAgICAgICAgIGQgPSBlO1xuICAgICAgICAgICAgICAgIGUgPSBmO1xuICAgICAgICAgICAgICAgIGYgPSBnO1xuICAgICAgICAgICAgICAgIGcgPSAwO1xuICAgICAgICAgICAgICAgIGlmICgoZiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgZiA9IDE7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGkgPSBjWyhoICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSArIDYwKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgaiA9IC0oKChpIHwgMCkgLyAoZiB8IDApKSB8IDApIHwgMDtcbiAgICAgICAgICAgICAgICBpZiAoKGogfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGogPSAtMTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCgoY1soaCArIDgpID4+IDJdICYgMSkgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBrID0gZjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGYgPSAoayAtIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoayB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsID0gNDc0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgaSA9IChpICsgaikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChpIHwgMCkgPCAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbCA9IDQ3MjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBhO1xuICAgICAgICAgICAgICAgICAgICAgICAgYSA9IChrICsgMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgZyA9IGJbayA+PiAxXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBrID0gXyhpLCAoZyA8PCAxNikgPj4gMTYpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG0gPSBkO1xuICAgICAgICAgICAgICAgICAgICAgICAgZCA9IChtICsgNCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1ttID4+IDJdID0gKGNbbSA+PiAyXSB8IDApICsgaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoKGwgfCAwKSA9PSA0NzIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgobCB8IDApID09IDQ3NCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgoY1soaCArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkgKyAyMzIpID4+IDJdIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBrID0gY1soaCArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkgKyA2NCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBtID0gLSgoKGsgfCAwKSAvIChmIHwgMCkpIHwgMCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbiA9IGY7XG4gICAgICAgICAgICAgICAgICAgICAgICBmID0gKG4gLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKG4gfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpID0gKGkgKyBqKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGkgfCAwKSA8IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGsgPSAoayArIG0pIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoayB8IDApIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGsgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgbiA9IGE7XG4gICAgICAgICAgICAgICAgICAgICAgICBhID0gKG4gKyAyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBnID0gYltuID4+IDFdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG4gPSBfKGksIChnIDw8IDE2KSA+PiAxNikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgbyA9IGQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBkID0gKG8gKyA0KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBjW28gPj4gMl0gPSAoY1tvID4+IDJdIHwgMCkgKyBuO1xuICAgICAgICAgICAgICAgICAgICAgICAgbiA9IF8oaywgKGcgPDwgMTYpID4+IDE2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBvID0gZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGQgPSAobyArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbbyA+PiAyXSA9IChjW28gPj4gMl0gfCAwKSArIG47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbKGggKyAxNzI0ICsgKChlICogMjM2KSB8IDApICsgMjMyKSA+PiAyXSB8IDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgM1xuICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgayA9IGY7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYgPSAoayAtIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChrIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbCA9IDQ1MDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgPSAoaSArIGopIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChpIHwgMCkgPCAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrID0gYTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYSA9IChrICsgMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID0gYltrID4+IDFdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgayA9IF8oaSwgKGcgPDwgMTYpID4+IDE2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0gPSBkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gKG0gKyA0KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbbSA+PiAyXSA9IChjW20gPj4gMl0gfCAwKSArIGs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBfKGksIChnIDw8IDE2KSA+PiAxNikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtID0gZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IChtICsgNCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW20gPj4gMl0gPSAoY1ttID4+IDJdIHwgMCkgKyBrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGwgfCAwKSA9PSA0NTApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaCArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkgKyAyMzIpID4+IDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrID0gZjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmID0gKGsgLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChrIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsID0gNDU3O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IChpICsgaikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoaSB8IDApIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgayA9IGE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYSA9IChrICsgMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGcgPSBiW2sgPj4gMV0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBfKGksIChnIDw8IDE2KSA+PiAxNikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0gPSBkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQgPSAobSArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW20gPj4gMl0gPSAoY1ttID4+IDJdIHwgMCkgKyBrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQgPSAoZCArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgobCB8IDApID09IDQ1Nykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTcyNCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChlICogMjM2KSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMzIpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBmO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZiA9IChrIC0gMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChrIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGwgPSA0NjQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0gKGkgKyBqKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGkgfCAwKSA8IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBhO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYSA9IChrICsgMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZyA9IGJbayA+PiAxXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gKGQgKyA0KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrID0gXyhpLCAoZyA8PCAxNikgPj4gMTYpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0gPSBkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IChtICsgNCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1ttID4+IDJdID0gKGNbbSA+PiAyXSB8IDApICsgaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGwgfCAwKSA9PSA0NjQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYk0oYSwgZCwgZSwgZiwgZykge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBkID0gZCB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGUgfCAwO1xuICAgICAgICAgICAgICAgIGYgPSBmIHwgMDtcbiAgICAgICAgICAgICAgICBnID0gZyB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGggPSAwLFxuICAgICAgICAgICAgICAgICAgICBpID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGsgPSAwLFxuICAgICAgICAgICAgICAgICAgICBsID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG4gPSAwO1xuICAgICAgICAgICAgICAgIGggPSBhO1xuICAgICAgICAgICAgICAgIGEgPSBkO1xuICAgICAgICAgICAgICAgIGQgPSBlO1xuICAgICAgICAgICAgICAgIGUgPSBmO1xuICAgICAgICAgICAgICAgIGYgPSBnO1xuICAgICAgICAgICAgICAgIGcgPSAoaCArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkpIHwgMDtcbiAgICAgICAgICAgICAgICBpID0gY1soZyArIDYwKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgaiA9IGNbKGcgKyAyMjQpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBrID0gajtcbiAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoaiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBjWyhoICsgMTMwNjApID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYlUoaCwgZSkgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGNbKGcgKyA2MCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChmIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbCA9IDUwMjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICgoayB8IDApID49IChmIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGwgPSA0OTU7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBmID0gKGYgLSBrKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBqID0gaztcbiAgICAgICAgICAgICAgICAgICAgICAgIGsgPSAoaiAtIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoaiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGogPSBhO1xuICAgICAgICAgICAgICAgICAgICAgICAgYSA9IChqICsgMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgbSA9IGJbaiA+PiAxXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBqID0gXyhpLCAobSA8PCAxNikgPj4gMTYpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG4gPSBkO1xuICAgICAgICAgICAgICAgICAgICAgICAgZCA9IChuICsgNCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1tuID4+IDJdID0gKGNbbiA+PiAyXSB8IDApICsgajtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBrID0gY1soaCArIDEzMDYwKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoYlUoaCwgZSkgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsID0gNDkzO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaSA9IGNbKGcgKyA2MCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoKGwgfCAwKSA9PSA1MDIpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKGwgfCAwKSA9PSA0OTMpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKGwgfCAwKSA9PSA0OTUpIHtcbiAgICAgICAgICAgICAgICAgICAgY1soZyArIDIyNCkgPj4gMl0gPSBrIC0gZjtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBmO1xuICAgICAgICAgICAgICAgICAgICAgICAgZiA9IChrIC0gMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChrIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgayA9IGE7XG4gICAgICAgICAgICAgICAgICAgICAgICBhID0gKGsgKyAyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBtID0gYltrID4+IDFdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBfKGksIChtIDw8IDE2KSA+PiAxNikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgZyA9IGQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBkID0gKGcgKyA0KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBjW2cgPj4gMl0gPSAoY1tnID4+IDJdIHwgMCkgKyBrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBiTihhLCBkLCBlLCBmLCBnKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgZiA9IGYgfCAwO1xuICAgICAgICAgICAgICAgIGcgPSBnIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgaCA9IDA7XG4gICAgICAgICAgICAgICAgaCA9IGQ7XG4gICAgICAgICAgICAgICAgZCA9IGU7XG4gICAgICAgICAgICAgICAgZSA9IGc7XG4gICAgICAgICAgICAgICAgZyA9IGNbKGEgKyAxNzI0ICsgKChmICogMjM2KSB8IDApICsgNjApID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICBmID0gZTtcbiAgICAgICAgICAgICAgICAgICAgZSA9IChmIC0gMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGYgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBmID0gaDtcbiAgICAgICAgICAgICAgICAgICAgaCA9IChmICsgMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICBhID0gXyhnLCBiW2YgPj4gMV0gfCAwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGYgPSBkO1xuICAgICAgICAgICAgICAgICAgICBkID0gKGYgKyA0KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGNbZiA+PiAyXSA9IChjW2YgPj4gMl0gfCAwKSArIGE7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGJPKGEsIGQsIGUsIGYsIGcpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgZCA9IGQgfCAwO1xuICAgICAgICAgICAgICAgIGUgPSBlIHwgMDtcbiAgICAgICAgICAgICAgICBmID0gZiB8IDA7XG4gICAgICAgICAgICAgICAgZyA9IGcgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBoID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGogPSAwLFxuICAgICAgICAgICAgICAgICAgICBrID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG0gPSAwLFxuICAgICAgICAgICAgICAgICAgICBuID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbyA9IDA7XG4gICAgICAgICAgICAgICAgaCA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IGQ7XG4gICAgICAgICAgICAgICAgZCA9IGU7XG4gICAgICAgICAgICAgICAgZSA9IGY7XG4gICAgICAgICAgICAgICAgZiA9IGc7XG4gICAgICAgICAgICAgICAgZyA9IChoICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSkgfCAwO1xuICAgICAgICAgICAgICAgIGkgPSBjWyhnICsgNjApID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBqID0gY1soZyArIDY0KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgayA9IGNbKGcgKyAyMjQpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBsID0gaztcbiAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoayB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGwgPSBjWyhoICsgMTMwNjApID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYlUoaCwgZSkgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGNbKGcgKyA2MCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGogPSBjWyhnICsgNjQpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG0gPSA1MzA7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoKGwgfCAwKSA+PSAoZiB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtID0gNTIyO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZiA9IChmIC0gbCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgayA9IGw7XG4gICAgICAgICAgICAgICAgICAgICAgICBsID0gKGsgLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGsgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBrID0gYTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGEgPSAoayArIDIpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG4gPSBiW2sgPj4gMV0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgayA9IF8oaSwgKG4gPDwgMTYpID4+IDE2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBvID0gZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGQgPSAobyArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbbyA+PiAyXSA9IChjW28gPj4gMl0gfCAwKSArIGs7XG4gICAgICAgICAgICAgICAgICAgICAgICBrID0gXyhqLCAobiA8PCAxNikgPj4gMTYpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG8gPSBkO1xuICAgICAgICAgICAgICAgICAgICAgICAgZCA9IChvICsgNCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1tvID4+IDJdID0gKGNbbyA+PiAyXSB8IDApICsgaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBsID0gY1soaCArIDEzMDYwKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoYlUoaCwgZSkgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtID0gNTIwO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaSA9IGNbKGcgKyA2MCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBqID0gY1soZyArIDY0KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgobSB8IDApID09IDUyMikge1xuICAgICAgICAgICAgICAgICAgICBjWyhnICsgMjI0KSA+PiAyXSA9IGwgLSBmO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbCA9IGY7XG4gICAgICAgICAgICAgICAgICAgICAgICBmID0gKGwgLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGwgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBsID0gYTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGEgPSAobCArIDIpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG4gPSBiW2wgPj4gMV0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgbCA9IF8oaSwgKG4gPDwgMTYpID4+IDE2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBnID0gZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGQgPSAoZyArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbZyA+PiAyXSA9IChjW2cgPj4gMl0gfCAwKSArIGw7XG4gICAgICAgICAgICAgICAgICAgICAgICBsID0gXyhqLCAobiA8PCAxNikgPj4gMTYpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGcgPSBkO1xuICAgICAgICAgICAgICAgICAgICAgICAgZCA9IChnICsgNCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1tnID4+IDJdID0gKGNbZyA+PiAyXSB8IDApICsgbDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICgobSB8IDApID09IDUyMCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICgobSB8IDApID09IDUzMCkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYlAoYSwgZCwgZSwgZiwgZykge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBkID0gZCB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGUgfCAwO1xuICAgICAgICAgICAgICAgIGYgPSBmIHwgMDtcbiAgICAgICAgICAgICAgICBnID0gZyB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGggPSAwLFxuICAgICAgICAgICAgICAgICAgICBpID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaiA9IDA7XG4gICAgICAgICAgICAgICAgaCA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IGQ7XG4gICAgICAgICAgICAgICAgZCA9IGU7XG4gICAgICAgICAgICAgICAgZSA9IGY7XG4gICAgICAgICAgICAgICAgZiA9IGc7XG4gICAgICAgICAgICAgICAgZyA9IGNbKGggKyAxNzI0ICsgKChlICogMjM2KSB8IDApICsgNjApID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBpID0gY1soaCArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkgKyA2NCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGUgPSBmO1xuICAgICAgICAgICAgICAgICAgICBmID0gKGUgLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGUgPSBhO1xuICAgICAgICAgICAgICAgICAgICBhID0gKGUgKyAyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGggPSBiW2UgPj4gMV0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBlID0gXyhnLCAoaCA8PCAxNikgPj4gMTYpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaiA9IGQ7XG4gICAgICAgICAgICAgICAgICAgIGQgPSAoaiArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1tqID4+IDJdID0gKGNbaiA+PiAyXSB8IDApICsgZTtcbiAgICAgICAgICAgICAgICAgICAgZSA9IF8oaSwgKGggPDwgMTYpID4+IDE2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGggPSBkO1xuICAgICAgICAgICAgICAgICAgICBkID0gKGggKyA0KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGNbaCA+PiAyXSA9IChjW2ggPj4gMl0gfCAwKSArIGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGJRKGEsIGQsIGUsIGYsIGcpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgZCA9IGQgfCAwO1xuICAgICAgICAgICAgICAgIGUgPSBlIHwgMDtcbiAgICAgICAgICAgICAgICBmID0gZiB8IDA7XG4gICAgICAgICAgICAgICAgZyA9IGcgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBoID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGogPSAwLFxuICAgICAgICAgICAgICAgICAgICBrID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG0gPSAwLFxuICAgICAgICAgICAgICAgICAgICBuID0gMDtcbiAgICAgICAgICAgICAgICBoID0gYTtcbiAgICAgICAgICAgICAgICBhID0gZDtcbiAgICAgICAgICAgICAgICBkID0gZTtcbiAgICAgICAgICAgICAgICBlID0gZjtcbiAgICAgICAgICAgICAgICBmID0gZztcbiAgICAgICAgICAgICAgICBnID0gKGggKyAxNzI0ICsgKChlICogMjM2KSB8IDApKSB8IDA7XG4gICAgICAgICAgICAgICAgaSA9IGNbKGcgKyA2MCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIGogPSBjWyhnICsgMjI0KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgayA9IGo7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGogfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBrID0gY1soaCArIDEzMDYwKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGJVKGgsIGUpIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgPSBjWyhnICsgNjApID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGwgPSA1NTY7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoKGsgfCAwKSA+PSAoZiB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsID0gNTQ5O1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZiA9IChmIC0gaykgfCAwO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaiA9IGs7XG4gICAgICAgICAgICAgICAgICAgICAgICBrID0gKGogLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGogfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBqID0gYTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGEgPSAoaiArIDIpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG0gPSBiW2ogPj4gMV0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgaiA9IF8oaSwgKG0gPDwgMTYpID4+IDE2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBuID0gZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGQgPSAobiArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbbiA+PiAyXSA9IChjW24gPj4gMl0gfCAwKSArIGo7XG4gICAgICAgICAgICAgICAgICAgICAgICBqID0gXyhpLCAobSA8PCAxNikgPj4gMTYpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG4gPSBkO1xuICAgICAgICAgICAgICAgICAgICAgICAgZCA9IChuICsgNCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1tuID4+IDJdID0gKGNbbiA+PiAyXSB8IDApICsgajtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBrID0gY1soaCArIDEzMDYwKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoYlUoaCwgZSkgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsID0gNTQ3O1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaSA9IGNbKGcgKyA2MCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoKGwgfCAwKSA9PSA1NDkpIHtcbiAgICAgICAgICAgICAgICAgICAgY1soZyArIDIyNCkgPj4gMl0gPSBrIC0gZjtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBmO1xuICAgICAgICAgICAgICAgICAgICAgICAgZiA9IChrIC0gMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChrIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgayA9IGE7XG4gICAgICAgICAgICAgICAgICAgICAgICBhID0gKGsgKyAyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBtID0gYltrID4+IDFdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBfKGksIChtIDw8IDE2KSA+PiAxNikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgZyA9IGQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBkID0gKGcgKyA0KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBjW2cgPj4gMl0gPSAoY1tnID4+IDJdIHwgMCkgKyBrO1xuICAgICAgICAgICAgICAgICAgICAgICAgayA9IF8oaSwgKG0gPDwgMTYpID4+IDE2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBnID0gZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGQgPSAoZyArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbZyA+PiAyXSA9IChjW2cgPj4gMl0gfCAwKSArIGs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKGwgfCAwKSA9PSA1NTYpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKGwgfCAwKSA9PSA1NDcpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGJSKGEsIGQsIGUsIGYsIGcpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgZCA9IGQgfCAwO1xuICAgICAgICAgICAgICAgIGUgPSBlIHwgMDtcbiAgICAgICAgICAgICAgICBmID0gZiB8IDA7XG4gICAgICAgICAgICAgICAgZyA9IGcgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBoID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaSA9IDA7XG4gICAgICAgICAgICAgICAgaCA9IGQ7XG4gICAgICAgICAgICAgICAgZCA9IGU7XG4gICAgICAgICAgICAgICAgZSA9IGc7XG4gICAgICAgICAgICAgICAgZyA9IGNbKGEgKyAxNzI0ICsgKChmICogMjM2KSB8IDApICsgNjApID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICBmID0gZTtcbiAgICAgICAgICAgICAgICAgICAgZSA9IChmIC0gMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGYgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBmID0gaDtcbiAgICAgICAgICAgICAgICAgICAgaCA9IChmICsgMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICBhID0gYltmID4+IDFdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgZiA9IF8oZywgKGEgPDwgMTYpID4+IDE2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBkO1xuICAgICAgICAgICAgICAgICAgICBkID0gKGkgKyA0KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGNbaSA+PiAyXSA9IChjW2kgPj4gMl0gfCAwKSArIGY7XG4gICAgICAgICAgICAgICAgICAgIGYgPSBfKGcsIChhIDw8IDE2KSA+PiAxNikgfCAwO1xuICAgICAgICAgICAgICAgICAgICBhID0gZDtcbiAgICAgICAgICAgICAgICAgICAgZCA9IChhICsgNCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBjW2EgPj4gMl0gPSAoY1thID4+IDJdIHwgMCkgKyBmO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBiUyhhLCBkLCBlLCBmLCBnKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgZiA9IGYgfCAwO1xuICAgICAgICAgICAgICAgIGcgPSBnIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgaCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGkgPSAwLFxuICAgICAgICAgICAgICAgICAgICBqID0gMCxcbiAgICAgICAgICAgICAgICAgICAgayA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGwgPSAwLFxuICAgICAgICAgICAgICAgICAgICBtID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbiA9IDA7XG4gICAgICAgICAgICAgICAgaCA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IGQ7XG4gICAgICAgICAgICAgICAgZCA9IGU7XG4gICAgICAgICAgICAgICAgZSA9IGY7XG4gICAgICAgICAgICAgICAgZiA9IGc7XG4gICAgICAgICAgICAgICAgZyA9IChoICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSkgfCAwO1xuICAgICAgICAgICAgICAgIGkgPSBjWyhnICsgNjApID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBqID0gY1soZyArIDIyNCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIGsgPSBqO1xuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChqIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgayA9IGNbKGggKyAxMzA2MCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChiVShoLCBlKSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0gY1soZyArIDYwKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGYgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsID0gNTgyO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKChrIHwgMCkgPj0gKGYgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbCA9IDU3NjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGYgPSAoZiAtIGspIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGogPSBrO1xuICAgICAgICAgICAgICAgICAgICAgICAgayA9IChqIC0gMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChqIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgaiA9IGE7XG4gICAgICAgICAgICAgICAgICAgICAgICBhID0gKGogKyAyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBtID0gYltqID4+IDFdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGogPSBfKGksIChtIDw8IDE2KSA+PiAxNikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgbiA9IGQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBkID0gKG4gKyA0KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBjW24gPj4gMl0gPSAoY1tuID4+IDJdIHwgMCkgKyBqO1xuICAgICAgICAgICAgICAgICAgICAgICAgZCA9IChkICsgNCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGsgPSBjWyhoICsgMTMwNjApID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChiVShoLCBlKSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGwgPSA1NzQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpID0gY1soZyArIDYwKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgobCB8IDApID09IDU4Mikge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICgobCB8IDApID09IDU3Nikge1xuICAgICAgICAgICAgICAgICAgICBjWyhnICsgMjI0KSA+PiAyXSA9IGsgLSBmO1xuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgayA9IGY7XG4gICAgICAgICAgICAgICAgICAgICAgICBmID0gKGsgLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGsgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBrID0gYTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGEgPSAoayArIDIpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG0gPSBiW2sgPj4gMV0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgayA9IF8oaSwgKG0gPDwgMTYpID4+IDE2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBnID0gZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGQgPSAoZyArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbZyA+PiAyXSA9IChjW2cgPj4gMl0gfCAwKSArIGs7XG4gICAgICAgICAgICAgICAgICAgICAgICBkID0gKGQgKyA0KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKGwgfCAwKSA9PSA1NzQpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGJUKGEsIGQsIGUsIGYsIGcpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgZCA9IGQgfCAwO1xuICAgICAgICAgICAgICAgIGUgPSBlIHwgMDtcbiAgICAgICAgICAgICAgICBmID0gZiB8IDA7XG4gICAgICAgICAgICAgICAgZyA9IGcgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBoID0gMDtcbiAgICAgICAgICAgICAgICBoID0gZDtcbiAgICAgICAgICAgICAgICBkID0gZTtcbiAgICAgICAgICAgICAgICBlID0gZztcbiAgICAgICAgICAgICAgICBnID0gY1soYSArIDE3MjQgKyAoKGYgKiAyMzYpIHwgMCkgKyA2MCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGYgPSBlO1xuICAgICAgICAgICAgICAgICAgICBlID0gKGYgLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGYgPSBoO1xuICAgICAgICAgICAgICAgICAgICBoID0gKGYgKyAyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGEgPSBfKGcsIGJbZiA+PiAxXSB8IDApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgZiA9IGQ7XG4gICAgICAgICAgICAgICAgICAgIGQgPSAoZiArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1tmID4+IDJdID0gKGNbZiA+PiAyXSB8IDApICsgYTtcbiAgICAgICAgICAgICAgICAgICAgZCA9IChkICsgNCkgfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBiVShhLCBiKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBmID0gMDtcbiAgICAgICAgICAgICAgICBkID0gYTtcbiAgICAgICAgICAgICAgICBhID0gYjtcbiAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoY1soZCArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyAzMikgPj4gMl0gfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGJWKGQsIGEpIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZSA9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICBmID0gZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgIGlmICgoY1soZCArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyA0OCkgPj4gMl0gfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGJXKGQsIGEpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBiSihkLCBhKTtcbiAgICAgICAgICAgICAgICBlID0gMDtcbiAgICAgICAgICAgICAgICBmID0gZTtcbiAgICAgICAgICAgICAgICByZXR1cm4gZiB8IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBiVihhLCBiKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDA7XG4gICAgICAgICAgICAgICAgZCA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IGI7XG4gICAgICAgICAgICAgICAgYiA9IChkICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDI0KSB8IDA7XG4gICAgICAgICAgICAgICAgY1tiID4+IDJdID1cbiAgICAgICAgICAgICAgICAgICAgKGNbYiA+PiAyXSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgKGNbKGQgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgMzIpID4+IDJdIHwgMCk7XG4gICAgICAgICAgICAgICAgaWYgKChjWyhkICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDMyKSA+PiAyXSB8IDApIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAoY1soZCArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyAyNCkgPj4gMl0gfCAwKSA8PVxuICAgICAgICAgICAgICAgICAgICAgICAgKGNbKGQgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgMjgpID4+IDJdIHwgMClcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlID0gNjAzO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZSA9IDYwMTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGUgPSA2MDE7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChlIHwgMCkgPT0gNjAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbKGQgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgMzIpID4+IDJdIHwgMCkgPD1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1soZCArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyAyNCkgPj4gMl0gfCAwKSA+PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjWyhkICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDI4KSA+PiAyXSB8IDApXG4gICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlID0gNjAzO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGUgfCAwKSA9PSA2MDMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbKGQgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgMjQpID4+IDJdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhkICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDI4KSA+PiAyXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYkkoZCwgYSkgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBmID0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGcgPSBmO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGcgfCAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgZiA9IDA7XG4gICAgICAgICAgICAgICAgZyA9IGY7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGcgfCAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYlcoYSwgYikge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBmID0gMDtcbiAgICAgICAgICAgICAgICBlID0gYTtcbiAgICAgICAgICAgICAgICBhID0gYjtcbiAgICAgICAgICAgICAgICBiID1cbiAgICAgICAgICAgICAgICAgICAgKGRbXG4gICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGUgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgNCkgPj4gMl0gfCAwKSArIDEwOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAwKSA8PFxuICAgICAgICAgICAgICAgICAgICA3O1xuICAgICAgICAgICAgICAgIGlmICgoY1soZSArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyAzNikgPj4gMl0gfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGYgPSAoZSArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyA0MCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBjW2YgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgKGNbZiA+PiAyXSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgIChjWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDM2KSA+PiAyXSB8IDApO1xuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAoY1soZSArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyA0MCkgPj4gMl0gfCAwKSA+PVxuICAgICAgICAgICAgICAgICAgICAgICAgNjU1MzZcbiAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDM2KSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBiID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDQwKSA+PiAyXSB8IDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGIgPSBiID4+IDE2O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGYgPSAoZSArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyA0NCkgfCAwO1xuICAgICAgICAgICAgICAgIGNbZiA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgIChjW2YgPj4gMl0gfCAwKSArXG4gICAgICAgICAgICAgICAgICAgIChjWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDQ4KSA+PiAyXSB8IDApO1xuICAgICAgICAgICAgICAgIGdbKGUgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgNzYpID4+IDJdID1cbiAgICAgICAgICAgICAgICAgICAgMS4wIC1cbiAgICAgICAgICAgICAgICAgICAgKCtSKFxuICAgICAgICAgICAgICAgICAgICAgICAgKyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1soZSArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyA0NCkgPj4gMl0gPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgKiAwLjAwNjEzNTkyMzE1MTU0MjU2NVxuICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICApICtcbiAgICAgICAgICAgICAgICAgICAgICAgIDEuMCkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgKyhiIHwgMCkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgMS4wICpcbiAgICAgICAgICAgICAgICAgICAgICAgIDc2MjkzOTQ1MzEyNS4wZS0xNztcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBiWChiLCBkLCBlKSB7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGYgPSAwLFxuICAgICAgICAgICAgICAgICAgICBnID0gMDtcbiAgICAgICAgICAgICAgICBmID0gZDtcbiAgICAgICAgICAgICAgICBkID0gZTtcbiAgICAgICAgICAgICAgICBlID0gYjtcbiAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICBiID0gZDtcbiAgICAgICAgICAgICAgICAgICAgZCA9IChiIC0gMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGIgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBiID0gZjtcbiAgICAgICAgICAgICAgICAgICAgZiA9IChiICsgNCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBnID0gY1tiID4+IDJdID4+IDIxO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGcgfCAwKSA+IDEyNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgZyA9IDEyNztcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZyB8IDApIDwgLTEyOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGcgPSAtMTI4O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGIgPSBlO1xuICAgICAgICAgICAgICAgICAgICBlID0gKGIgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGFbYl0gPSBnICYgMjU1O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBiWShiLCBkLCBlKSB7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGYgPSAwLFxuICAgICAgICAgICAgICAgICAgICBnID0gMDtcbiAgICAgICAgICAgICAgICBmID0gZDtcbiAgICAgICAgICAgICAgICBkID0gZTtcbiAgICAgICAgICAgICAgICBlID0gYjtcbiAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICBiID0gZDtcbiAgICAgICAgICAgICAgICAgICAgZCA9IChiIC0gMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGIgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBiID0gZjtcbiAgICAgICAgICAgICAgICAgICAgZiA9IChiICsgNCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBnID0gY1tiID4+IDJdID4+IDIxO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGcgfCAwKSA+IDEyNykge1xuICAgICAgICAgICAgICAgICAgICAgICAgZyA9IDEyNztcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZyB8IDApIDwgLTEyOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGcgPSAtMTI4O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGIgPSBlO1xuICAgICAgICAgICAgICAgICAgICBlID0gKGIgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGFbYl0gPSAoMTI4IF4gKGcgJiAyNTUpKSAmIDI1NTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYlooYSwgZCwgZSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBkID0gZCB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGUgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDA7XG4gICAgICAgICAgICAgICAgZiA9IGQ7XG4gICAgICAgICAgICAgICAgZCA9IGU7XG4gICAgICAgICAgICAgICAgZSA9IGE7XG4gICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgYSA9IGQ7XG4gICAgICAgICAgICAgICAgICAgIGQgPSAoYSAtIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChhIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYSA9IGY7XG4gICAgICAgICAgICAgICAgICAgIGYgPSAoYSArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgZyA9IGNbYSA+PiAyXSA+PiAxMztcbiAgICAgICAgICAgICAgICAgICAgaWYgKChnIHwgMCkgPiAzMjc2Nykge1xuICAgICAgICAgICAgICAgICAgICAgICAgZyA9IDMyNzY3O1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChnIHwgMCkgPCAtMzI3NjgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID0gLTMyNzY4O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGEgPSBlO1xuICAgICAgICAgICAgICAgICAgICBlID0gKGEgKyAyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGJbYSA+PiAxXSA9IGcgJiA2NTUzNTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYl8oYSwgZCwgZSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBkID0gZCB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGUgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDA7XG4gICAgICAgICAgICAgICAgZiA9IGQ7XG4gICAgICAgICAgICAgICAgZCA9IGU7XG4gICAgICAgICAgICAgICAgZSA9IGE7XG4gICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgYSA9IGQ7XG4gICAgICAgICAgICAgICAgICAgIGQgPSAoYSAtIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChhIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYSA9IGY7XG4gICAgICAgICAgICAgICAgICAgIGYgPSAoYSArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgZyA9IGNbYSA+PiAyXSA+PiAxMztcbiAgICAgICAgICAgICAgICAgICAgaWYgKChnIHwgMCkgPiAzMjc2Nykge1xuICAgICAgICAgICAgICAgICAgICAgICAgZyA9IDMyNzY3O1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChnIHwgMCkgPCAtMzI3NjgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID0gLTMyNzY4O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGEgPSBlO1xuICAgICAgICAgICAgICAgICAgICBlID0gKGEgKyAyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGJbYSA+PiAxXSA9ICgzMjc2OCBeIChnICYgNjU1MzUpKSAmIDY1NTM1O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBiJChhLCBkLCBlKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGYgPSAwLFxuICAgICAgICAgICAgICAgICAgICBnID0gMDtcbiAgICAgICAgICAgICAgICBmID0gZDtcbiAgICAgICAgICAgICAgICBkID0gZTtcbiAgICAgICAgICAgICAgICBlID0gYTtcbiAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICBhID0gZDtcbiAgICAgICAgICAgICAgICAgICAgZCA9IChhIC0gMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGEgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBhID0gZjtcbiAgICAgICAgICAgICAgICAgICAgZiA9IChhICsgNCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBnID0gY1thID4+IDJdID4+IDEzO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGcgfCAwKSA+IDMyNzY3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBnID0gMzI3Njc7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGcgfCAwKSA8IC0zMjc2OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGcgPSAtMzI3Njg7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYSA9IGU7XG4gICAgICAgICAgICAgICAgICAgIGUgPSAoYSArIDIpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgYlthID4+IDFdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICgoKCgoKGcgJiA2NTUzNSkgPDwgMTYpID4+IDE2KSAmIDI1NSkgPDwgOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKCgoZyAmIDY1NTM1KSA8PCAxNikgPj4gMTYpID4+IDgpICYgMjU1KSkgJlxuICAgICAgICAgICAgICAgICAgICAgICAgNjU1MzU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGIwKGIsIGQsIGUsIGYpIHtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgZCA9IGQgfCAwO1xuICAgICAgICAgICAgICAgIGUgPSBlIHwgMDtcbiAgICAgICAgICAgICAgICBmID0gZiB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGcgPSAwLFxuICAgICAgICAgICAgICAgICAgICBoID0gMDtcbiAgICAgICAgICAgICAgICBnID0gaTtcbiAgICAgICAgICAgICAgICBpID0gKGkgKyA4KSB8IDA7XG4gICAgICAgICAgICAgICAgaCA9IGcgfCAwO1xuICAgICAgICAgICAgICAgIGNbaCA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgYVsoaCArIDUpIHwgMF0gPSAxO1xuICAgICAgICAgICAgICAgIGFbKGggKyA0KSB8IDBdID0gZCAmIDI1NTtcbiAgICAgICAgICAgICAgICBhWyhoICsgNikgfCAwXSA9IGUgJiAyNTU7XG4gICAgICAgICAgICAgICAgYVsoaCArIDcpIHwgMF0gPSBmICYgMjU1O1xuICAgICAgICAgICAgICAgIGIxKGIsIGgpO1xuICAgICAgICAgICAgICAgIGkgPSBnO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGIxKGIsIGUpIHtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGUgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGggPSAwLFxuICAgICAgICAgICAgICAgICAgICBpID0gMDtcbiAgICAgICAgICAgICAgICBmID0gYjtcbiAgICAgICAgICAgICAgICBiID0gZTtcbiAgICAgICAgICAgICAgICBlID0gY1soZiArIDEzMDUyKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgZyA9IC0xO1xuICAgICAgICAgICAgICAgIGggPSAyMTQ3NDgzNjQ3O1xuICAgICAgICAgICAgICAgIGlmICgwID09IChiIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGNbKGYgKyAxMzA4MCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBiO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICBiID0gZTtcbiAgICAgICAgICAgICAgICAgICAgZSA9IChiIC0gMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGIgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoKGRbKGYgKyAxNzI0ICsgKChlICogMjM2KSB8IDApKSB8IDBdIHwgMCB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGcgPSBlO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGYgKyAxNzI0ICsgKChlICogMjM2KSB8IDApICsgMSkgfCAwXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhpICsgNCkgfCAwXSB8IDAgfCAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZiArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkgKyAyKSB8IDBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGkgKyA2KSB8IDBdIHwgMCB8IDApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDg0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKGRbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGYgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNzI0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChlICogMjM2KSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOCkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaChmLCBlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoKGcgfCAwKSAhPSAtMSkge1xuICAgICAgICAgICAgICAgICAgICBjbihmLCBpLCBnKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBlID0gY1soZiArIDEzMDUyKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgYiA9IGU7XG4gICAgICAgICAgICAgICAgICAgIGUgPSAoYiAtIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChiIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhmICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSkgfCAwXSB8IDAgfCAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDFcbiAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGYgKyAxNzI0ICsgKChlICogMjM2KSB8IDApKSB8IDBdIHwgMCB8IDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGIgPSBjWyhmICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSArIDYwKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZiArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkgKyAyMzIpID4+IDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZiArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkgKyA2NCkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPD1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYiB8IDApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGIgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChmICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSArIDY0KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChiIHwgMCkgPCAoaCB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGggPSBiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID0gZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoKGcgfCAwKSAhPSAtMSkge1xuICAgICAgICAgICAgICAgICAgICBlID0gKGYgKyAxMzA2OCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBjW2UgPj4gMl0gPSAoY1tlID4+IDJdIHwgMCkgKyAxO1xuICAgICAgICAgICAgICAgICAgICBhWyhmICsgMTcyNCArICgoZyAqIDIzNikgfCAwKSkgfCAwXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgIGNuKGYsIGksIGcpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZyA9IChmICsgMTMwNjQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1tnID4+IDJdID0gKGNbZyA+PiAyXSB8IDApICsgMTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGIyKGIsIGUpIHtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGUgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGggPSAwO1xuICAgICAgICAgICAgICAgIGYgPSBiO1xuICAgICAgICAgICAgICAgIGIgPSBlO1xuICAgICAgICAgICAgICAgIGUgPSBjWyhmICsgMTMwNTIpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBpZiAoMCA9PSAoYiB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgIGcgPSBjWyhmICsgMTMwODApID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBnID0gYjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgTDg5MDogd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgYiA9IGU7XG4gICAgICAgICAgICAgICAgICAgIGUgPSAoYiAtIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChiIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaCA9IDcwOTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZiArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkpIHwgMF0gfCAwIHwgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAxXG4gICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhmICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSArIDEpIHwgMF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZyArIDQpIHwgMF0gfCAwIHwgMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGYgKyAxNzI0ICsgKChlICogMjM2KSB8IDApICsgMikgfCAwXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhnICsgNikgfCAwXSB8IDAgfCAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMODkwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgoaCB8IDApID09IDcwOSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAoZiArIDEwODQgKyAoKChkWyhnICsgNCkgfCAwXSB8IDApICogNDApIHwgMCkgKyAxMikgPj4gMlxuICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgYVsoZiArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkpIHwgMF0gPSAyO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGNpKGYsIGUpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBiMyhhKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBiID0gMDtcbiAgICAgICAgICAgICAgICBiID0gYTtcbiAgICAgICAgICAgICAgICBjW2IgPj4gMl0gPSAxO1xuICAgICAgICAgICAgICAgIGI0KGIpO1xuICAgICAgICAgICAgICAgIGI1KGIsIDApO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGI0KGEpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGIgPSAwO1xuICAgICAgICAgICAgICAgIGIgPSBhO1xuICAgICAgICAgICAgICAgIGdbKGIgKyAxNikgPj4gMl0gPSArKGNbKGIgKyAyMCkgPj4gMl0gfCAwKSAvIDEwMC4wO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGI1KGEsIGIpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBkID0gMDtcbiAgICAgICAgICAgICAgICBkID0gYTtcbiAgICAgICAgICAgICAgICBhID0gYjtcbiAgICAgICAgICAgICAgICBpZiAoKGNbKGQgKyAxMzA4OCkgPj4gMl0gfCAwKSA+IChhIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgY1soZCArIDEzMDg4KSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNrKGQpO1xuICAgICAgICAgICAgICAgIGNbKGQgKyAxMzA4MCkgPj4gMl0gPSBjWyhkICsgMTMwNzYpID4+IDJdO1xuICAgICAgICAgICAgICAgIGNbMzkyXSA9IDVlNTtcbiAgICAgICAgICAgICAgICBpZiAoKGEgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY2woZCwgYSk7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gYjYoYiwgZSwgZiwgaCkge1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgZiA9IGYgfCAwO1xuICAgICAgICAgICAgICAgIGggPSBoIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgaiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGsgPSAwLFxuICAgICAgICAgICAgICAgICAgICBsID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG4gPSAwLFxuICAgICAgICAgICAgICAgICAgICBvID0gMCxcbiAgICAgICAgICAgICAgICAgICAgcCA9IDA7XG4gICAgICAgICAgICAgICAgaiA9IGk7XG4gICAgICAgICAgICAgICAgaSA9IChpICsgOCkgfCAwO1xuICAgICAgICAgICAgICAgIGsgPSBqIHwgMDtcbiAgICAgICAgICAgICAgICBsID0gYjtcbiAgICAgICAgICAgICAgICBjW2sgPj4gMl0gPSBlO1xuICAgICAgICAgICAgICAgIGUgPSBoO1xuICAgICAgICAgICAgICAgIGlmICgoY1tsID4+IDJdIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBtID0gMDtcbiAgICAgICAgICAgICAgICAgICAgbiA9IG07XG4gICAgICAgICAgICAgICAgICAgIGkgPSBqO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbiB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGggPSAoKGYgPj4+IDApIC8gKChjWyhsICsgMTIpID4+IDJdIHwgMCkgPj4+IDApKSB8IDA7XG4gICAgICAgICAgICAgICAgZiA9IGNbKGwgKyAxMzA4OCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIGIgPSAoKGNbKGwgKyAxMzA4OCkgPj4gMl0gfCAwKSArIGgpIHwgMDtcbiAgICAgICAgICAgICAgICBMOTIwOiB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGNbKGwgKyAxMzA4OCkgPj4gMl0gfCAwKSA+PSAoYiB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvID0gNzU4O1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB+figrKGNbY1sobCArIDEzMDgwKSA+PiAyXSA+PiAyXSB8IDApIC8gK2dbMjU4XSkgPj4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjWyhsICsgMTMwODgpID4+IDJdIHwgMCkgPj4+IDBcbiAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChkWygoY1sobCArIDEzMDgwKSA+PiAyXSB8IDApICsgNSkgfCAwXSB8IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDk5OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgwID09IChlIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8gPSA3NTI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMOTIwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDY6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChsICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDg0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChkW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGwgKyAxMzA4MCkgPj4gMl0gfCAwKSArIDQpIHwgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQwKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMikgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPSBkWygoY1sobCArIDEzMDgwKSA+PiAyXSB8IDApICsgNikgfCAwXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhWygoY1sobCArIDEzMDgwKSA+PiAyXSB8IDApICsgNikgfCAwXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYShsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAzOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGI3KGwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxMToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGwgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwODQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKGRbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1sobCArIDEzMDgwKSA+PiAyXSB8IDApICsgNCkgfCAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMyKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IGRbKChjWyhsICsgMTMwODApID4+IDJdIHwgMCkgKyA2KSB8IDBdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZ1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChsICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDg0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChkW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGwgKyAxMzA4MCkgPj4gMl0gfCAwKSArIDQpIHwgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQwKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzNikgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPSAwLjA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDE0OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNjKGwpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxMjoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjZChsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMTM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2IoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsoKGNbKGwgKyAxMzA4MCkgPj4gMl0gfCAwKSArIDQpIHwgMF0gfCAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDk6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjWyhsICsgMTMwNTYpID4+IDJdICZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjWyhsICsgMTMwODApID4+IDJdIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0pKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChsICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA4NCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKGRbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGwgKyAxMzA4MCkgPj4gMl0gfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0MCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbKChjWyhsICsgMTMwODApID4+IDJdIHwgMCkgKyA2KSB8IDBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwODQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChkW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjWyhsICsgMTMwODApID4+IDJdIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNCkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZFsoKGNbKGwgKyAxMzA4MCkgPj4gMl0gfCAwKSArIDYpIHwgMF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgNToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGwgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwODQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKGRbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1sobCArIDEzMDgwKSA+PiAyXSB8IDApICsgNCkgfCAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IGRbKChjWyhsICsgMTMwODApID4+IDJdIHwgMCkgKyA2KSB8IDBdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgNzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGwgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwODQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKGRbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1sobCArIDEzMDgwKSA+PiAyXSB8IDApICsgNCkgfCAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI0KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IGRbKChjWyhsICsgMTMwODApID4+IDJdIHwgMCkgKyA2KSB8IDBdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYjkobCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFbKChjWyhsICsgMTMwODApID4+IDJdIHwgMCkgKyA3KSB8IDBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGIxKGwsIDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYjIobCwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMTU6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChsICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDg0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChkW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGwgKyAxMzA4MCkgPj4gMl0gfCAwKSArIDQpIHwgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQwKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IGRbKChjWyhsICsgMTMwODApID4+IDJdIHwgMCkgKyA2KSB8IDBdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMTA6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1szOTJdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWygoY1sobCArIDEzMDgwKSA+PiAyXSB8IDApICsgNCkgfCAwXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKChjWyhsICsgMTMwODApID4+IDJdIHwgMCkgKyA3KSB8IDBdIDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKChjWyhsICsgMTMwODApID4+IDJdIHwgMCkgKyA2KSB8IDBdIDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSA4OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA4NCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgoZFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjWyhsICsgMTMwODApID4+IDJdIHwgMCkgKyA0KSB8IDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0MCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjApID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWygoY1sobCArIDEzMDgwKSA+PiAyXSB8IDApICsgNikgfCAwXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKChjWyhsICsgMTMwODApID4+IDJdIHwgMCkgKyA3KSB8IDBdIDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA4NCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgoZFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjWyhsICsgMTMwODApID4+IDJdIHwgMCkgKyA0KSB8IDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0MCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzYpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gMC4wO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiOChsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgNDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGwgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwODQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKGRbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1sobCArIDEzMDgwKSA+PiAyXSB8IDApICsgNCkgfCAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gZFsoKGNbKGwgKyAxMzA4MCkgPj4gMl0gfCAwKSArIDYpIHwgMF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiOShsKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMjoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiMihsLCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBwID0gKGwgKyAxMzA4MCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1twID4+IDJdID0gKGNbcCA+PiAyXSB8IDApICsgODtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICB+figrKGNbY1sobCArIDEzMDgwKSA+PiAyXSA+PiAyXSB8IDApIC8gK2dbMjU4XSkgPj4+IDAgPlxuICAgICAgICAgICAgICAgICAgICAgICAgYiA+Pj4gMFxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNlKGwsIGssIChiIC0gKGNbKGwgKyAxMzA4OCkgPj4gMl0gfCAwKSkgfCAwKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNlKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGwsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgayxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAofn4oKyhjW2NbKGwgKyAxMzA4MCkgPj4gMl0gPj4gMl0gfCAwKSAvICtnWzI1OF0pIC1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbKGwgKyAxMzA4OCkgPj4gMl0gfCAwKSkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgobyB8IDApID09IDc1Mikge1xuICAgICAgICAgICAgICAgICAgICBjW2wgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgICAgICBtID1cbiAgICAgICAgICAgICAgICAgICAgICAgIF8oXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjWyhsICsgMTMwODgpID4+IDJdIHwgMCkgLSBmKSB8IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1sobCArIDEyKSA+PiAyXSB8IDBcbiAgICAgICAgICAgICAgICAgICAgICAgICkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBuID0gbTtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGo7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuIHwgMDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKChvIHwgMCkgPT0gNzU4KSB7XG4gICAgICAgICAgICAgICAgICAgIG0gPSBfKGgsIGNbKGwgKyAxMikgPj4gMl0gfCAwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIG4gPSBtO1xuICAgICAgICAgICAgICAgICAgICBpID0gajtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG4gfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGI3KGIpIHtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGggPSAwO1xuICAgICAgICAgICAgICAgIGUgPSBiO1xuICAgICAgICAgICAgICAgIGIgPSBjWyhlICsgMTMwODApID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBmID0gY1soZSArIDEzMDUyKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgTDk2Nzogd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgZyA9IGY7XG4gICAgICAgICAgICAgICAgICAgIGYgPSAoZyAtIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChnIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaCA9IDc3MjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZSArIDE3MjQgKyAoKGYgKiAyMzYpIHwgMCkpIHwgMF0gfCAwIHwgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAxXG4gICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhlICsgMTcyNCArICgoZiAqIDIzNikgfCAwKSArIDEpIHwgMF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoYiArIDQpIHwgMF0gfCAwIHwgMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGUgKyAxNzI0ICsgKChmICogMjM2KSB8IDApICsgMikgfCAwXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhiICsgNikgfCAwXSB8IDAgfCAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMOTY3O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgoaCB8IDApID09IDc3Mikge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGFbKGUgKyAxNzI0ICsgKChmICogMjM2KSB8IDApICsgMykgfCAwXSA9IGFbKGIgKyA3KSB8IDBdIHwgMDtcbiAgICAgICAgICAgICAgICBjZihlLCBmKTtcbiAgICAgICAgICAgICAgICBiSihlLCBmKTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBiOChhKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBiID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGYgPSAwO1xuICAgICAgICAgICAgICAgIGIgPSBhO1xuICAgICAgICAgICAgICAgIGEgPSBkWygoY1soYiArIDEzMDgwKSA+PiAyXSB8IDApICsgNCkgfCAwXSB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGNbKGIgKyAxMzA1MikgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGYgPSBlO1xuICAgICAgICAgICAgICAgICAgICBlID0gKGYgLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoYiArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkpIHwgMF0gfCAwIHwgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhiICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSArIDEpIHwgMF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYSB8IDApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaihiLCBlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGI5KGEpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGIgPSAwLFxuICAgICAgICAgICAgICAgICAgICBlID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZiA9IDA7XG4gICAgICAgICAgICAgICAgYiA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IGRbKChjWyhiICsgMTMwODApID4+IDJdIHwgMCkgKyA0KSB8IDBdIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gY1soYiArIDEzMDUyKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgZiA9IGU7XG4gICAgICAgICAgICAgICAgICAgIGUgPSAoZiAtIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChmIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhiICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSArIDEpIHwgMF0gfCAwIHwgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYSB8IDApXG4gICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhiICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSkgfCAwXSB8IDAgfCAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhiICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSkgfCAwXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjZihiLCBlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiSihiLCBlKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNhKGEpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGIgPSAwLFxuICAgICAgICAgICAgICAgICAgICBlID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZiA9IDA7XG4gICAgICAgICAgICAgICAgYiA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IGNbKGIgKyAxMzA1MikgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIGUgPSBkWygoY1soYiArIDEzMDgwKSA+PiAyXSB8IDApICsgNCkgfCAwXSB8IDA7XG4gICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgZiA9IGE7XG4gICAgICAgICAgICAgICAgICAgIGEgPSAoZiAtIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChmIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhiICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSkgfCAwXSB8IDAgfCAwKSA9PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGIgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgMSkgfCAwXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChlIHwgMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNpKGIsIGEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY2IoYSwgYikge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGQgPSAwO1xuICAgICAgICAgICAgICAgIGQgPSBhO1xuICAgICAgICAgICAgICAgIGEgPSBiO1xuICAgICAgICAgICAgICAgIGNbKGQgKyAxMDg0ICsgKChhICogNDApIHwgMCkgKyA4KSA+PiAyXSA9IDkwO1xuICAgICAgICAgICAgICAgIGNbKGQgKyAxMDg0ICsgKChhICogNDApIHwgMCkgKyAyNCkgPj4gMl0gPSAxMjc7XG4gICAgICAgICAgICAgICAgY1soZCArIDEwODQgKyAoKGEgKiA0MCkgfCAwKSArIDEyKSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgY1soZCArIDEwODQgKyAoKGEgKiA0MCkgfCAwKSArIDIwKSA+PiAyXSA9IDgxOTI7XG4gICAgICAgICAgICAgICAgZ1soZCArIDEwODQgKyAoKGEgKiA0MCkgfCAwKSArIDM2KSA+PiAyXSA9IDAuMDtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjYyhiKSB7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBlID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGcgPSAwO1xuICAgICAgICAgICAgICAgIGUgPSBiO1xuICAgICAgICAgICAgICAgIGIgPSBjWyhlICsgMTMwNTIpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBmID0gZFsoKGNbKGUgKyAxMzA4MCkgPj4gMl0gfCAwKSArIDQpIHwgMF0gfCAwO1xuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGcgPSBiO1xuICAgICAgICAgICAgICAgICAgICBiID0gKGcgLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZyB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZSArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkpIHwgMF0gfCAwIHwgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAxXG4gICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhlICsgMTcyNCArICgoYiAqIDIzNikgfCAwKSArIDEpIHwgMF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZiB8IDApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjWyhlICsgMTA4NCArICgoZiAqIDQwKSB8IDApICsgMTIpID4+IDJdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYVsoZSArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkpIHwgMF0gPSAyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNpKGUsIGIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNkKGEpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGIgPSAwLFxuICAgICAgICAgICAgICAgICAgICBlID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZiA9IDA7XG4gICAgICAgICAgICAgICAgYiA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IGNbKGIgKyAxMzA1MikgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIGUgPSBkWygoY1soYiArIDEzMDgwKSA+PiAyXSB8IDApICsgNCkgfCAwXSB8IDA7XG4gICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgZiA9IGE7XG4gICAgICAgICAgICAgICAgICAgIGEgPSAoZiAtIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChmIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhiICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDEpIHwgMF0gfCAwIHwgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZSB8IDApXG4gICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhiICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSkgfCAwXSB8IDAgfCAwKSA9PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhiICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSkgfCAwXSB8IDAgfCAwKSA9PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaChiLCBhKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNlKGEsIGIsIGQpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGYgPSAwLFxuICAgICAgICAgICAgICAgICAgICBnID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGkgPSAwLFxuICAgICAgICAgICAgICAgICAgICBqID0gMDtcbiAgICAgICAgICAgICAgICBlID0gYTtcbiAgICAgICAgICAgICAgICBhID0gYjtcbiAgICAgICAgICAgICAgICBiID0gZDtcbiAgICAgICAgICAgICAgICBpZiAoKChjWyhlICsgOCkgPj4gMl0gJiAxKSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgZiA9IDE7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZiA9IDI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoYiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGQgPSBiO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGQgfCAwKSA+IChjWyhlICsgMTA2NCkgPj4gMl0gfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZCA9IGNbKGUgKyAxMDY0KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY2coZSwgZCk7XG4gICAgICAgICAgICAgICAgICAgIGcgPSBjWyhlICsgMTA2MCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBoID0gY1thID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGNbKGUgKyAxMDcyKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGogPSBfKGYsIGQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgYVpbZyAmIDE1XShoLCBpLCBqKTtcbiAgICAgICAgICAgICAgICAgICAgaiA9IF8oY1soZSArIDEyKSA+PiAyXSB8IDAsIGQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGE7XG4gICAgICAgICAgICAgICAgICAgIGNbaSA+PiAyXSA9IChjW2kgPj4gMl0gfCAwKSArIGo7XG4gICAgICAgICAgICAgICAgICAgIGIgPSAoYiAtIGQpIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY2YoYSwgYikge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaCA9IDA7XG4gICAgICAgICAgICAgICAgZSA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IGI7XG4gICAgICAgICAgICAgICAgYiA9XG4gICAgICAgICAgICAgICAgICAgIF8oXG4gICAgICAgICAgICAgICAgICAgICAgICBkWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDMpIHwgMF0gfCAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwODQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChkWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDEpIHwgMF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOCkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgXSB8IDBcbiAgICAgICAgICAgICAgICAgICAgKSB8IDA7XG4gICAgICAgICAgICAgICAgZiA9XG4gICAgICAgICAgICAgICAgICAgIF8oXG4gICAgICAgICAgICAgICAgICAgICAgICBiLFxuICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwODQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChkWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDEpIHwgMF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjQpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgIF0gfCAwXG4gICAgICAgICAgICAgICAgICAgICkgfCAwO1xuICAgICAgICAgICAgICAgIGlmICgoKGNbKGUgKyA4KSA+PiAyXSAmIDEpIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBjWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDIzMikgPj4gMl0gPSAzO1xuICAgICAgICAgICAgICAgICAgICBnWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDY4KSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICArKGYgfCAwKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICArZ1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGUgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgNCkgPj4gMl0gfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg0KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICBdICpcbiAgICAgICAgICAgICAgICAgICAgICAgICtnWyhlICsgMTYpID4+IDJdICpcbiAgICAgICAgICAgICAgICAgICAgICAgIDQuNzY4MzcxNTgyMDMxMjVlLTc7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGNbKGUgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgMjI4KSA+PiAyXSB8IDApID4gNjApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1soZSArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyAyMjgpID4+IDJdIHwgMCkgPj1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA2OFxuICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaCA9IDgyNztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNbKGUgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgMjMyKSA+PiAyXSA9IDM7XG4gICAgICAgICAgICAgICAgICAgICAgICBnWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDY4KSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKyhmIHwgMCkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICtnW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGUgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgNCkgPj4gMl0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgODQpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgK2dbKGUgKyAxNikgPj4gMl0gKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQuNzY4MzcxNTgyMDMxMjVlLTc7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBoID0gODI3O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgaWYgKChoIHwgMCkgPT0gODI3KSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoY1soZSArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyAyMjgpID4+IDJdIHwgMCkgPCA1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDIzMikgPj4gMl0gPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgZ1soZSArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyA2OCkgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICsoZiB8IDApICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArZ1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDQpID4+IDJdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDg0KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICtnWyhlICsgMTYpID4+IDJdICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA5LjUzNjc0MzE2NDA2MjVlLTc7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbKGUgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgMjI4KSA+PiAyXSB8IDApID5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjNcbiAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGUgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgMjMyKSA+PiAyXSA9IDI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZ1soZSArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyA2OCkgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArKGYgfCAwKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICtnW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDQpID4+IDJdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgODQpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgK2dbKGUgKyAxNikgPj4gMl0gKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA5LjUzNjc0MzE2NDA2MjVlLTc7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGUgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgMjMyKSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZ1soZSArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyA2OCkgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArKGYgfCAwKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICtnW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDQpID4+IDJdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgODQpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgK2dbKGUgKyAxNikgPj4gMl0gKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA3LjQ1MDU4MDU5NjkyMzgyOGUtOTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDcyKSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICtnWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDY4KSA+PiAyXSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDIyOCkgPj4gMl0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYgPSAoZSArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyA2OCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGdbZiA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICtnW2YgPj4gMl0gKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEyNyAtXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChlICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE3MjQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChhICogMjM2KSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIyOCkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjZyhhLCBiKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGYgPSAwO1xuICAgICAgICAgICAgICAgIGUgPSBhO1xuICAgICAgICAgICAgICAgIGEgPSBiO1xuICAgICAgICAgICAgICAgIGlmICgoKGNbKGUgKyA4KSA+PiAyXSAmIDEpIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBmID0gYSA8PCAyO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGYgPSBhIDw8IDM7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGM1KGNbKGUgKyAxMDcyKSA+PiAyXSB8IDAsIDAsIGYgfCAwKTtcbiAgICAgICAgICAgICAgICBmID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGYgfCAwKSA+PSAoY1soZSArIDEzMDUyKSA+PiAyXSB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoKGRbKGUgKyAxNzI0ICsgKChmICogMjM2KSB8IDApKSB8IDBdIHwgMCB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJLKGUsIGNbKGUgKyAxMDcyKSA+PiAyXSB8IDAsIGYsIGEpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGYgPSAoZiArIDEpIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZiA9IChlICsgMTMwODgpIHwgMDtcbiAgICAgICAgICAgICAgICBjW2YgPj4gMl0gPSAoY1tmID4+IDJdIHwgMCkgKyBhO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNoKGIsIGMpIHtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgYyA9IGMgfCAwO1xuICAgICAgICAgICAgICAgIGFbKGIgKyAxNzI0ICsgKChjICogMjM2KSB8IDApKSB8IDBdID0gNDtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjaShiLCBkKSB7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGYgPSAwO1xuICAgICAgICAgICAgICAgIGUgPSBiO1xuICAgICAgICAgICAgICAgIGIgPSBkO1xuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgKChhW1xuICAgICAgICAgICAgICAgICAgICAgICAgKChjWyhlICsgMTcyNCArICgoYiAqIDIzNikgfCAwKSArIDQpID4+IDJdIHwgMCkgKyAxMTApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgIF0gJlxuICAgICAgICAgICAgICAgICAgICAgICAgNjQpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgY1soZSArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkgKyAyMjApID4+IDJdID0gMztcbiAgICAgICAgICAgICAgICAgICAgYVsoZSArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkpIHwgMF0gPSAzO1xuICAgICAgICAgICAgICAgICAgICBkID0gZTtcbiAgICAgICAgICAgICAgICAgICAgZiA9IGI7XG4gICAgICAgICAgICAgICAgICAgIGJJKGQsIGYpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgYkooZSwgYik7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBhWyhlICsgMTcyNCArICgoYiAqIDIzNikgfCAwKSkgfCAwXSA9IDM7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjaihhLCBiKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGYgPSAwLFxuICAgICAgICAgICAgICAgICAgICBpID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGwgPSAwLFxuICAgICAgICAgICAgICAgICAgICBtID0gMC4wO1xuICAgICAgICAgICAgICAgIGUgPSBhO1xuICAgICAgICAgICAgICAgIGEgPSBiO1xuICAgICAgICAgICAgICAgIGIgPSAoKGNbKGUgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgMjApID4+IDJdIHwgMCkgPCAwKSB8IDA7XG4gICAgICAgICAgICAgICAgZiA9XG4gICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAoZSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA4NCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgoZFsoZSArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyAxKSB8IDBdIHwgMCkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0MCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMjApID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICBdIHwgMDtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgIChjW1xuICAgICAgICAgICAgICAgICAgICAgICAgKChjWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDQpID4+IDJdIHwgMCkgKyAxMikgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgoY1soZSArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyAyMTIpID4+IDJdIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBpID0gMzI7XG4gICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBqID0gaTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGkgPSAoaiAtIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoaiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGUgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgODAgKyAoaSA8PCAyKSkgPj4gMlxuICAgICAgICAgICAgICAgICAgICAgICAgXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGYgfCAwKSA9PSA4MTkyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsID0gODY2O1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChmIHwgMCkgPCAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbCA9IDg2NjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZiB8IDApID4gMTYzODMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsID0gODY2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgZiA9IChmIC0gODE5MikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICtnW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDg0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKGRbKGUgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgMSkgfCAwXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQwKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzYpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9PSAwLjBcbiAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGUgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDg0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgoZFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChlICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNzI0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGEgKiAyMzYpIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzIpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfCAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZiB8IDApIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0gLWkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqID0gKDE3MDQgKyAoKChpID4+IDUpICYgMjU1KSA8PCAzKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbayA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkW2pdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhqICsgMSkgfCAwXSA8PCA4KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoaiArIDIpIHwgMF0gPDwgMTYpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhqICsgMykgfCAwXSA8PCAyNCkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1soayArIDQpID4+IDJdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbKGogKyA0KSB8IDBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhqICsgNSkgfCAwXSA8PCA4KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoaiArIDYpIHwgMF0gPDwgMTYpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhqICsgNykgfCAwXSA8PCAyNCkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAraFtrID4+IDNdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqID0gKDM3NTIgKyAoKGkgPj4gMTMpIDw8IDMpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZ1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGUgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA4NCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChkWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDEpIHwgMF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0MCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM2KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjW2sgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZFtqXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoaiArIDEpIHwgMF0gPDwgOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGogKyAyKSB8IDBdIDw8IDE2KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoaiArIDMpIHwgMF0gPDwgMjQpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbKGsgKyA0KSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWyhqICsgNCkgfCAwXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoaiArIDUpIHwgMF0gPDwgOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGogKyA2KSB8IDBdIDw8IDE2KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoaiArIDcpIHwgMF0gPDwgMjQpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgK2hbayA+PiAzXSk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGYgfCAwKSA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDEyKSA+PiAyXSA9IH5+KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArZ1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChlICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDg0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChkW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZSArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyAxKSB8IDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0MCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzYpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyhjWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDgpID4+IDJdIHwgMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDEyKSA+PiAyXSA9IH5+KFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soZSArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyA4KSA+PiAyXSB8IDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSAvXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICtnW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGUgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwODQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKGRbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDEpIHwgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQwKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzNikgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgaWYgKChsIHwgMCkgPT0gODY2KSB7XG4gICAgICAgICAgICAgICAgICAgIGNbKGUgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgMTIpID4+IDJdID1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNbKGUgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgOCkgPj4gMl07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIG0gPVxuICAgICAgICAgICAgICAgICAgICAoKCsoXG4gICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1soZSArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyA0KSA+PiAyXSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgIF0gfCAwXG4gICAgICAgICAgICAgICAgICAgICkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgKyhjWyhlICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDEyKSA+PiAyXSB8IDApKSAvXG4gICAgICAgICAgICAgICAgICAgICAgICAoKyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGUgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgNCkgPj4gMl0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzIpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8IDBcbiAgICAgICAgICAgICAgICAgICAgICAgICkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICsoY1soZSArIDQpID4+IDJdIHwgMCkpKSAqXG4gICAgICAgICAgICAgICAgICAgIDQwOTYuMDtcbiAgICAgICAgICAgICAgICBpZiAoKGIgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIG0gPSAtMC4wIC0gbTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY1soZSArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyAyMCkgPj4gMl0gPSB+fm07XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY2soYSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgYiA9IDA7XG4gICAgICAgICAgICAgICAgYiA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IDA7XG4gICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChhIHwgMCkgPj0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNiKGIsIGEpO1xuICAgICAgICAgICAgICAgICAgICBjWyhiICsgMTA4NCArICgoYSAqIDQwKSB8IDApICsgNCkgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgY1soYiArIDEwNTYpID4+IDJdO1xuICAgICAgICAgICAgICAgICAgICBjWyhiICsgMTA4NCArICgoYSAqIDQwKSB8IDApICsgMTYpID4+IDJdID0gLTE7XG4gICAgICAgICAgICAgICAgICAgIGNbKGIgKyAxMDg0ICsgKChhICogNDApIHwgMCkgKyAzMikgPj4gMl0gPSAyO1xuICAgICAgICAgICAgICAgICAgICBjWyhiICsgMTA4NCArICgoYSAqIDQwKSB8IDApKSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgIGEgPSAoYSArIDEpIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY20oYik7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY2woYSwgYikge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBmID0gMDtcbiAgICAgICAgICAgICAgICBlID0gYTtcbiAgICAgICAgICAgICAgICBhID0gYjtcbiAgICAgICAgICAgICAgICBjbShlKTtcbiAgICAgICAgICAgICAgICBMMTEyMzogd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgKyhjW2NbKGUgKyAxMzA4MCkgPj4gMl0gPj4gMl0gfCAwKSAvICtnWzI1OF0gPj1cbiAgICAgICAgICAgICAgICAgICAgICAgICsoYSB8IDApXG4gICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgc3dpdGNoIChkWygoY1soZSArIDEzMDgwKSA+PiAyXSB8IDApICsgNSkgfCAwXSB8IDAgfCAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDc6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDg0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKGRbKChjWyhlICsgMTMwODApID4+IDJdIHwgMCkgKyA0KSB8IDBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNCkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gZFsoKGNbKGUgKyAxMzA4MCkgPj4gMl0gfCAwKSArIDYpIHwgMF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxMzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNiKGUsIGRbKChjWyhlICsgMTMwODApID4+IDJdIHwgMCkgKyA0KSB8IDBdIHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDQ6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDg0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKGRbKChjWyhlICsgMTMwODApID4+IDJdIHwgMCkgKyA0KSB8IDBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPSBkWygoY1soZSArIDEzMDgwKSA+PiAyXSB8IDApICsgNikgfCAwXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDExOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGUgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA4NCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChkWygoY1soZSArIDEzMDgwKSA+PiAyXSB8IDApICsgNCkgfCAwXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQwKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzIpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IGRbKChjWyhlICsgMTMwODApID4+IDJdIHwgMCkgKyA2KSB8IDBdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDg0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKGRbKChjWyhlICsgMTMwODApID4+IDJdIHwgMCkgKyA0KSB8IDBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzNikgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gMC4wO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSA5OToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYgPSA5MDI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDExMjM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDk6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1soZSArIDEzMDU2KSA+PiAyXSAmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoMSA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGUgKyAxMzA4MCkgPj4gMl0gfCAwKSArIDQpIHwgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSkpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChlICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDg0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChkW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGUgKyAxMzA4MCkgPj4gMl0gfCAwKSArIDQpIHwgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQwKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IGRbKChjWyhlICsgMTMwODApID4+IDJdIHwgMCkgKyA2KSB8IDBdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGUgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwODQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKGRbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1soZSArIDEzMDgwKSA+PiAyXSB8IDApICsgNCkgfCAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gZFsoKGNbKGUgKyAxMzA4MCkgPj4gMl0gfCAwKSArIDYpIHwgMF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgODoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChlICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwODQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgoZFsoKGNbKGUgKyAxMzA4MCkgPj4gMl0gfCAwKSArIDQpIHwgMF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0MCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIwKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoKGNbKGUgKyAxMzA4MCkgPj4gMl0gfCAwKSArIDYpIHwgMF0gfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoZFsoKGNbKGUgKyAxMzA4MCkgPj4gMl0gfCAwKSArIDcpIHwgMF0gfCAwKSA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZ1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGUgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA4NCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChkWygoY1soZSArIDEzMDgwKSA+PiAyXSB8IDApICsgNCkgfCAwXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQwKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzYpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IDAuMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMTU6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDg0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKGRbKChjWyhlICsgMTMwODApID4+IDJdIHwgMCkgKyA0KSB8IDBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gZFsoKGNbKGUgKyAxMzA4MCkgPj4gMl0gfCAwKSArIDYpIHwgMF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxMDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMzkyXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWygoY1soZSArIDEzMDgwKSA+PiAyXSB8IDApICsgNCkgfCAwXSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChkWygoY1soZSArIDEzMDgwKSA+PiAyXSB8IDApICsgNykgfCAwXSB8IDApIDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4KSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoZFsoKGNbKGUgKyAxMzA4MCkgPj4gMl0gfCAwKSArIDYpIHwgMF0gfCAwKSA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSA1OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGUgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA4NCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChkWygoY1soZSArIDEzMDgwKSA+PiAyXSB8IDApICsgNCkgfCAwXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQwKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IGRbKChjWyhlICsgMTMwODApID4+IDJdIHwgMCkgKyA2KSB8IDBdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgNjoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChlICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwODQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgoZFsoKGNbKGUgKyAxMzA4MCkgPj4gMl0gfCAwKSArIDQpIHwgMF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0MCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPSBkWygoY1soZSArIDEzMDgwKSA+PiAyXSB8IDApICsgNikgfCAwXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYiA9IChlICsgMTMwODApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1tiID4+IDJdID0gKGNbYiA+PiAyXSB8IDApICsgODtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKChmIHwgMCkgPT0gOTAyKSB7XG4gICAgICAgICAgICAgICAgICAgIGNbKGUgKyAxMzA4OCkgPj4gMl0gPSB+fihcbiAgICAgICAgICAgICAgICAgICAgICAgICsoY1tjWyhlICsgMTMwODApID4+IDJdID4+IDJdIHwgMCkgLyArZ1syNThdXG4gICAgICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKChjWyhlICsgMTMwODApID4+IDJdIHwgMCkgIT0gKGNbKGUgKyAxMzA3NikgPj4gMl0gfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICBmID0gKGUgKyAxMzA4MCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBjW2YgPj4gMl0gPSAoY1tmID4+IDJdIHwgMCkgLSA4O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjWyhlICsgMTMwODgpID4+IDJdID0gYTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjbShiKSB7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBjID0gMDtcbiAgICAgICAgICAgICAgICBjID0gYjtcbiAgICAgICAgICAgICAgICBiID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGIgfCAwKSA+PSA0OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYVsoYyArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkpIHwgMF0gPSAwO1xuICAgICAgICAgICAgICAgICAgICBiID0gKGIgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNuKGIsIGUsIGYpIHtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGUgfCAwO1xuICAgICAgICAgICAgICAgIGYgPSBmIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgaCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGkgPSAwLFxuICAgICAgICAgICAgICAgICAgICBqID0gMCxcbiAgICAgICAgICAgICAgICAgICAgayA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGwgPSAwLFxuICAgICAgICAgICAgICAgICAgICBtID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG8gPSAwLFxuICAgICAgICAgICAgICAgICAgICBwID0gMCxcbiAgICAgICAgICAgICAgICAgICAgcSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHIgPSAwLFxuICAgICAgICAgICAgICAgICAgICBzID0gMCxcbiAgICAgICAgICAgICAgICAgICAgdCA9IDA7XG4gICAgICAgICAgICAgICAgaCA9IGI7XG4gICAgICAgICAgICAgICAgYiA9IGU7XG4gICAgICAgICAgICAgICAgZSA9IGY7XG4gICAgICAgICAgICAgICAgaWYgKCgoY1soaCArIDEzMDU2KSA+PiAyXSAmICgxIDw8IGRbKGIgKyA0KSB8IDBdKSkgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGYgPVxuICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChoICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU0MCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwODQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChkWyhiICsgNCkgfCAwXSB8IDApICogNDApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhiICsgNikgfCAwXSA8PCAyKSkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBmO1xuICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGYgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaiA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGggKyA1NDApID4+IDJdIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhiICsgNikgfCAwXSA8PCAyKSkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgPSBqO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoaiB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgIChjW2kgPj4gMl0gfCAwKSAhPSAxO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGFbKChjWyhpICsgNCkgPj4gMl0gfCAwKSArIDExMikgfCAwXSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGYgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxMDU2ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFbKChjWyhpICsgNCkgPj4gMl0gfCAwKSArIDExMikgfCAwXSA8PCAyKSkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBjWyhoICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSArIDgpID4+IDJdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkW2ZdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZiArIDEpIHwgMF0gPDwgOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhmICsgMikgfCAwXSA8PCAxNikgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhmICsgMykgfCAwXSA8PCAyNCk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmID0gKDEwNTYgKyAoKGFbKGIgKyA2KSB8IDBdICYgMTI3KSA8PCAyKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1soaCArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkgKyA4KSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFtmXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGYgKyAxKSB8IDBdIDw8IDgpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZiArIDIpIHwgMF0gPDwgMTYpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZiArIDMpIHwgMF0gPDwgMjQpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNbKGggKyAxNzI0ICsgKChlICogMjM2KSB8IDApICsgNCkgPj4gMl0gPSBjWyhpICsgNCkgPj4gMl07XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKC0xICE9IChjWygxNjQwICsgKGRbKGIgKyA0KSB8IDBdIDw8IDIpKSA+PiAyXSB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBmID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwODQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChkWyhiICsgNCkgfCAwXSB8IDApICogNDApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBqID0gY1soMTY0MCArIChkWyhiICsgNCkgfCAwXSA8PCAyKSkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDAgPT0gKGNbKGYgKyA0ICsgKGogPDwgMikpID4+IDJdIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsID0gaDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtID0gY1soKGNbZiA+PiAyXSB8IDApICsgKChqICogMjgpIHwgMCkpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuID0gKGsgfCAwKSAhPSAwID8gMSA6IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbyA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbZiA+PiAyXSB8IDApICsgKChqICogMjgpIHwgMCkgKyAxMikgPj4gMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soKGNbZiA+PiAyXSB8IDApICsgKChqICogMjgpIHwgMCkgKyA4KSA+PiAyXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1tmID4+IDJdIHwgMCkgKyAoKGogKiAyOCkgfCAwKSArIDQpID4+IDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjW2YgPj4gMl0gfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoaiAqIDI4KSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNCkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChrIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgciA9IGo7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByID0gLTE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IHI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbZiA+PiAyXSB8IDApICsgKChqICogMjgpIHwgMCkgKyAxNikgPj4gMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC0xXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbZiA+PiAyXSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChqICogMjgpIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNikgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcyA9IChrIHwgMCkgIT0gMCA/IDEgOiAtMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1tmID4+IDJdIHwgMCkgKyAoKGogKiAyOCkgfCAwKSArIDIwKSA+PiAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLTFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdCA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1tmID4+IDJdIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGogKiAyOCkgfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIwKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ID0gKGsgfCAwKSAhPSAwID8gMSA6IC0xO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhmICsgNCArIChqIDw8IDIpKSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJsKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0sXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcyxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1tmID4+IDJdIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGogKiAyOCkgfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI0KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHwgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGkgPSBjWyhmICsgNCArIChqIDw8IDIpKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChoICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwODQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgoZFsoYiArIDQpIHwgMF0gfCAwKSAqIDQwKSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLTFcbiAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgPSBjWyhoICsgMTA1MikgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA4NCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgoZFsoYiArIDQpIHwgMF0gfCAwKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQwKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGggK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA4NCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChkWyhiICsgNCkgfCAwXSB8IDApICogNDApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0gajtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoaiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1soaCArIDI4KSA+PiAyXSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGggK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDg0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgoZFsoYiArIDQpIHwgMF0gfCAwKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0MCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0gZjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZiB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICgoYVsoKGNbKGkgKyA0KSA+PiAyXSB8IDApICsgMTEyKSB8IDBdIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaiA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEwNTYgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYVsoKGNbKGkgKyA0KSA+PiAyXSB8IDApICsgMTEyKSB8IDBdIDw8IDIpKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbKGggKyAxNzI0ICsgKChlICogMjM2KSB8IDApICsgOCkgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbal0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhqICsgMSkgfCAwXSA8PCA4KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGogKyAyKSB8IDBdIDw8IDE2KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGogKyAzKSB8IDBdIDw8IDI0KTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGogPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxMDU2ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgoKGRbKGIgKyA2KSB8IDBdIHwgMCkgKyAoY1sxNjYyXSB8IDApKSAmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMjcpIDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyKSkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBjWyhoICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSArIDgpID4+IDJdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkW2pdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoaiArIDEpIHwgMF0gPDwgOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhqICsgMikgfCAwXSA8PCAxNikgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhqICsgMykgfCAwXSA8PCAyNCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgY1soaCArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkgKyA4KSA+PiAyXSA9IH5+KFxuICAgICAgICAgICAgICAgICAgICAgICAgKCsoY1soaCArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkgKyA4KSA+PiAyXSB8IDApICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICArZ1syNjBdKSAvXG4gICAgICAgICAgICAgICAgICAgICAgICA0NDAuMFxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICBjbyhoLCBlLCBpLCBkWyhiICsgNykgfCAwXSB8IDApO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBhWyhoICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSkgfCAwXSA9IDE7XG4gICAgICAgICAgICAgICAgYVsoaCArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkgKyAxKSB8IDBdID0gYVsoYiArIDQpIHwgMF0gfCAwO1xuICAgICAgICAgICAgICAgIGFbKGggKyAxNzI0ICsgKChlICogMjM2KSB8IDApICsgMikgfCAwXSA9IGFbKGIgKyA2KSB8IDBdIHwgMDtcbiAgICAgICAgICAgICAgICBhWyhoICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSArIDMpIHwgMF0gPVxuICAgICAgICAgICAgICAgICAgICBjcChcbiAgICAgICAgICAgICAgICAgICAgICAgIGFbKGIgKyA3KSB8IDBdIHwgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICtnWygxNTc2ICsgKGRbKGIgKyA0KSB8IDBdIDw8IDIpKSA+PiAyXVxuICAgICAgICAgICAgICAgICAgICApIHwgMDtcbiAgICAgICAgICAgICAgICBjWyhoICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSArIDE2KSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgY1soaCArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkgKyAyMCkgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgIGNbKGggKyAxNzI0ICsgKChlICogMjM2KSB8IDApICsgNDQpID4+IDJdID0gMDtcbiAgICAgICAgICAgICAgICBjWyhoICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSArIDQ4KSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGggKyAxNzI0ICsgKChlICogMjM2KSB8IDApICsgNCkgPj4gMl0gfCAwKSArIDk2KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgICAgICBjWyhoICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSArIDM2KSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGggKyAxNzI0ICsgKChlICogMjM2KSB8IDApICsgNCkgPj4gMl0gfCAwKSArIDkyKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgICAgICBjWyhoICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSArIDQwKSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgY1soaCArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkgKyA1MikgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgKChjWyhoICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSArIDQpID4+IDJdIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEwMCkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgIF07XG4gICAgICAgICAgICAgICAgY1soaCArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkgKyA1NikgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgIGNbKGggKyAxNzI0ICsgKChlICogMjM2KSB8IDApICsgMjEyKSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGggKyAxNzI0ICsgKChlICogMjM2KSB8IDApICsgNCkgPj4gMl0gfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA0KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgXTtcbiAgICAgICAgICAgICAgICBjWyhoICsgMTcyNCArICgoZSAqIDIzNikgfCAwKSArIDIwOCkgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgIGNbKGggKyAxNzI0ICsgKChlICogMjM2KSB8IDApICsgMjE2KSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgaSA9IDA7XG4gICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChpIHwgMCkgPj0gMzIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGNbKGggKyAxNzI0ICsgKChlICogMjM2KSB8IDApICsgODAgKyAoaSA8PCAyKSkgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgICAgICBpID0gKGkgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAoaCArIDEwODQgKyAoKChkWyhiICsgNCkgfCAwXSB8IDApICogNDApIHwgMCkgKyAxNikgPj4gMlxuICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgIC0xXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGNbKGggKyAxNzI0ICsgKChlICogMjM2KSB8IDApICsgMjI4KSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChoICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTA4NCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKGRbKGIgKyA0KSB8IDBdIHwgMCkgKiA0MCkgfCAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGNbKGggKyAxNzI0ICsgKChlICogMjM2KSB8IDApICsgMjI4KSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICBhW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1soaCArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkgKyA0KSA+PiAyXSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTExKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgIF0gfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjaihoLCBlKTtcbiAgICAgICAgICAgICAgICBjZihoLCBlKTtcbiAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICgoYVtcbiAgICAgICAgICAgICAgICAgICAgICAgICgoY1soaCArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkgKyA0KSA+PiAyXSB8IDApICsgMTEwKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICBdICZcbiAgICAgICAgICAgICAgICAgICAgICAgIDY0KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgIGNbKGggKyAxNzI0ICsgKChlICogMjM2KSB8IDApICsgMjIwKSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgIGNbKGggKyAxNzI0ICsgKChlICogMjM2KSB8IDApICsgMjQpID4+IDJdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgY1soaCArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkgKyAyMjQpID4+IDJdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgYiA9IGg7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBlO1xuICAgICAgICAgICAgICAgICAgICBiSShiLCBpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGJKKGgsIGUpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgY1soaCArIDE3MjQgKyAoKGUgKiAyMzYpIHwgMCkgKyAzMikgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgICAgICBiSihoLCBlKTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNvKGEsIGIsIGQsIGUpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGYgPSAwLFxuICAgICAgICAgICAgICAgICAgICBnID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGkgPSAwLFxuICAgICAgICAgICAgICAgICAgICBqID0gMDtcbiAgICAgICAgICAgICAgICBmID0gYTtcbiAgICAgICAgICAgICAgICBhID0gYjtcbiAgICAgICAgICAgICAgICBiID0gZDtcbiAgICAgICAgICAgICAgICBkID0gZTtcbiAgICAgICAgICAgICAgICBlID0gY1tiID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBnID0gY1soYiArIDQpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBpZiAoKGUgfCAwKSA9PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIGNbKGYgKyAxNzI0ICsgKChhICogMjM2KSB8IDApICsgNCkgPj4gMl0gPSBnO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGggPSBjWyhmICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDgpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBpID0gMDtcbiAgICAgICAgICAgICAgICBMMTIzMjogd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChpIHwgMCkgPj0gKGUgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChjWyhnICsgMTYpID4+IDJdIHwgMCkgPD0gKGQgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY1soZyArIDIwKSA+PiAyXSB8IDApIDwgKGQgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChjWyhnICsgMjQpID4+IDJdIHwgMCkgPiAoaCB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGNbKGcgKyAyOCkgPj4gMl0gfCAwKSA+PSAoaCB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGogPSA5Nzc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwxMjMyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgIGcgPSAoZyArIDExNikgfCAwO1xuICAgICAgICAgICAgICAgICAgICBpID0gKGkgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgoaiB8IDApID09IDk3Nykge1xuICAgICAgICAgICAgICAgICAgICBjWyhmICsgMTcyNCArICgoYSAqIDIzNikgfCAwKSArIDQpID4+IDJdID0gZztcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBqID0gMjE0NzQ4MzY0NztcbiAgICAgICAgICAgICAgICBkID0gY1soYiArIDQpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBnID0gZDtcbiAgICAgICAgICAgICAgICBiID0gZDtcbiAgICAgICAgICAgICAgICBpID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGkgfCAwKSA+PSAoZSB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBkID0gKChjWyhnICsgMzIpID4+IDJdIHwgMCkgLSBoKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZCB8IDApIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZCA9IC1kIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoKGQgfCAwKSA8IChqIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGogPSBkO1xuICAgICAgICAgICAgICAgICAgICAgICAgYiA9IGc7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZyA9IChnICsgMTE2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGkgPSAoaSArIDEpIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY1soZiArIDE3MjQgKyAoKGEgKiAyMzYpIHwgMCkgKyA0KSA+PiAyXSA9IGI7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY3AoYSwgYikge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBiID0gK2I7XG4gICAgICAgICAgICAgICAgbGV0IGQgPSAwLFxuICAgICAgICAgICAgICAgICAgICBlID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZiA9IDAuMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGggPSAwLFxuICAgICAgICAgICAgICAgICAgICBqID0gMCxcbiAgICAgICAgICAgICAgICAgICAgayA9IDA7XG4gICAgICAgICAgICAgICAgZCA9IGk7XG4gICAgICAgICAgICAgICAgZSA9IGE7XG4gICAgICAgICAgICAgICAgZiA9IGI7XG4gICAgICAgICAgICAgICAgaWYgKGYgPD0gMS4wKSB7XG4gICAgICAgICAgICAgICAgICAgIGcgPSB+figrKChlICYgMjU1KSB8IDApICogZik7XG4gICAgICAgICAgICAgICAgICAgIGggPSBnO1xuICAgICAgICAgICAgICAgICAgICBpID0gZDtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGggfCAwO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGEgPVxuICAgICAgICAgICAgICAgICAgICAgICAgKChlICYgMjU1KSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKH5+KCsoKDEyNyAtIChlICYgMjU1KSkgfCAwKSAqIChmIC0gMS4wKSkgJiAyNTUpKSAmXG4gICAgICAgICAgICAgICAgICAgICAgICAyNTU7XG4gICAgICAgICAgICAgICAgICAgIGogPSBlICYgMjU1O1xuICAgICAgICAgICAgICAgICAgICBlID0gYSAmIDI1NTtcbiAgICAgICAgICAgICAgICAgICAgYUcoXG4gICAgICAgICAgICAgICAgICAgICAgICA0Nzg0LFxuICAgICAgICAgICAgICAgICAgICAgICAgKChrID0gaSksXG4gICAgICAgICAgICAgICAgICAgICAgICAoaSA9IChpICsgMTYpIHwgMCksXG4gICAgICAgICAgICAgICAgICAgICAgICAoY1trID4+IDJdID0gaiksXG4gICAgICAgICAgICAgICAgICAgICAgICAoY1soayArIDgpID4+IDJdID0gZSksXG4gICAgICAgICAgICAgICAgICAgICAgICBrKSB8IDBcbiAgICAgICAgICAgICAgICAgICAgKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBrO1xuICAgICAgICAgICAgICAgICAgICBnID0gYTtcbiAgICAgICAgICAgICAgICAgICAgaCA9IGc7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBkO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gaCB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY3EoZCwgZSwgZiwgZykge1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgZiA9IGYgfCAwO1xuICAgICAgICAgICAgICAgIGcgPSBnIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgaCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGogPSAwLFxuICAgICAgICAgICAgICAgICAgICBrID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG0gPSAwLFxuICAgICAgICAgICAgICAgICAgICBuID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHAgPSAwLFxuICAgICAgICAgICAgICAgICAgICBxID0gMCxcbiAgICAgICAgICAgICAgICAgICAgciA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHMgPSAwLFxuICAgICAgICAgICAgICAgICAgICB0ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgdSA9IDA7XG4gICAgICAgICAgICAgICAgaCA9IGk7XG4gICAgICAgICAgICAgICAgaSA9IChpICsgNDApIHwgMDtcbiAgICAgICAgICAgICAgICBqID0gaCB8IDA7XG4gICAgICAgICAgICAgICAgayA9IChoICsgOCkgfCAwO1xuICAgICAgICAgICAgICAgIGwgPSAoaCArIDE2KSB8IDA7XG4gICAgICAgICAgICAgICAgbSA9IChoICsgMjQpIHwgMDtcbiAgICAgICAgICAgICAgICBuID0gKGggKyAzMikgfCAwO1xuICAgICAgICAgICAgICAgIG8gPSBkO1xuICAgICAgICAgICAgICAgIGQgPSBlO1xuICAgICAgICAgICAgICAgIGUgPSBmO1xuICAgICAgICAgICAgICAgIGYgPSBnO1xuICAgICAgICAgICAgICAgIGNbKGQgKyAxMzA5MikgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgIGNbKGQgKyAxMzA5NikgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgIGNbKGQgKyAxMzA4NCkgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChjUChvLCBuIHwgMCwgMSwgNCkgfCAwKSA9PSA0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGNQKG8sIGosIDQsIDEpIHwgMCkgIT0gMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgY1tqID4+IDJdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbaiA+PiAyXSAmIDI1NSkgPDwgMjQpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbaiA+PiAyXSAmIDY1MjgwKSA8PCA4KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjW2ogPj4gMl0gJiAxNjcxMTY4MCkgPj4gOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1tqID4+IDJdID4+IDI0KSAmIDI1NSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChjNChuIHwgMCwgNDc3NiwgNCkgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY1tqID4+IDJdIHwgMCkgPCA2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID0gbztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcCA9IGs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNQKGcsIHAsIDIsIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcCA9IG87XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGcgPSBsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjUChwLCBnLCAyLCAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGcgPSBvO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwID0gbTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1AoZywgcCwgMiwgMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiW2sgPj4gMV0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgoYltrID4+IDFdICYgMjU1KSA8PCA4KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChiW2sgPj4gMV0gPj4gOCkgJiAyNTUpKSAmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2NTUzNTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYltsID4+IDFdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKGJbbCA+PiAxXSAmIDI1NSkgPDwgOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoYltsID4+IDFdID4+IDgpICYgMjU1KSkgJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNjU1MzU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJbbSA+PiAxXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChiW20gPj4gMV0gJiAyNTUpIDw8IDgpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGJbbSA+PiAxXSA+PiA4KSAmIDI1NSkpICZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDY1NTM1O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGJbbSA+PiAxXSB8IDApIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLSgoKGJbbSA+PiAxXSB8IDApIC8gMjU2KSB8IDApIHwgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYlttID4+IDFdICYgMjU1XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gYlttID4+IDFdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGNbaiA+PiAyXSB8IDApID4gNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1EobywgKChjW2ogPj4gMl0gfCAwKSAtIDYpIHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChiW2sgPj4gMV0gfCAwKSA+PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChiW2sgPj4gMV0gfCAwKSA+IDIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGQgKyAxMzA4NCkgPj4gMl0gPSBiaSgxMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbY1soZCArIDEzMDg0KSA+PiAyXSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYVtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjWyhkICsgMTMwODQpID4+IDJdIHwgMCkgKyA1KSB8IDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGQgKyAxMzA4NCkgPj4gMl0gfCAwKSArIDgpID4+IDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwID0gKGQgKyAxMzA5MikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbcCA+PiAyXSA9IChjW3AgPj4gMl0gfCAwKSArIDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcCA9IGJbayA+PiAxXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKHAgfCAwKSA9PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAociB8IDApID49XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChiW2wgPj4gMV0gfCAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzID0gMTAyMztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNyKG8sIGQsIDApIHwgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgciA9IChyICsgMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChzIHwgMCkgPT0gMTAyMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3MoZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUgPSB0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKHAgfCAwKSA9PSAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAociB8IDApID49XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChiW2wgPj4gMV0gfCAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzID0gMTAzMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNyKG8sIGQsIDEpIHwgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgciA9IChyICsgMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChzIHwgMCkgPT0gMTAzMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3MoZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUgPSB0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKHAgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGNyKG8sIGQsIDApIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY3MoZCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUgPSB0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gdSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ID0gY3QoZCwgcSwgZSwgZikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUgPSB0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgPSBoO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1IHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ID0gdDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1IHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHQgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgdSA9IHQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBpID0gaDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB1IHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgIHQgPSAwO1xuICAgICAgICAgICAgICAgIHUgPSB0O1xuICAgICAgICAgICAgICAgIGkgPSBoO1xuICAgICAgICAgICAgICAgIHJldHVybiB1IHwgMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNyKGEsIGIsIGQpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGYgPSAwLFxuICAgICAgICAgICAgICAgICAgICBnID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGogPSAwLFxuICAgICAgICAgICAgICAgICAgICBrID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG0gPSAwLFxuICAgICAgICAgICAgICAgICAgICBuID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbyA9IDA7XG4gICAgICAgICAgICAgICAgZSA9IGk7XG4gICAgICAgICAgICAgICAgaSA9IChpICsgMTYpIHwgMDtcbiAgICAgICAgICAgICAgICBmID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgZyA9IChlICsgOCkgfCAwO1xuICAgICAgICAgICAgICAgIGggPSBhO1xuICAgICAgICAgICAgICAgIGEgPSBiO1xuICAgICAgICAgICAgICAgIGIgPSBjWyhhICsgMTMwODQpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZCB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqID0gMTA0NztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChjWyhiICsgOCkgPj4gMl0gfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiID0gY1soYiArIDgpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNbKGEgKyAxMzA5NikgPj4gMl0gPSBjW2IgPj4gMl07XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBqID0gMTA0NztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgIGlmICgoaiB8IDApID09IDEwNDcpIHtcbiAgICAgICAgICAgICAgICAgICAgY1soYSArIDEzMDk2KSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChjUChoLCBnIHwgMCwgMSwgNCkgfCAwKSA9PSA0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGNQKGgsIGYsIDQsIDEpIHwgMCkgIT0gMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgY1tmID4+IDJdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbZiA+PiAyXSAmIDI1NSkgPDwgMjQpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbZiA+PiAyXSAmIDY1MjgwKSA8PCA4KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjW2YgPj4gMl0gJiAxNjcxMTY4MCkgPj4gOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1tmID4+IDJdID4+IDI0KSAmIDI1NSk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGM0KGcgfCAwLCA2MjcyLCA0KSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrID0gLTI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbCA9IGs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGwgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gY3YoaCwgYSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0gPSBkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZCB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaiA9IDEwNTU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKG0gfCAwKSA9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqID0gMTA1NztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQgPSBjWyhiICsgOCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZCB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG4gPSAoY1tkID4+IDJdIHwgMCkgPCAoY1ttID4+IDJdIHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIW4pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGIgPSBkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gY1soYiArIDgpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1sobSArIDgpID4+IDJdID0gZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhiICsgOCkgPj4gMl0gPSBtO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8gPSAoYSArIDEzMDkyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tvID4+IDJdID0gKGNbbyA+PiAyXSB8IDApICsgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiID0gbTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoaiB8IDApID09IDEwNTUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrID0gLTI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbCA9IGs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGwgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmICgoaiB8IDApID09IDEwNTcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsID0gaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0gZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbCB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICBrID0gLTE7XG4gICAgICAgICAgICAgICAgbCA9IGs7XG4gICAgICAgICAgICAgICAgaSA9IGU7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGwgfCAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY3MoYSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgYiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGQgPSAwO1xuICAgICAgICAgICAgICAgIGIgPSBhO1xuICAgICAgICAgICAgICAgIGEgPSBjWyhiICsgMTMwODQpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBkID0gYTtcbiAgICAgICAgICAgICAgICBpZiAoKGEgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChkIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYSA9IGNbKGQgKyA4KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGMwKGQpO1xuICAgICAgICAgICAgICAgICAgICBkID0gYTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY1soYiArIDEzMDg0KSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY3QoYiwgZSwgZiwgZykge1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgZiA9IGYgfCAwO1xuICAgICAgICAgICAgICAgIGcgPSBnIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgaCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGogPSAwLFxuICAgICAgICAgICAgICAgICAgICBrID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG0gPSAwLFxuICAgICAgICAgICAgICAgICAgICBuID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHAgPSAwLFxuICAgICAgICAgICAgICAgICAgICBxID0gMCxcbiAgICAgICAgICAgICAgICAgICAgciA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHMgPSAwLFxuICAgICAgICAgICAgICAgICAgICB0ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgdSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHYgPSAwLFxuICAgICAgICAgICAgICAgICAgICB3ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgeCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHkgPSAwLFxuICAgICAgICAgICAgICAgICAgICB6ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgQSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIEIgPSAwO1xuICAgICAgICAgICAgICAgIGggPSBpO1xuICAgICAgICAgICAgICAgIGkgPSAoaSArIDE5MikgfCAwO1xuICAgICAgICAgICAgICAgIGogPSBoIHwgMDtcbiAgICAgICAgICAgICAgICBrID0gKGggKyA2NCkgfCAwO1xuICAgICAgICAgICAgICAgIGwgPSAoaCArIDEyOCkgfCAwO1xuICAgICAgICAgICAgICAgIG0gPSBiO1xuICAgICAgICAgICAgICAgIGIgPSBlO1xuICAgICAgICAgICAgICAgIGUgPSBmO1xuICAgICAgICAgICAgICAgIGYgPSBnO1xuICAgICAgICAgICAgICAgIGcgPSAwO1xuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZyB8IDApID49IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjWyhqICsgKGcgPDwgMikpID4+IDJdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgY1soayArIChnIDw8IDIpKSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgIGNbKGwgKyAoZyA8PCAyKSkgPj4gMl0gPSBjWyhtICsgMTA1NikgPj4gMl07XG4gICAgICAgICAgICAgICAgICAgIGcgPSAoZyArIDEpIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgbiA9IDVlNTtcbiAgICAgICAgICAgICAgICBjdShtLCBuLCBiKTtcbiAgICAgICAgICAgICAgICBvID0gYmkoKChjWyhtICsgMTMwOTIpID4+IDJdIHwgMCkgKyAxKSA8PCAzKSB8IDA7XG4gICAgICAgICAgICAgICAgcCA9IG87XG4gICAgICAgICAgICAgICAgcSA9IG87XG4gICAgICAgICAgICAgICAgbyA9IGNbKG0gKyAxMzA4NCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIHIgPSAwO1xuICAgICAgICAgICAgICAgIHMgPSAwO1xuICAgICAgICAgICAgICAgIHQgPSAwO1xuICAgICAgICAgICAgICAgIHUgPSAwO1xuICAgICAgICAgICAgICAgIHYgPSAwO1xuICAgICAgICAgICAgICAgIGcgPSAwO1xuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZyB8IDApID49IChjWyhtICsgMTMwOTIpID4+IDJdIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHcgPSAwO1xuICAgICAgICAgICAgICAgICAgICB4ID0gZFsobyArIDUpIHwgMF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKHggfCAwKSA9PSA5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbKG0gKyAxMzA1NikgPj4gMl0gJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgKGRbKG8gKyA0KSB8IDBdIHwgMCkpKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChtICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTQwICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChkWyhvICsgNikgfCAwXSB8IDApIDw8IDIpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHkgPSBkWyhvICsgNikgfCAwXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhWyhvICsgNikgfCAwXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1soayArICgoZFsobyArIDQpIHwgMF0gfCAwKSA8PCAyKSkgPj4gMl0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoeSB8IDApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoayArICgoZFsobyArIDQpIHwgMF0gfCAwKSA8PCAyKSkgPj4gMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IHk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3ID0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHkgPSBkWyhvICsgNikgfCAwXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGwgKyAoKGRbKG8gKyA0KSB8IDBdIHwgMCkgPDwgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLTFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChkWyhvICsgNCkgfCAwXSB8IDApIDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA9PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoeSB8IDApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHogPSAxMDk2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGwgKyAoKGRbKG8gKyA0KSB8IDBdIHwgMCkgPDwgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IHk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHogPSAxMDk2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCh6IHwgMCkgPT0gMTA5Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeiA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3ID0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKHggfCAwKSA9PSAxNSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjWyhtICsgMTMwNTYpID4+IDJdICZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxIDw8IChkWyhvICsgNCkgfCAwXSB8IDApKSkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3ID0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobSArIDI4ICsgKChkWyhvICsgNikgfCAwXSB8IDApIDw8IDIpKSA+PiAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5ID0gZFsobyArIDYpIHwgMF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFbKG8gKyA2KSB8IDBdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbKGogKyAoKGRbKG8gKyA0KSB8IDBdIHwgMCkgPDwgMikpID4+IDJdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh5IHwgMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soaiArICgoZFsobyArIDQpIHwgMF0gfCAwKSA8PCAyKSkgPj4gMl0gPSB5O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHcgPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKHggfCAwKSA9PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCh2IHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2ID0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbKG0gKyAxMzA1NikgPj4gMl0gJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDEgPDwgKGRbKG8gKyA0KSB8IDBdIHwgMCkpKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG0gK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTQwICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChrICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChkWyhvICsgNCkgfCAwXSB8IDApIDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyKSkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGRbKG8gKyA2KSB8IDBdIHwgMCkgPDwgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChtICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU0MCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoayArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoZFsobyArIDQpIHwgMF0gfCAwKSA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyKSkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChkWyhvICsgNikgfCAwXSB8IDApIDw8IDIpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gLTE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1sobCArICgoZFsobyArIDQpIHwgMF0gfCAwKSA8PCAyKSkgPj4gMl0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtMVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKG0gK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjggK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGogK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGRbKG8gKyA0KSB8IDBdIHwgMCkgPDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGwgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoZFsobyArIDQpIHwgMF0gfCAwKSA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyKSkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA9PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoZFsobyArIDQpIHwgMF0gfCAwKSA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyKSkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChkWyhvICsgNCkgfCAwXSB8IDApIDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPSAtMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgIHggPSAoKGNbbyA+PiAyXSB8IDApIC0gdCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBBID0geDtcbiAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCh4IHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgodiB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeiA9IDExMjU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBCID0gXyhjWyhtICsgMTA3NikgPj4gMl0gfCAwLCBBKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcyA9IChzICsgKF8oY1sobSArIDEwODApID4+IDJdIHwgMCwgQSkgfCAwKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoKHMgJiAtNjU1MzYpIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCID0gKEIgKyAoKHMgPj4gMTYpICYgNjU1MzUpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMgPSBzICYgNjU1MzU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUgPSAodSArIEIpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgeiA9IDExMjU7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKHogfCAwKSA9PSAxMTI1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB6ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgodiB8IDApID09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoKGRbKG8gKyA1KSB8IDBdIHwgMCB8IDApID09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGRbKG8gKyA0KSB8IDBdIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGRbKG8gKyA3KSB8IDBdIHwgMCkgPDwgOCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGRbKG8gKyA2KSB8IDBdIHwgMCkgPDwgMTYpKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGN1KG0sIG4sIGIpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICgodyB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIEEgPSBwO1xuICAgICAgICAgICAgICAgICAgICAgICAgeCA9IG8gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1tBID4+IDJdID0gY1t4ID4+IDJdO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1soQSArIDQpID4+IDJdID0gY1soeCArIDQpID4+IDJdO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1twID4+IDJdID0gdTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHAgPSAocCArIDgpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHIgPSAociArIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB0ID0gY1tvID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgbyA9IGNbKG8gKyA4KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGcgPSAoZyArIDEpIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY1twID4+IDJdID0gdTtcbiAgICAgICAgICAgICAgICBhWyhwICsgNSkgfCAwXSA9IDk5O1xuICAgICAgICAgICAgICAgIHIgPSAociArIDEpIHwgMDtcbiAgICAgICAgICAgICAgICBjcyhtKTtcbiAgICAgICAgICAgICAgICBjW2UgPj4gMl0gPSByO1xuICAgICAgICAgICAgICAgIGNbZiA+PiAyXSA9IHU7XG4gICAgICAgICAgICAgICAgaSA9IGg7XG4gICAgICAgICAgICAgICAgcmV0dXJuIHEgfCAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY3UoYSwgYiwgZCkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgZCA9IGQgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBlID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZiA9IDAuMDtcbiAgICAgICAgICAgICAgICBlID0gYTtcbiAgICAgICAgICAgICAgICBmID0gKCsoYiB8IDApICogKyhjWyhlICsgNCkgPj4gMl0gfCAwKSAqIDAuMDY1NTM2KSAvICsoZCB8IDApO1xuICAgICAgICAgICAgICAgIGNbKGUgKyAxMDgwKSA+PiAyXSA9IH5+ZiAmIDY1NTM1O1xuICAgICAgICAgICAgICAgIGNbKGUgKyAxMDc2KSA+PiAyXSA9IH5+ZiA+PiAxNjtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjdihiLCBlKSB7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGUgPSBlIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGcgPSAwLFxuICAgICAgICAgICAgICAgICAgICBoID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGsgPSAwLFxuICAgICAgICAgICAgICAgICAgICBsID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG4gPSAwLFxuICAgICAgICAgICAgICAgICAgICBvID0gMCxcbiAgICAgICAgICAgICAgICAgICAgcCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHEgPSAwLFxuICAgICAgICAgICAgICAgICAgICByID0gMCxcbiAgICAgICAgICAgICAgICAgICAgcyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHQgPSAwLFxuICAgICAgICAgICAgICAgICAgICB1ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgdiA9IDA7XG4gICAgICAgICAgICAgICAgZiA9IGk7XG4gICAgICAgICAgICAgICAgaSA9IChpICsgNDApIHwgMDtcbiAgICAgICAgICAgICAgICBnID0gZiB8IDA7XG4gICAgICAgICAgICAgICAgaCA9IChmICsgOCkgfCAwO1xuICAgICAgICAgICAgICAgIGogPSAoZiArIDE2KSB8IDA7XG4gICAgICAgICAgICAgICAgayA9IChmICsgMjQpIHwgMDtcbiAgICAgICAgICAgICAgICBsID0gKGYgKyAzMikgfCAwO1xuICAgICAgICAgICAgICAgIG0gPSBiO1xuICAgICAgICAgICAgICAgIGIgPSBlO1xuICAgICAgICAgICAgICAgIEwxNDQyOiB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICBlID0gY3cobSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBuID0gKGIgKyAxMzA5NikgfCAwO1xuICAgICAgICAgICAgICAgICAgICBjW24gPj4gMl0gPSAoY1tuID4+IDJdIHwgMCkgKyBlO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGNQKG0sIGcsIDEsIDEpIHwgMCkgIT0gMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbyA9IDExMzg7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGRbZ10gfCAwKSA9PSAyNDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvID0gMTE0MTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChkW2ddIHwgMCkgPT0gMjQ3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8gPSAxMTQxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChkW2ddIHwgMCkgPT0gMjU1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUgPSBtO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjUChlLCBoLCAxLCAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAgPSBjdyhtKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZFtoXSB8IDApID4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZFtoXSB8IDApID49IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8gPSAxMTQ2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZSA9IG07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbiA9IHA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IGFbaF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIgPSBiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN4KGUsIG4sIHEsIHIpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbyA9IDExNDY7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKG8gfCAwKSA9PSAxMTQ2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIgPSBkW2hdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgociB8IDApID09IDQ3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbyA9IDExNDc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDE0NDI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKChyIHwgMCkgPT0gODEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvID0gMTE0ODtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMMTQ0MjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNRKG0sIHApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYVtqXSA9IGFbZ10gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKChhW2pdICYgMTI4KSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFbNjYzMl0gPSBkW2pdICYgMTU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhWzY2MjRdID0gKGRbal0gPj4gNCkgJiA3O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgciA9IG07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjUChyLCBqLCAxLCAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhW2pdID0gZFtqXSAmIDEyNztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGRbNjYyNF0gfCAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvID0gMTE1NjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMMTQ0MjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgNjoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8gPSAxMTg4O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwxNDQyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSA0OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbyA9IDExODY7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDE0NDI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDU6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8gPSAxMTU1O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwxNDQyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAyOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbyA9IDExNTc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDE0NDI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDM6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjUChtLCBrLCAxLCAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYVtrXSA9IGRba10gJiAxMjc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcyA9IDI1NTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBMMTQ2NjogZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2ggKGRbal0gfCAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDk4OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYVs2NjE2XSA9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYVtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDY2MDAgKyAoZFs2NjMyXSB8IDApKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IGFba10gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSA2OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChhWzY2MTZdIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMMTQ2NjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgciA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDY1ODQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWzY2MzJdIHwgMCkpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZFtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg2NjAwICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFs2NjMyXSB8IDApKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgociB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcyA9IDExO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChyIHwgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzI2MzlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbyA9IDExNzk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwxNDQyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgNzoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMgPSA0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxMDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMgPSA1O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxMToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMgPSA3O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSA2NDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMgPSA2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxMjA6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzID0gMTI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDEyMToge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMgPSAxMztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMTIzOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcyA9IDE0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAwOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcyA9IDE1O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAzMjoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZFtrXSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcyA9IDE1O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMTAwOiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYVs2NjE2XSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYVtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDY1ODQgKyAoZFs2NjMyXSB8IDApKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IGFba10gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxMDE6IHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhWzY2MTZdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNjYwMCArIChkWzY2MzJdIHwgMCkpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gYVtrXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDk5OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYVs2NjE2XSA9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYVtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDY1ODQgKyAoZFs2NjMyXSB8IDApKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IGFba10gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDoge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChzIHwgMCkgIT0gMjU1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8gPSAxMTg0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMMTQ0MjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKG8gfCAwKSA9PSAxMTQxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHAgPSBjdyhtKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBjUShtLCBwKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoKG8gfCAwKSA9PSAxMTg0KSB7XG4gICAgICAgICAgICAgICAgICAgIHQgPSBiaSgxMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICBjW3QgPj4gMl0gPSBjWyhiICsgMTMwOTYpID4+IDJdO1xuICAgICAgICAgICAgICAgICAgICBhWyh0ICsgNSkgfCAwXSA9IHMgJiAyNTU7XG4gICAgICAgICAgICAgICAgICAgIGFbKHQgKyA0KSB8IDBdID0gYVs2NjMyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGFbKHQgKyA2KSB8IDBdID0gYVtrXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGFbKHQgKyA3KSB8IDBdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgY1sodCArIDgpID4+IDJdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgdSA9IHQ7XG4gICAgICAgICAgICAgICAgICAgIHYgPSB1O1xuICAgICAgICAgICAgICAgICAgICBpID0gZjtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHYgfCAwO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKG8gfCAwKSA9PSAxMTU2KSB7XG4gICAgICAgICAgICAgICAgICAgIGNQKG0sIGssIDEsIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgYVtrXSA9IGRba10gJiAxMjc7XG4gICAgICAgICAgICAgICAgICAgIHQgPSBiaSgxMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICBjW3QgPj4gMl0gPSBjWyhiICsgMTMwOTYpID4+IDJdO1xuICAgICAgICAgICAgICAgICAgICBhWyh0ICsgNSkgfCAwXSA9IDE7XG4gICAgICAgICAgICAgICAgICAgIGFbKHQgKyA0KSB8IDBdID0gYVs2NjMyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGFbKHQgKyA2KSB8IDBdID0gYVtqXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGFbKHQgKyA3KSB8IDBdID0gYVtrXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGNbKHQgKyA4KSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgIHUgPSB0O1xuICAgICAgICAgICAgICAgICAgICB2ID0gdTtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGY7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2IHwgMDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKChvIHwgMCkgPT0gMTE3OSkge1xuICAgICAgICAgICAgICAgICAgICB0ID0gYmkoMTIpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1t0ID4+IDJdID0gY1soYiArIDEzMDk2KSA+PiAyXTtcbiAgICAgICAgICAgICAgICAgICAgYVsodCArIDUpIHwgMF0gPSAxMTtcbiAgICAgICAgICAgICAgICAgICAgYVsodCArIDQpIHwgMF0gPSBhWzY2MzJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgYVsodCArIDYpIHwgMF0gPSAyO1xuICAgICAgICAgICAgICAgICAgICBhWyh0ICsgNykgfCAwXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgIGNbKHQgKyA4KSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgIHUgPSB0O1xuICAgICAgICAgICAgICAgICAgICB2ID0gdTtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGY7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2IHwgMDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKChvIHwgMCkgPT0gMTEzOCkge1xuICAgICAgICAgICAgICAgICAgICB1ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgdiA9IHU7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBmO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdiB8IDA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICgobyB8IDApID09IDExODgpIHtcbiAgICAgICAgICAgICAgICAgICAgY1AobSwgaywgMSwgMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBhW2tdID0gZFtrXSAmIDEyNztcbiAgICAgICAgICAgICAgICAgICAgdCA9IGJpKDEyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGNbdCA+PiAyXSA9IGNbKGIgKyAxMzA5NikgPj4gMl07XG4gICAgICAgICAgICAgICAgICAgIGFbKHQgKyA1KSB8IDBdID0gODtcbiAgICAgICAgICAgICAgICAgICAgYVsodCArIDQpIHwgMF0gPSBhWzY2MzJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgYVsodCArIDYpIHwgMF0gPSBhW2pdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgYVsodCArIDcpIHwgMF0gPSBhW2tdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1sodCArIDgpID4+IDJdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgdSA9IHQ7XG4gICAgICAgICAgICAgICAgICAgIHYgPSB1O1xuICAgICAgICAgICAgICAgICAgICBpID0gZjtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHYgfCAwO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKG8gfCAwKSA9PSAxMTg2KSB7XG4gICAgICAgICAgICAgICAgICAgIGFbal0gPSBkW2pdICYgMTI3O1xuICAgICAgICAgICAgICAgICAgICB0ID0gYmkoMTIpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1t0ID4+IDJdID0gY1soYiArIDEzMDk2KSA+PiAyXTtcbiAgICAgICAgICAgICAgICAgICAgYVsodCArIDUpIHwgMF0gPSA5O1xuICAgICAgICAgICAgICAgICAgICBhWyh0ICsgNCkgfCAwXSA9IGFbNjYzMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBhWyh0ICsgNikgfCAwXSA9IGFbal0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBhWyh0ICsgNykgfCAwXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgIGNbKHQgKyA4KSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgIHUgPSB0O1xuICAgICAgICAgICAgICAgICAgICB2ID0gdTtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGY7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2IHwgMDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKChvIHwgMCkgPT0gMTE0Nykge1xuICAgICAgICAgICAgICAgICAgICB1ID0gLTE7XG4gICAgICAgICAgICAgICAgICAgIHYgPSB1O1xuICAgICAgICAgICAgICAgICAgICBpID0gZjtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHYgfCAwO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKG8gfCAwKSA9PSAxMTQ4KSB7XG4gICAgICAgICAgICAgICAgICAgIGNQKG0sIGosIDEsIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1AobSwgaywgMSwgMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBjUChtLCBsLCAxLCAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIHQgPSBiaSgxMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICBjW3QgPj4gMl0gPSBjWyhiICsgMTMwOTYpID4+IDJdO1xuICAgICAgICAgICAgICAgICAgICBhWyh0ICsgNSkgfCAwXSA9IDEwO1xuICAgICAgICAgICAgICAgICAgICBhWyh0ICsgNCkgfCAwXSA9IGFbbF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBhWyh0ICsgNikgfCAwXSA9IGFbal0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBhWyh0ICsgNykgfCAwXSA9IGFba10gfCAwO1xuICAgICAgICAgICAgICAgICAgICBjWyh0ICsgOCkgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgICAgICB1ID0gdDtcbiAgICAgICAgICAgICAgICAgICAgdiA9IHU7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBmO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdiB8IDA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICgobyB8IDApID09IDExNTUpIHtcbiAgICAgICAgICAgICAgICAgICAgY1AobSwgaywgMSwgMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBhW2tdID0gZFtrXSAmIDEyNztcbiAgICAgICAgICAgICAgICAgICAgdCA9IGJpKDEyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGNbdCA+PiAyXSA9IGNbKGIgKyAxMzA5NikgPj4gMl07XG4gICAgICAgICAgICAgICAgICAgIGFbKHQgKyA1KSB8IDBdID0gMjtcbiAgICAgICAgICAgICAgICAgICAgYVsodCArIDQpIHwgMF0gPSBhWzY2MzJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgYVsodCArIDYpIHwgMF0gPSBhW2pdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgYVsodCArIDcpIHwgMF0gPSBhW2tdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1sodCArIDgpID4+IDJdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgdSA9IHQ7XG4gICAgICAgICAgICAgICAgICAgIHYgPSB1O1xuICAgICAgICAgICAgICAgICAgICBpID0gZjtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHYgfCAwO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKG8gfCAwKSA9PSAxMTU3KSB7XG4gICAgICAgICAgICAgICAgICAgIGNQKG0sIGssIDEsIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgYVtrXSA9IGRba10gJiAxMjc7XG4gICAgICAgICAgICAgICAgICAgIHQgPSBiaSgxMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICBjW3QgPj4gMl0gPSBjWyhiICsgMTMwOTYpID4+IDJdO1xuICAgICAgICAgICAgICAgICAgICBhWyh0ICsgNSkgfCAwXSA9IDM7XG4gICAgICAgICAgICAgICAgICAgIGFbKHQgKyA0KSB8IDBdID0gYVs2NjMyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGFbKHQgKyA2KSB8IDBdID0gYVtqXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGFbKHQgKyA3KSB8IDBdID0gYVtrXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGNbKHQgKyA4KSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgIHUgPSB0O1xuICAgICAgICAgICAgICAgICAgICB2ID0gdTtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGY7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB2IHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjdyhiKSB7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBjID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGUgPSAwO1xuICAgICAgICAgICAgICAgIGMgPSBpO1xuICAgICAgICAgICAgICAgIGkgPSAoaSArIDgpIHwgMDtcbiAgICAgICAgICAgICAgICBkID0gYyB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGI7XG4gICAgICAgICAgICAgICAgYiA9IDA7XG4gICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgY1AoZSwgZCwgMSwgMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBiID0gKGIgKyAoYVtkXSAmIDEyNykpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCgoYVtkXSAmIDEyOCkgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBiID0gYiA8PCA3O1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpID0gYztcbiAgICAgICAgICAgICAgICByZXR1cm4gYiB8IDA7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGZ1bmN0aW9uIGN4KGIsIGUsIGYsIGcpIHtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGUgfCAwO1xuICAgICAgICAgICAgICAgIGYgPSBmIHwgMDtcbiAgICAgICAgICAgICAgICBnID0gZyB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGggPSAwLFxuICAgICAgICAgICAgICAgICAgICBpID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGsgPSAwO1xuICAgICAgICAgICAgICAgIGggPSBlO1xuICAgICAgICAgICAgICAgIGUgPSBmO1xuICAgICAgICAgICAgICAgIGYgPSBnO1xuICAgICAgICAgICAgICAgIGcgPSBiaSgoaCArIDEpIHwgMCkgfCAwO1xuICAgICAgICAgICAgICAgIGlmICgoaCB8IDApICE9IChjUChiLCBnLCAxLCBoKSB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgIGMwKGcpO1xuICAgICAgICAgICAgICAgICAgICBpID0gLTE7XG4gICAgICAgICAgICAgICAgICAgIGogPSBpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gaiB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGFbKGcgKyBoKSB8IDBdID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICBiID0gaDtcbiAgICAgICAgICAgICAgICAgICAgaCA9IChiIC0gMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGIgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoKGRbKGcgKyBoKSB8IDBdIHwgMCB8IDApIDwgMzIpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFbKGcgKyBoKSB8IDBdID0gNDY7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaCA9IGUgJiAyNTU7XG4gICAgICAgICAgICAgICAgaWYgKChoIHwgMCkgPT0gMSkge1xuICAgICAgICAgICAgICAgICAgICBrID0gMDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKChoIHwgMCkgPT0gMikge1xuICAgICAgICAgICAgICAgICAgICBrID0gMTtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBjMChnKTtcbiAgICAgICAgICAgICAgICAgICAgZyA9IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgoZyB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChjWyhmICsgMTMxMDQgKyAoayA8PCAyKSkgPj4gMl0gfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjMChjWyhmICsgMTMxMDQgKyAoayA8PCAyKSkgPj4gMl0gfCAwKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBjWyhmICsgMTMxMDQgKyAoayA8PCAyKSkgPj4gMl0gPSBnO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpID0gMDtcbiAgICAgICAgICAgICAgICBqID0gaTtcbiAgICAgICAgICAgICAgICByZXR1cm4gaiB8IDA7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGZ1bmN0aW9uIGN5KGIsIGUsIGYpIHtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGUgfCAwO1xuICAgICAgICAgICAgICAgIGYgPSBmIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGggPSAwLFxuICAgICAgICAgICAgICAgICAgICBpID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGsgPSAwO1xuICAgICAgICAgICAgICAgIGcgPSBiO1xuICAgICAgICAgICAgICAgIGIgPSBlO1xuICAgICAgICAgICAgICAgIGUgPSBmO1xuICAgICAgICAgICAgICAgIGYgPSAoZyArIDE3MjQgKyAoKGIgKiAyMzYpIHwgMCkpIHwgMDtcbiAgICAgICAgICAgICAgICBpZiAoKGNbKChjWyhmICsgNCkgPj4gMl0gfCAwKSArIDEyKSA+PiAyXSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgaCA9IGNbKGYgKyAxNikgPj4gMl0gPj4gMTI7XG4gICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgIChjW2UgPj4gMl0gfCAwKSA+PVxuICAgICAgICAgICAgICAgICAgICAgICAgKCgoY1soKGNbKGYgKyA0KSA+PiAyXSB8IDApICsgOCkgPj4gMl0gPj4gMTIpIC0gaCkgfCAwKVxuICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFbZiB8IDBdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbZSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbKChjWyhmICsgNCkgPj4gMl0gfCAwKSArIDgpID4+IDJdID4+IDEyKSAtIGg7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpID0gKGYgKyAxNikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1tpID4+IDJdID0gKGNbaSA+PiAyXSB8IDApICsgKGNbZSA+PiAyXSA8PCAxMik7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaiA9XG4gICAgICAgICAgICAgICAgICAgICAgICAoKGNbKChjWyhmICsgNCkgPj4gMl0gfCAwKSArIDg4KSA+PiAyXSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaCA8PCAxKSkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgayA9IGo7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBrIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaCA9IGFbKChjWyhmICsgNCkgPj4gMl0gfCAwKSArIDExMCkgfCAwXSB8IDA7XG4gICAgICAgICAgICAgICAgaWYgKChjWyhmICsgMjEyKSA+PiAyXSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgTDE1NzU6IGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoKGggJiA0KSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoKGggJiA2NCkgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGRbZiB8IDBdIHwgMCB8IDApID09IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZFtmIHwgMF0gfCAwIHwgMCkgIT0gMikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwxNTc1O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCgoaCAmIDgpIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqID0gY3ooZywgZiwgY1tlID4+IDJdIHwgMCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrID0gajtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGsgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGogPSBjQShnLCBmLCBjW2UgPj4gMl0gfCAwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBqO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gayB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgaiA9IGNCKGcsIGIsIGUpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgayA9IGo7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBrIHwgMDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBMMTU2MTogZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCgoaCAmIDQpIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCgoaCAmIDY0KSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZFtmIHwgMF0gfCAwIHwgMCkgPT0gMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChkW2YgfCAwXSB8IDAgfCAwKSAhPSAyKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDE1NjE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKChoICYgOCkgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGogPSBjQyhnLCBmLCBjW2UgPj4gMl0gfCAwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBqO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gayB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaiA9IGNEKGcsIGYsIGNbZSA+PiAyXSB8IDApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgayA9IGo7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBrIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICBqID0gY0UoZywgYiwgZSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBrID0gajtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGsgfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGN6KGEsIGQsIGUpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgZCA9IGQgfCAwO1xuICAgICAgICAgICAgICAgIGUgPSBlIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGcgPSAwLFxuICAgICAgICAgICAgICAgICAgICBoID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGogPSAwLFxuICAgICAgICAgICAgICAgICAgICBrID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG0gPSAwLFxuICAgICAgICAgICAgICAgICAgICBuID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHAgPSAwLFxuICAgICAgICAgICAgICAgICAgICBxID0gMCxcbiAgICAgICAgICAgICAgICAgICAgciA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHMgPSAwLFxuICAgICAgICAgICAgICAgICAgICB0ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgdSA9IDA7XG4gICAgICAgICAgICAgICAgZiA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IGQ7XG4gICAgICAgICAgICAgICAgZCA9IGU7XG4gICAgICAgICAgICAgICAgZSA9IGNbKGEgKyAxNikgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIGcgPSBjWyhhICsgMjApID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBoID0gY1soKGNbKGEgKyA0KSA+PiAyXSB8IDApICsgNCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIGkgPSBjW2NbKGEgKyA0KSA+PiAyXSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgaiA9IGNbKGYgKyAxMDY4KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgayA9IGNbKChjWyhhICsgNCkgPj4gMl0gfCAwKSArIDg4KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgbCA9IGNbKGEgKyAyMTYpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBtID0gaCA8PCAxO1xuICAgICAgICAgICAgICAgIG4gPSBpIDw8IDE7XG4gICAgICAgICAgICAgICAgbyA9IDA7XG4gICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChkIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcCA9IChlIHwgMCkgPD0gKGkgfCAwKTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHAgPSAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICghcCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgcSA9ICgoKCgoaSAtIGUpIHwgMCkgLyAoZyB8IDApKSB8IDApICsgMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKHEgfCAwKSA+IChkIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHEgPSBkO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICgocSB8IDApID4gKGwgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcSA9IGw7XG4gICAgICAgICAgICAgICAgICAgICAgICBvID0gMTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGwgPSAobCAtIHEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBkID0gKGQgLSBxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByID0gcTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAociAtIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgociB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHMgPSBiWyhrICsgKChlID4+IDEyKSA8PCAxKSkgPj4gMV0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgdCA9IGJbKGsgKyAoKChlID4+IDEyKSArIDEpIDw8IDEpKSA+PiAxXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICByID0gajtcbiAgICAgICAgICAgICAgICAgICAgICAgIGogPSAociArIDIpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJbciA+PiAxXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgocyA8PCAxNikgPj4gMTYpICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChfKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgodCA8PCAxNikgPj4gMTYpIC0gKChzIDw8IDE2KSA+PiAxNikpIHwgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUgJiA0MDk1XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPj4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMikpICZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA2NTUzNTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUgPSAoZSArIGcpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoKG8gfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBsID0gY1soYSArIDIxMikgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgZyA9IGNHKGYsIGEsIDApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG8gPSAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZCB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZyB8IDApID4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgdSA9IGg7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICB1ID0gaTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBxID0gKCgoKCh1IC0gZSkgfCAwKSAvIChnIHwgMCkpIHwgMCkgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGlmICgocSB8IDApID4gKGQgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgcSA9IGQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKChxIHwgMCkgPiAobCB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBxID0gbDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG8gPSAxO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgbCA9IChsIC0gcSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGQgPSAoZCAtIHEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHAgPSBxO1xuICAgICAgICAgICAgICAgICAgICAgICAgcSA9IChwIC0gMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChwIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgcyA9IGJbKGsgKyAoKGUgPj4gMTIpIDw8IDEpKSA+PiAxXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICB0ID0gYlsoayArICgoKGUgPj4gMTIpICsgMSkgPDwgMSkpID4+IDFdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHAgPSBqO1xuICAgICAgICAgICAgICAgICAgICAgICAgaiA9IChwICsgMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgYltwID4+IDFdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChzIDw8IDE2KSA+PiAxNikgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKF8oXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKCh0IDw8IDE2KSA+PiAxNikgLSAoKHMgPDwgMTYpID4+IDE2KSkgfCAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZSAmIDQwOTVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA+Pj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyKSkgJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDY1NTM1O1xuICAgICAgICAgICAgICAgICAgICAgICAgZSA9IChlICsgZykgfCAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICgobyB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGwgPSBjWyhhICsgMjEyKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBnID0gY0coZiwgYSwgKChnIHwgMCkgPCAwKSB8IDApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG8gPSAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZSB8IDApID49IChoIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUgPSAobSAtIGUpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGcgPSAoZyAqIC0xKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGUgfCAwKSA8PSAoaSB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZSA9IChuIC0gZSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGcgPSAoZyAqIC0xKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY1soYSArIDIxNikgPj4gMl0gPSBsO1xuICAgICAgICAgICAgICAgIGNbKGEgKyAyMCkgPj4gMl0gPSBnO1xuICAgICAgICAgICAgICAgIGNbKGEgKyAxNikgPj4gMl0gPSBlO1xuICAgICAgICAgICAgICAgIHJldHVybiBjWyhmICsgMTA2OCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY0EoYSwgZCwgZSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBkID0gZCB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGUgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGggPSAwLFxuICAgICAgICAgICAgICAgICAgICBpID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGsgPSAwLFxuICAgICAgICAgICAgICAgICAgICBsID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG4gPSAwLFxuICAgICAgICAgICAgICAgICAgICBvID0gMCxcbiAgICAgICAgICAgICAgICAgICAgcCA9IDA7XG4gICAgICAgICAgICAgICAgZiA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IGQ7XG4gICAgICAgICAgICAgICAgZCA9IGU7XG4gICAgICAgICAgICAgICAgZSA9IGNbKGEgKyAxNikgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIGcgPSBjWyhhICsgMjApID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBoID0gY1soKGNbKGEgKyA0KSA+PiAyXSB8IDApICsgNCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIGkgPSAoaCAtIChjW2NbKGEgKyA0KSA+PiAyXSA+PiAyXSB8IDApKSB8IDA7XG4gICAgICAgICAgICAgICAgaiA9IGNbKGYgKyAxMDY4KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgayA9IGNbKChjWyhhICsgNCkgPj4gMl0gfCAwKSArIDg4KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgbCA9IGNbKGEgKyAyMTYpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBtID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGQgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoKGUgfCAwKSA+PSAoaCB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlID0gKGUgLSBpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgbiA9ICgoKCgoaCAtIGUpIHwgMCkgLyAoZyB8IDApKSB8IDApICsgMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKG4gfCAwKSA+IChkIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIG4gPSBkO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICgobiB8IDApID4gKGwgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbiA9IGw7XG4gICAgICAgICAgICAgICAgICAgICAgICBtID0gMTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGwgPSAobCAtIG4pIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBkID0gKGQgLSBuKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvID0gbjtcbiAgICAgICAgICAgICAgICAgICAgICAgIG4gPSAobyAtIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgobyB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIG8gPSBiWyhrICsgKChlID4+IDEyKSA8PCAxKSkgPj4gMV0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgcCA9IGo7XG4gICAgICAgICAgICAgICAgICAgICAgICBqID0gKHAgKyAyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBiW3AgPj4gMV0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKG8gPDwgMTYpID4+IDE2KSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoXyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoYlsoayArICgoKGUgPj4gMTIpICsgMSkgPDwgMSkpID4+IDFdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAtXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChvIDw8IDE2KSA+PiAxNikpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZSAmIDQwOTVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA+Pj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyKSkgJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDY1NTM1O1xuICAgICAgICAgICAgICAgICAgICAgICAgZSA9IChlICsgZykgfCAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICgobSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGwgPSBjWyhhICsgMjEyKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBnID0gY0coZiwgYSwgMCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgbSA9IDA7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY1soYSArIDIxNikgPj4gMl0gPSBsO1xuICAgICAgICAgICAgICAgIGNbKGEgKyAyMCkgPj4gMl0gPSBnO1xuICAgICAgICAgICAgICAgIGNbKGEgKyAxNikgPj4gMl0gPSBlO1xuICAgICAgICAgICAgICAgIHJldHVybiBjWyhmICsgMTA2OCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY0IoZCwgZSwgZikge1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgZiA9IGYgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBnID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGkgPSAwLFxuICAgICAgICAgICAgICAgICAgICBqID0gMCxcbiAgICAgICAgICAgICAgICAgICAgayA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGwgPSAwLFxuICAgICAgICAgICAgICAgICAgICBtID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG8gPSAwLFxuICAgICAgICAgICAgICAgICAgICBwID0gMCxcbiAgICAgICAgICAgICAgICAgICAgcSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHIgPSAwLFxuICAgICAgICAgICAgICAgICAgICBzID0gMCxcbiAgICAgICAgICAgICAgICAgICAgdCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHUgPSAwLFxuICAgICAgICAgICAgICAgICAgICB2ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgdyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHggPSAwLFxuICAgICAgICAgICAgICAgICAgICB5ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgeiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIEEgPSAwLFxuICAgICAgICAgICAgICAgICAgICBCID0gMDtcbiAgICAgICAgICAgICAgICBnID0gZDtcbiAgICAgICAgICAgICAgICBkID0gZjtcbiAgICAgICAgICAgICAgICBmID0gKGcgKyAxNzI0ICsgKChlICogMjM2KSB8IDApKSB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGNbKGcgKyAxMDY4KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgaCA9IGNbKChjWyhmICsgNCkgPj4gMl0gfCAwKSArIDg4KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgaSA9IGNbKChjWyhmICsgNCkgPj4gMl0gfCAwKSArIDgpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBqID0gY1soZiArIDE2KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgayA9IGNbKGYgKyAyMCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIGwgPSBjW2QgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIG0gPSBjWyhmICsgMjE2KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgaWYgKChrIHwgMCkgPCAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGsgPSAtayB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgbiA9IGw7XG4gICAgICAgICAgICAgICAgICAgIGwgPSAobiAtIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChuIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbyA9IDEzMjI7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBuID0gbTtcbiAgICAgICAgICAgICAgICAgICAgbSA9IChuIC0gMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKG4gfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtID0gY1soZiArIDIxMikgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgayA9IGNHKGcsIGYsIDApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBuID0gYlsoaCArICgoaiA+PiAxMikgPDwgMSkpID4+IDFdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgcCA9IGU7XG4gICAgICAgICAgICAgICAgICAgIGUgPSAocCArIDIpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgYltwID4+IDFdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICgoKG4gPDwgMTYpID4+IDE2KSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKChfKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGJbKGggKyAoKChqID4+IDEyKSArIDEpIDw8IDEpKSA+PiAxXSB8IDApIC1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgobiA8PCAxNikgPj4gMTYpKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqICYgNDA5NVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA+Pj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIpKSAmXG4gICAgICAgICAgICAgICAgICAgICAgICA2NTUzNTtcbiAgICAgICAgICAgICAgICAgICAgaiA9IChqICsgaykgfCAwO1xuICAgICAgICAgICAgICAgIH0gd2hpbGUgKChqIHwgMCkgPCAoaSB8IDApKTtcbiAgICAgICAgICAgICAgICBpZiAoKG8gfCAwKSA9PSAxMzIyKSB7XG4gICAgICAgICAgICAgICAgICAgIHEgPSBtO1xuICAgICAgICAgICAgICAgICAgICByID0gZjtcbiAgICAgICAgICAgICAgICAgICAgcyA9IChyICsgMjE2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGNbcyA+PiAyXSA9IHE7XG4gICAgICAgICAgICAgICAgICAgIHQgPSBrO1xuICAgICAgICAgICAgICAgICAgICB1ID0gZjtcbiAgICAgICAgICAgICAgICAgICAgdiA9ICh1ICsgMjApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1t2ID4+IDJdID0gdDtcbiAgICAgICAgICAgICAgICAgICAgdyA9IGo7XG4gICAgICAgICAgICAgICAgICAgIHggPSBmO1xuICAgICAgICAgICAgICAgICAgICB5ID0gKHggKyAxNikgfCAwO1xuICAgICAgICAgICAgICAgICAgICBjW3kgPj4gMl0gPSB3O1xuICAgICAgICAgICAgICAgICAgICB6ID0gZztcbiAgICAgICAgICAgICAgICAgICAgQSA9ICh6ICsgMTA2OCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBCID0gY1tBID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEIgfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoKGogfCAwKSA9PSAoaSB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBlO1xuICAgICAgICAgICAgICAgICAgICBlID0gKGkgKyAyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGJbaSA+PiAxXSA9IGJbKGggKyAoKGogPj4gMTIpIDw8IDEpKSA+PiAxXSB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGFbZiB8IDBdID0gMDtcbiAgICAgICAgICAgICAgICBoID0gZDtcbiAgICAgICAgICAgICAgICBjW2ggPj4gMl0gPSAoY1toID4+IDJdIHwgMCkgLSAobCArIDEpO1xuICAgICAgICAgICAgICAgIHEgPSBtO1xuICAgICAgICAgICAgICAgIHIgPSBmO1xuICAgICAgICAgICAgICAgIHMgPSAociArIDIxNikgfCAwO1xuICAgICAgICAgICAgICAgIGNbcyA+PiAyXSA9IHE7XG4gICAgICAgICAgICAgICAgdCA9IGs7XG4gICAgICAgICAgICAgICAgdSA9IGY7XG4gICAgICAgICAgICAgICAgdiA9ICh1ICsgMjApIHwgMDtcbiAgICAgICAgICAgICAgICBjW3YgPj4gMl0gPSB0O1xuICAgICAgICAgICAgICAgIHcgPSBqO1xuICAgICAgICAgICAgICAgIHggPSBmO1xuICAgICAgICAgICAgICAgIHkgPSAoeCArIDE2KSB8IDA7XG4gICAgICAgICAgICAgICAgY1t5ID4+IDJdID0gdztcbiAgICAgICAgICAgICAgICB6ID0gZztcbiAgICAgICAgICAgICAgICBBID0gKHogKyAxMDY4KSB8IDA7XG4gICAgICAgICAgICAgICAgQiA9IGNbQSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgcmV0dXJuIEIgfCAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY0MoYSwgZCwgZSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBkID0gZCB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGUgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGggPSAwLFxuICAgICAgICAgICAgICAgICAgICBpID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGsgPSAwLFxuICAgICAgICAgICAgICAgICAgICBsID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG4gPSAwLFxuICAgICAgICAgICAgICAgICAgICBvID0gMCxcbiAgICAgICAgICAgICAgICAgICAgcCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHEgPSAwLFxuICAgICAgICAgICAgICAgICAgICByID0gMDtcbiAgICAgICAgICAgICAgICBmID0gYTtcbiAgICAgICAgICAgICAgICBhID0gZDtcbiAgICAgICAgICAgICAgICBkID0gZTtcbiAgICAgICAgICAgICAgICBlID0gY1soYSArIDE2KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgZyA9IGNbKGEgKyAyMCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIGggPSBjWygoY1soYSArIDQpID4+IDJdIHwgMCkgKyA0KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgaSA9IGNbY1soYSArIDQpID4+IDJdID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBqID0gY1soZiArIDEwNjgpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBrID0gY1soKGNbKGEgKyA0KSA+PiAyXSB8IDApICsgODgpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBsID0gaCA8PCAxO1xuICAgICAgICAgICAgICAgIG0gPSBpIDw8IDE7XG4gICAgICAgICAgICAgICAgaWYgKChlIHwgMCkgPD0gKGkgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICBuID0gKCgoKChpIC0gZSkgfCAwKSAvIChnIHwgMCkpIHwgMCkgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGlmICgobiB8IDApID4gKGQgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbiA9IGQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBkID0gMDtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGQgPSAoZCAtIG4pIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbyA9IG47XG4gICAgICAgICAgICAgICAgICAgICAgICBuID0gKG8gLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKG8gfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBwID0gYlsoayArICgoZSA+PiAxMikgPDwgMSkpID4+IDFdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHEgPSBiWyhrICsgKCgoZSA+PiAxMikgKyAxKSA8PCAxKSkgPj4gMV0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgbyA9IGo7XG4gICAgICAgICAgICAgICAgICAgICAgICBqID0gKG8gKyAyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBiW28gPj4gMV0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKHAgPDwgMTYpID4+IDE2KSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoXyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKHEgPDwgMTYpID4+IDE2KSAtICgocCA8PCAxNikgPj4gMTYpKSB8IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlICYgNDA5NVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID4+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIpKSAmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgNjU1MzU7XG4gICAgICAgICAgICAgICAgICAgICAgICBlID0gKGUgKyBnKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChkIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKChnIHwgMCkgPiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICByID0gaDtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIHIgPSBpO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG4gPSAoKCgoKHIgLSBlKSB8IDApIC8gKGcgfCAwKSkgfCAwKSArIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChuIHwgMCkgPiAoZCB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBuID0gZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGQgPSAwO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgZCA9IChkIC0gbikgfCAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvID0gbjtcbiAgICAgICAgICAgICAgICAgICAgICAgIG4gPSAobyAtIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgobyB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHAgPSBiWyhrICsgKChlID4+IDEyKSA8PCAxKSkgPj4gMV0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgcSA9IGJbKGsgKyAoKChlID4+IDEyKSArIDEpIDw8IDEpKSA+PiAxXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBvID0gajtcbiAgICAgICAgICAgICAgICAgICAgICAgIGogPSAobyArIDIpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJbbyA+PiAxXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgocCA8PCAxNikgPj4gMTYpICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChfKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgocSA8PCAxNikgPj4gMTYpIC0gKChwIDw8IDE2KSA+PiAxNikpIHwgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUgJiA0MDk1XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPj4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMikpICZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA2NTUzNTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUgPSAoZSArIGcpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoKGUgfCAwKSA+PSAoaCB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlID0gKGwgLSBlKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBnID0gKGcgKiAtMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChlIHwgMCkgPD0gKGkgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUgPSAobSAtIGUpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID0gKGcgKiAtMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNbKGEgKyAyMCkgPj4gMl0gPSBnO1xuICAgICAgICAgICAgICAgIGNbKGEgKyAxNikgPj4gMl0gPSBlO1xuICAgICAgICAgICAgICAgIHJldHVybiBjWyhmICsgMTA2OCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY0QoYSwgZCwgZSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBkID0gZCB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGUgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGggPSAwLFxuICAgICAgICAgICAgICAgICAgICBpID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGsgPSAwLFxuICAgICAgICAgICAgICAgICAgICBsID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG4gPSAwO1xuICAgICAgICAgICAgICAgIGYgPSBhO1xuICAgICAgICAgICAgICAgIGEgPSBkO1xuICAgICAgICAgICAgICAgIGQgPSBlO1xuICAgICAgICAgICAgICAgIGUgPSBjWyhhICsgMTYpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBnID0gY1soYSArIDIwKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgaCA9IGNbKChjWyhhICsgNCkgPj4gMl0gfCAwKSArIDQpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBpID0gKGggLSAoY1tjWyhhICsgNCkgPj4gMl0gPj4gMl0gfCAwKSkgfCAwO1xuICAgICAgICAgICAgICAgIGogPSBjWyhmICsgMTA2OCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIGsgPSBjWygoY1soYSArIDQpID4+IDJdIHwgMCkgKyA4OCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZCB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZSB8IDApID49IChoIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUgPSAoZSAtIGkpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBsID0gKCgoKChoIC0gZSkgfCAwKSAvIChnIHwgMCkpIHwgMCkgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGlmICgobCB8IDApID4gKGQgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbCA9IGQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBkID0gMDtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGQgPSAoZCAtIGwpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbSA9IGw7XG4gICAgICAgICAgICAgICAgICAgICAgICBsID0gKG0gLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKG0gfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBtID0gYlsoayArICgoZSA+PiAxMikgPDwgMSkpID4+IDFdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG4gPSBqO1xuICAgICAgICAgICAgICAgICAgICAgICAgaiA9IChuICsgMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgYltuID4+IDFdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChtIDw8IDE2KSA+PiAxNikgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKF8oXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGJbKGsgKyAoKChlID4+IDEyKSArIDEpIDw8IDEpKSA+PiAxXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgLVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgobSA8PCAxNikgPj4gMTYpKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUgJiA0MDk1XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPj4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMikpICZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA2NTUzNTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUgPSAoZSArIGcpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjWyhhICsgMTYpID4+IDJdID0gZTtcbiAgICAgICAgICAgICAgICByZXR1cm4gY1soZiArIDEwNjgpID4+IDJdIHwgMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNFKGQsIGUsIGYpIHtcbiAgICAgICAgICAgICAgICBkID0gZCB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGUgfCAwO1xuICAgICAgICAgICAgICAgIGYgPSBmIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGggPSAwLFxuICAgICAgICAgICAgICAgICAgICBpID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGsgPSAwLFxuICAgICAgICAgICAgICAgICAgICBsID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG4gPSAwLFxuICAgICAgICAgICAgICAgICAgICBvID0gMCxcbiAgICAgICAgICAgICAgICAgICAgcCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHEgPSAwLFxuICAgICAgICAgICAgICAgICAgICByID0gMCxcbiAgICAgICAgICAgICAgICAgICAgcyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHQgPSAwLFxuICAgICAgICAgICAgICAgICAgICB1ID0gMDtcbiAgICAgICAgICAgICAgICBnID0gZDtcbiAgICAgICAgICAgICAgICBkID0gZjtcbiAgICAgICAgICAgICAgICBmID0gKGcgKyAxNzI0ICsgKChlICogMjM2KSB8IDApKSB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGNbKGcgKyAxMDY4KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgaCA9IGNbKChjWyhmICsgNCkgPj4gMl0gfCAwKSArIDg4KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgaSA9IGNbKGYgKyAxNikgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIGogPSBjWyhmICsgMjApID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBrID0gY1soKGNbKGYgKyA0KSA+PiAyXSB8IDApICsgOCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIGwgPSBjW2QgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIGlmICgoaiB8IDApIDwgMCkge1xuICAgICAgICAgICAgICAgICAgICBqID0gLWogfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBtID0gKCgoKChrIC0gaSkgfCAwKSAvIChqIHwgMCkpIHwgMCkgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgaWYgKChtIHwgMCkgPiAobCB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgIG0gPSBsO1xuICAgICAgICAgICAgICAgICAgICBsID0gMDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBsID0gKGwgLSBtKSB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIG4gPSBtO1xuICAgICAgICAgICAgICAgICAgICBtID0gKG4gLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGlmICgobiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG4gPSBiWyhoICsgKChpID4+IDEyKSA8PCAxKSkgPj4gMV0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBvID0gZTtcbiAgICAgICAgICAgICAgICAgICAgZSA9IChvICsgMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICBiW28gPj4gMV0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgKCgobiA8PCAxNikgPj4gMTYpICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKF8oXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoYlsoaCArICgoKGkgPj4gMTIpICsgMSkgPDwgMSkpID4+IDFdIHwgMCkgLVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChuIDw8IDE2KSA+PiAxNikpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgJiA0MDk1XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID4+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMikpICZcbiAgICAgICAgICAgICAgICAgICAgICAgIDY1NTM1O1xuICAgICAgICAgICAgICAgICAgICBpID0gKGkgKyBqKSB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgoaSB8IDApIDwgKGsgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICBwID0gaTtcbiAgICAgICAgICAgICAgICAgICAgcSA9IGY7XG4gICAgICAgICAgICAgICAgICAgIHIgPSAocSArIDE2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGNbciA+PiAyXSA9IHA7XG4gICAgICAgICAgICAgICAgICAgIHMgPSBnO1xuICAgICAgICAgICAgICAgICAgICB0ID0gKHMgKyAxMDY4KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIHUgPSBjW3QgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdSB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgoaSB8IDApID09IChrIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgayA9IGU7XG4gICAgICAgICAgICAgICAgICAgIGUgPSAoayArIDIpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgYltrID4+IDFdID0gYlsoaCArICgoaSA+PiAxMikgPDwgMSkpID4+IDFdIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYVtmIHwgMF0gPSAwO1xuICAgICAgICAgICAgICAgIGggPSBkO1xuICAgICAgICAgICAgICAgIGNbaCA+PiAyXSA9IChjW2ggPj4gMl0gfCAwKSAtIChsICsgMSk7XG4gICAgICAgICAgICAgICAgcCA9IGk7XG4gICAgICAgICAgICAgICAgcSA9IGY7XG4gICAgICAgICAgICAgICAgciA9IChxICsgMTYpIHwgMDtcbiAgICAgICAgICAgICAgICBjW3IgPj4gMl0gPSBwO1xuICAgICAgICAgICAgICAgIHMgPSBnO1xuICAgICAgICAgICAgICAgIHQgPSAocyArIDEwNjgpIHwgMDtcbiAgICAgICAgICAgICAgICB1ID0gY1t0ID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICByZXR1cm4gdSB8IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjRihlLCBmKSB7XG4gICAgICAgICAgICAgICAgZSA9IGUgfCAwO1xuICAgICAgICAgICAgICAgIGYgPSBmIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGggPSAwLFxuICAgICAgICAgICAgICAgICAgICBpID0gMC4wLFxuICAgICAgICAgICAgICAgICAgICBqID0gMCxcbiAgICAgICAgICAgICAgICAgICAgayA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGwgPSAwLFxuICAgICAgICAgICAgICAgICAgICBtID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG8gPSAwLFxuICAgICAgICAgICAgICAgICAgICBwID0gMCxcbiAgICAgICAgICAgICAgICAgICAgcSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHIgPSAwLFxuICAgICAgICAgICAgICAgICAgICBzID0gMCxcbiAgICAgICAgICAgICAgICAgICAgdCA9IDAuMCxcbiAgICAgICAgICAgICAgICAgICAgdSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHYgPSAwLFxuICAgICAgICAgICAgICAgICAgICB3ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgeCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHkgPSAwLFxuICAgICAgICAgICAgICAgICAgICB6ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgQSA9IDAuMCxcbiAgICAgICAgICAgICAgICAgICAgQiA9IDAuMCxcbiAgICAgICAgICAgICAgICAgICAgQyA9IDAuMCxcbiAgICAgICAgICAgICAgICAgICAgRCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIEUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBGID0gMCxcbiAgICAgICAgICAgICAgICAgICAgRyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIEggPSAwLFxuICAgICAgICAgICAgICAgICAgICBJID0gMCxcbiAgICAgICAgICAgICAgICAgICAgSiA9IDAuMCxcbiAgICAgICAgICAgICAgICAgICAgSyA9IDAuMCxcbiAgICAgICAgICAgICAgICAgICAgTCA9IDAuMCxcbiAgICAgICAgICAgICAgICAgICAgTSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIE4gPSAwLFxuICAgICAgICAgICAgICAgICAgICBPID0gMCxcbiAgICAgICAgICAgICAgICAgICAgUCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIFEgPSAwLFxuICAgICAgICAgICAgICAgICAgICBSID0gMCxcbiAgICAgICAgICAgICAgICAgICAgUyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIFQgPSAwLFxuICAgICAgICAgICAgICAgICAgICBVID0gMCxcbiAgICAgICAgICAgICAgICAgICAgViA9IDAsXG4gICAgICAgICAgICAgICAgICAgIFcgPSAwLFxuICAgICAgICAgICAgICAgICAgICBYID0gMDtcbiAgICAgICAgICAgICAgICBnID0gZjtcbiAgICAgICAgICAgICAgICBmID0gY1soZyArIDg4KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgaCA9ICgxMDU2ICsgKGFbKGcgKyAxMTIpIHwgMF0gPDwgMikpIHwgMDtcbiAgICAgICAgICAgICAgICBpID1cbiAgICAgICAgICAgICAgICAgICAgKCsoY1soZyArIDEyKSA+PiAyXSB8IDApICpcbiAgICAgICAgICAgICAgICAgICAgICAgICsoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFtoXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGggKyAxKSB8IDBdIDw8IDgpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoaCArIDIpIHwgMF0gPDwgMTYpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoaCArIDMpIHwgMF0gPDwgMjQpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICApKSAvXG4gICAgICAgICAgICAgICAgICAgICgrKGNbKGcgKyAzMikgPj4gMl0gfCAwKSAqICsoY1soZSArIDQpID4+IDJdIHwgMCkpO1xuICAgICAgICAgICAgICAgIGUgPSB+figrKGNbKGcgKyA4KSA+PiAyXSB8IDApIC8gaSk7XG4gICAgICAgICAgICAgICAgaCA9IGJpKGUgPj4gMTEpIHwgMDtcbiAgICAgICAgICAgICAgICBqID0gaDtcbiAgICAgICAgICAgICAgICBrID0gaDtcbiAgICAgICAgICAgICAgICBoID0gKChlID4+IDEyKSAtIDEpIHwgMDtcbiAgICAgICAgICAgICAgICBsID0gKCgoKGNbKGcgKyA4KSA+PiAyXSB8IDApIC0gNDA5NikgfCAwKSAvIChoIHwgMCkpIHwgMDtcbiAgICAgICAgICAgICAgICBtID0gbDtcbiAgICAgICAgICAgICAgICBuID0gbDtcbiAgICAgICAgICAgICAgICBsID0gKGggLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgaCA9IGw7XG4gICAgICAgICAgICAgICAgaWYgKChsIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBsID0gaztcbiAgICAgICAgICAgICAgICAgICAgayA9IChsICsgMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICBiW2wgPj4gMV0gPSBiW2YgPj4gMV0gfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICBsID0gKGggLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGggPSBsO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGwgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBsID0gKGYgKyAoKG4gPj4gMTIpIDw8IDEpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGlmIChsID4+PiAwID4gZiA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgbyA9IGJbKGwgLSAyKSA+PiAxXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBvID0gMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBwID0gbyAmIDY1NTM1O1xuICAgICAgICAgICAgICAgICAgICBxID0gYltsID4+IDFdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgciA9IGJbKGwgKyAyKSA+PiAxXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIHMgPSBiWyhsICsgNCkgPj4gMV0gfCAwO1xuICAgICAgICAgICAgICAgICAgICB0ID0gKygoKG4gJiA0MDk1KSA+Pj4gMCkgPj4+IDApICogMC4wMDAyNDQxNDA2MjU7XG4gICAgICAgICAgICAgICAgICAgIGwgPSBrO1xuICAgICAgICAgICAgICAgICAgICBrID0gKGwgKyAyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGJbbCA+PiAxXSA9IH5+KFxuICAgICAgICAgICAgICAgICAgICAgICAgKygoKHEgPDwgMTYpID4+IDE2KSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICh0IC8gNi4wKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKCsoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKCgocCA8PCAxNikgPj4gMTYpICogLTIpIHwgMCkgLVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgoKHEgPDwgMTYpID4+IDE2KSAqIDMpIHwgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgoKHIgPDwgMTYpID4+IDE2KSAqIDYpIHwgMCkgLVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChzIDw8IDE2KSA+PiAxNikpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgrKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKCgocCA8PCAxNikgPj4gMTYpIC1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgocSA8PCAxNikgPj4gMTYpIDw8IDEpICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChyIDw8IDE2KSA+PiAxNikpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdCAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKC0oKHAgPDwgMTYpID4+IDE2KSB8IDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKCgoKChxIDw8IDE2KSA+PiAxNikgLVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHIgPDwgMTYpID4+IDE2KSkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDMpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgocyA8PCAxNikgPj4gMTYpKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkpKVxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICBuID0gKG4gKyBtKSB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgoKG4gJiA0MDk1KSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgcCA9IGJbKGYgKyAoKG4gPj4gMTIpIDw8IDEpKSA+PiAxXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIHEgPSBiWyhmICsgKCgobiA+PiAxMikgKyAxKSA8PCAxKSkgPj4gMV0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBtID0gaztcbiAgICAgICAgICAgICAgICAgICAgayA9IChtICsgMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICBiW20gPj4gMV0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgKCgocCA8PCAxNikgPj4gMTYpICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKF8oXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKHEgPDwgMTYpID4+IDE2KSAtICgocCA8PCAxNikgPj4gMTYpKSB8IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG4gJiA0MDk1XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID4+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMikpICZcbiAgICAgICAgICAgICAgICAgICAgICAgIDY1NTM1O1xuICAgICAgICAgICAgICAgICAgICB1ID0gZTtcbiAgICAgICAgICAgICAgICAgICAgdiA9IGc7XG4gICAgICAgICAgICAgICAgICAgIHcgPSAodiArIDgpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1t3ID4+IDJdID0gdTtcbiAgICAgICAgICAgICAgICAgICAgeCA9IGc7XG4gICAgICAgICAgICAgICAgICAgIHkgPSB4IHwgMDtcbiAgICAgICAgICAgICAgICAgICAgeiA9IGNbeSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIEEgPSArKHogfCAwKTtcbiAgICAgICAgICAgICAgICAgICAgQiA9IGk7XG4gICAgICAgICAgICAgICAgICAgIEMgPSBBIC8gQjtcbiAgICAgICAgICAgICAgICAgICAgRCA9IH5+QztcbiAgICAgICAgICAgICAgICAgICAgRSA9IGc7XG4gICAgICAgICAgICAgICAgICAgIEYgPSBFIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1tGID4+IDJdID0gRDtcbiAgICAgICAgICAgICAgICAgICAgRyA9IGc7XG4gICAgICAgICAgICAgICAgICAgIEggPSAoRyArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgSSA9IGNbSCA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIEogPSArKEkgfCAwKTtcbiAgICAgICAgICAgICAgICAgICAgSyA9IGk7XG4gICAgICAgICAgICAgICAgICAgIEwgPSBKIC8gSztcbiAgICAgICAgICAgICAgICAgICAgTSA9IH5+TDtcbiAgICAgICAgICAgICAgICAgICAgTiA9IGc7XG4gICAgICAgICAgICAgICAgICAgIE8gPSAoTiArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1tPID4+IDJdID0gTTtcbiAgICAgICAgICAgICAgICAgICAgUCA9IGc7XG4gICAgICAgICAgICAgICAgICAgIFEgPSAoUCArIDg4KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIFIgPSBjW1EgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBTID0gUjtcbiAgICAgICAgICAgICAgICAgICAgYzAoUyk7XG4gICAgICAgICAgICAgICAgICAgIFQgPSBqO1xuICAgICAgICAgICAgICAgICAgICBVID0gZztcbiAgICAgICAgICAgICAgICAgICAgViA9IChVICsgODgpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1tWID4+IDJdID0gVDtcbiAgICAgICAgICAgICAgICAgICAgVyA9IGc7XG4gICAgICAgICAgICAgICAgICAgIFggPSAoVyArIDEyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGNbWCA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBwID0gaztcbiAgICAgICAgICAgICAgICAgICAgayA9IChwICsgMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICBiW3AgPj4gMV0gPSBiWyhmICsgKChuID4+IDEyKSA8PCAxKSkgPj4gMV0gfCAwO1xuICAgICAgICAgICAgICAgICAgICB1ID0gZTtcbiAgICAgICAgICAgICAgICAgICAgdiA9IGc7XG4gICAgICAgICAgICAgICAgICAgIHcgPSAodiArIDgpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1t3ID4+IDJdID0gdTtcbiAgICAgICAgICAgICAgICAgICAgeCA9IGc7XG4gICAgICAgICAgICAgICAgICAgIHkgPSB4IHwgMDtcbiAgICAgICAgICAgICAgICAgICAgeiA9IGNbeSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIEEgPSArKHogfCAwKTtcbiAgICAgICAgICAgICAgICAgICAgQiA9IGk7XG4gICAgICAgICAgICAgICAgICAgIEMgPSBBIC8gQjtcbiAgICAgICAgICAgICAgICAgICAgRCA9IH5+QztcbiAgICAgICAgICAgICAgICAgICAgRSA9IGc7XG4gICAgICAgICAgICAgICAgICAgIEYgPSBFIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1tGID4+IDJdID0gRDtcbiAgICAgICAgICAgICAgICAgICAgRyA9IGc7XG4gICAgICAgICAgICAgICAgICAgIEggPSAoRyArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgSSA9IGNbSCA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIEogPSArKEkgfCAwKTtcbiAgICAgICAgICAgICAgICAgICAgSyA9IGk7XG4gICAgICAgICAgICAgICAgICAgIEwgPSBKIC8gSztcbiAgICAgICAgICAgICAgICAgICAgTSA9IH5+TDtcbiAgICAgICAgICAgICAgICAgICAgTiA9IGc7XG4gICAgICAgICAgICAgICAgICAgIE8gPSAoTiArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1tPID4+IDJdID0gTTtcbiAgICAgICAgICAgICAgICAgICAgUCA9IGc7XG4gICAgICAgICAgICAgICAgICAgIFEgPSAoUCArIDg4KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIFIgPSBjW1EgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBTID0gUjtcbiAgICAgICAgICAgICAgICAgICAgYzAoUyk7XG4gICAgICAgICAgICAgICAgICAgIFQgPSBqO1xuICAgICAgICAgICAgICAgICAgICBVID0gZztcbiAgICAgICAgICAgICAgICAgICAgViA9IChVICsgODgpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1tWID4+IDJdID0gVDtcbiAgICAgICAgICAgICAgICAgICAgVyA9IGc7XG4gICAgICAgICAgICAgICAgICAgIFggPSAoVyArIDEyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGNbWCA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjRyhhLCBiLCBlKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGYgPSAwLFxuICAgICAgICAgICAgICAgICAgICBnID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGogPSAwLFxuICAgICAgICAgICAgICAgICAgICBsID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbSA9IDAuMCxcbiAgICAgICAgICAgICAgICAgICAgbiA9IDAuMDtcbiAgICAgICAgICAgICAgICBmID0gYTtcbiAgICAgICAgICAgICAgICBhID0gYjtcbiAgICAgICAgICAgICAgICBiID0gZTtcbiAgICAgICAgICAgICAgICBlID0gKGEgKyAyMDgpIHwgMDtcbiAgICAgICAgICAgICAgICBnID0gY1tlID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBjW2UgPj4gMl0gPSBnICsgMTtcbiAgICAgICAgICAgICAgICBpZiAoKGcgfCAwKSA+PSA2Mykge1xuICAgICAgICAgICAgICAgICAgICBjWyhhICsgMjA4KSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGcgPSBjSChjWyhhICsgMjA4KSA+PiAyXSB8IDApIHwgMDtcbiAgICAgICAgICAgICAgICBpZiAoKGNbKGEgKyA4MCArIChnIDw8IDIpKSA+PiAyXSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChiIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaSA9IC0oY1soYSArIDgwICsgKGcgPDwgMikpID4+IDJdIHwgMCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgaiA9IGk7XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gaiB8IDA7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpID0gY1soYSArIDgwICsgKGcgPDwgMikpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGogPSBpO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGogfCAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGUgPSAoZFsoKGNbKGEgKyA0KSA+PiAyXSB8IDApICsgMTA5KSB8IDBdIHwgMCkgPDwgNztcbiAgICAgICAgICAgICAgICBpZiAoKGNbKGEgKyA1MikgPj4gMl0gfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGwgPSAoYSArIDU2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGNbbCA+PiAyXSA9IChjW2wgPj4gMl0gfCAwKSArIChjWyhhICsgNTIpID4+IDJdIHwgMCk7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoY1soYSArIDU2KSA+PiAyXSB8IDApID49IDY1NTM2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjWyhhICsgNTIpID4+IDJdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUgPSBfKGUsIGNbKGEgKyA1NikgPj4gMl0gfCAwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBlID0gZSA+PiAxNjtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBtID1cbiAgICAgICAgICAgICAgICAgICAgKCgrKGNbKChjWyhhICsgNCkgPj4gMl0gfCAwKSArIDEyKSA+PiAyXSB8IDApICpcbiAgICAgICAgICAgICAgICAgICAgICAgICsoY1soYSArIDEyKSA+PiAyXSB8IDApKSAvXG4gICAgICAgICAgICAgICAgICAgICAgICAoKyhjWygoY1soYSArIDQpID4+IDJdIHwgMCkgKyAzMikgPj4gMl0gfCAwKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKyhjWyhmICsgNCkgPj4gMl0gfCAwKSkpICpcbiAgICAgICAgICAgICAgICAgICAgNDA5Ni4wO1xuICAgICAgICAgICAgICAgIGYgPSB+fihcbiAgICAgICAgICAgICAgICAgICAgK1IoXG4gICAgICAgICAgICAgICAgICAgICAgICArKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICsoKGNbKGEgKyAyMDgpID4+IDJdIDw8IDQpIHwgMCkgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAuMDA2MTM1OTIzMTUxNTQyNTY1XG4gICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICkgKlxuICAgICAgICAgICAgICAgICAgICArKGUgfCAwKSAqXG4gICAgICAgICAgICAgICAgICAgIDEuMFxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgaWYgKChmIHwgMCkgPCAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGYgPSAtZiB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGUgPSAoMTcwNCArICgoKGYgPj4gNSkgJiAyNTUpIDw8IDMpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIG4gPVxuICAgICAgICAgICAgICAgICAgICAgICAgKChjW2sgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbZV0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhlICsgMSkgfCAwXSA8PCA4KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGUgKyAyKSB8IDBdIDw8IDE2KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGUgKyAzKSB8IDBdIDw8IDI0KSksXG4gICAgICAgICAgICAgICAgICAgICAgICAoY1soayArIDQpID4+IDJdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWyhlICsgNCkgfCAwXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGUgKyA1KSB8IDBdIDw8IDgpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZSArIDYpIHwgMF0gPDwgMTYpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZSArIDcpIHwgMF0gPDwgMjQpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICtoW2sgPj4gM10pO1xuICAgICAgICAgICAgICAgICAgICBlID0gKDM3NTIgKyAoKGYgPj4gMTMpIDw8IDMpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIG0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgbSAvXG4gICAgICAgICAgICAgICAgICAgICAgICAobiAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjW2sgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkW2VdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGUgKyAxKSB8IDBdIDw8IDgpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGUgKyAyKSB8IDBdIDw8IDE2KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhlICsgMykgfCAwXSA8PCAyNCkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjWyhrICsgNCkgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWyhlICsgNCkgfCAwXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhlICsgNSkgfCAwXSA8PCA4KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhlICsgNikgfCAwXSA8PCAxNikgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZSArIDcpIHwgMF0gPDwgMjQpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAraFtrID4+IDNdKSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgZSA9ICgxNzA0ICsgKCgoZiA+PiA1KSAmIDI1NSkgPDwgMykpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgbiA9XG4gICAgICAgICAgICAgICAgICAgICAgICAoKGNbayA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZFtlXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGUgKyAxKSB8IDBdIDw8IDgpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZSArIDIpIHwgMF0gPDwgMTYpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZSArIDMpIHwgMF0gPDwgMjQpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChjWyhrICsgNCkgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbKGUgKyA0KSB8IDBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZSArIDUpIHwgMF0gPDwgOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhlICsgNikgfCAwXSA8PCAxNikgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhlICsgNykgfCAwXSA8PCAyNCkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgK2hbayA+PiAzXSk7XG4gICAgICAgICAgICAgICAgICAgIGUgPSAoMzc1MiArICgoZiA+PiAxMykgPDwgMykpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgbSA9XG4gICAgICAgICAgICAgICAgICAgICAgICBtICpcbiAgICAgICAgICAgICAgICAgICAgICAgIG4gKlxuICAgICAgICAgICAgICAgICAgICAgICAgKChjW2sgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRbZV0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkWyhlICsgMSkgfCAwXSA8PCA4KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGUgKyAyKSB8IDBdIDw8IDE2KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGUgKyAzKSB8IDBdIDw8IDI0KSksXG4gICAgICAgICAgICAgICAgICAgICAgICAoY1soayArIDQpID4+IDJdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkWyhlICsgNCkgfCAwXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKGRbKGUgKyA1KSB8IDBdIDw8IDgpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZSArIDYpIHwgMF0gPDwgMTYpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZFsoZSArIDcpIHwgMF0gPDwgMjQpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICtoW2sgPj4gM10pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoKGNbKGEgKyA1MikgPj4gMl0gfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGNbKGEgKyA4MCArIChnIDw8IDIpKSA+PiAyXSA9IH5+bTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKChiIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBtID0gLTAuMCAtIG07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGkgPSB+fm07XG4gICAgICAgICAgICAgICAgaiA9IGk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGogfCAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY0goYSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgYiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGMgPSAwO1xuICAgICAgICAgICAgICAgIGIgPSBhO1xuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChiIHwgMCkgPCAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgYyA9ICgxNSAtIGIpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYiB8IDApID49IDQ4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYyA9ICg3OSAtIGIpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYyA9IChiIC0gMTYpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgIHJldHVybiBjIHwgMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNJKGEsIGIsIGQsIGUpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGFuKGIgfCAwLCBkIHwgMCwgZSB8IDAsIGNbYSA+PiAyXSB8IDApIHwgMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNKKGEpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGIgPSAwLFxuICAgICAgICAgICAgICAgICAgICBkID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZSA9IDA7XG4gICAgICAgICAgICAgICAgYiA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IDA7XG4gICAgICAgICAgICAgICAgaWYgKChjWyhiICsgNCkgPj4gMl0gfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGQgPSBiO1xuICAgICAgICAgICAgICAgICAgICBjMChkKTtcbiAgICAgICAgICAgICAgICAgICAgZSA9IGE7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBlIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYSA9IGFvKGNbYiA+PiAyXSB8IDApIHwgMDtcbiAgICAgICAgICAgICAgICBkID0gYjtcbiAgICAgICAgICAgICAgICBjMChkKTtcbiAgICAgICAgICAgICAgICBlID0gYTtcbiAgICAgICAgICAgICAgICByZXR1cm4gZSB8IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjSyhhLCBiLCBkLCBlKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBkID0gZCB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGUgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDA7XG4gICAgICAgICAgICAgICAgZiA9IGQ7XG4gICAgICAgICAgICAgICAgZCA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IGU7XG4gICAgICAgICAgICAgICAgZSA9IGNbKGQgKyA0KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgZyA9IChlICsgKF8oYSwgZikgfCAwKSkgfCAwO1xuICAgICAgICAgICAgICAgIGlmIChnID4+PiAwID4gKGNbKGQgKyA4KSA+PiAyXSB8IDApID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGEgPVxuICAgICAgICAgICAgICAgICAgICAgICAgKCgoKChjWyhkICsgOCkgPj4gMl0gfCAwKSAtIChjWyhkICsgNCkgPj4gMl0gfCAwKSkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID4+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApIC9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZiA+Pj4gMCkpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGcgPSBiO1xuICAgICAgICAgICAgICAgIGIgPSBjWyhkICsgNCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgIGUgPSBfKGEsIGYpIHwgMDtcbiAgICAgICAgICAgICAgICBjNihnIHwgMCwgYiB8IDAsIGUpIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gXyhhLCBmKSB8IDA7XG4gICAgICAgICAgICAgICAgZiA9IChkICsgNCkgfCAwO1xuICAgICAgICAgICAgICAgIGNbZiA+PiAyXSA9IChjW2YgPj4gMl0gfCAwKSArIGU7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGEgfCAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY0woYSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgYiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGQgPSAwO1xuICAgICAgICAgICAgICAgIGIgPSBhO1xuICAgICAgICAgICAgICAgIGlmICgoY1soYiArIDEyKSA+PiAyXSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgZCA9IGI7XG4gICAgICAgICAgICAgICAgICAgIGMwKGQpO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYzAoY1tiID4+IDJdIHwgMCk7XG4gICAgICAgICAgICAgICAgZCA9IGI7XG4gICAgICAgICAgICAgICAgYzAoZCk7XG4gICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjTShhLCBiKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDA7XG4gICAgICAgICAgICAgICAgZCA9IGJpKDEyKSB8IDA7XG4gICAgICAgICAgICAgICAgaWYgKChkIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBlID0gMDtcbiAgICAgICAgICAgICAgICAgICAgZiA9IGU7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZyA9IGJpKDgpIHwgMDtcbiAgICAgICAgICAgICAgICBpZiAoKGcgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIGMwKGQpO1xuICAgICAgICAgICAgICAgICAgICBlID0gMDtcbiAgICAgICAgICAgICAgICAgICAgZiA9IGU7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmIHwgMDtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBjW2cgPj4gMl0gPSBhO1xuICAgICAgICAgICAgICAgICAgICBjWyhnICsgNCkgPj4gMl0gPSBiO1xuICAgICAgICAgICAgICAgICAgICBjWyhkICsgOCkgPj4gMl0gPSBnO1xuICAgICAgICAgICAgICAgICAgICBjW2QgPj4gMl0gPSAyO1xuICAgICAgICAgICAgICAgICAgICBjWyhkICsgNCkgPj4gMl0gPSA0O1xuICAgICAgICAgICAgICAgICAgICBlID0gZDtcbiAgICAgICAgICAgICAgICAgICAgZiA9IGU7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBmIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjTihhKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBiID0gMCxcbiAgICAgICAgICAgICAgICAgICAgYyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGQgPSAwO1xuICAgICAgICAgICAgICAgIGIgPSBhdihhIHwgMCwgNjU0NCkgfCAwO1xuICAgICAgICAgICAgICAgIGlmICgoYiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgYyA9IDA7XG4gICAgICAgICAgICAgICAgICAgIGQgPSBjO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZCB8IDA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgYyA9IGNNKGIsIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgZCA9IGM7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBkIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjTyhhLCBiLCBkKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBkID0gZCB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGggPSAwO1xuICAgICAgICAgICAgICAgIGUgPSBhO1xuICAgICAgICAgICAgICAgIGEgPSBiaSgxMikgfCAwO1xuICAgICAgICAgICAgICAgIGlmICgoYSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgZiA9IDA7XG4gICAgICAgICAgICAgICAgICAgIGcgPSBmO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZyB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGggPSBiaSgxNikgfCAwO1xuICAgICAgICAgICAgICAgIGlmICgoaCB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgYzAoYSk7XG4gICAgICAgICAgICAgICAgICAgIGYgPSAwO1xuICAgICAgICAgICAgICAgICAgICBnID0gZjtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGcgfCAwO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGNbaCA+PiAyXSA9IGU7XG4gICAgICAgICAgICAgICAgICAgIGNbKGggKyA0KSA+PiAyXSA9IGU7XG4gICAgICAgICAgICAgICAgICAgIGNbKGggKyA4KSA+PiAyXSA9IGUgKyBiO1xuICAgICAgICAgICAgICAgICAgICBjWyhoICsgMTIpID4+IDJdID0gZDtcbiAgICAgICAgICAgICAgICAgICAgY1soYSArIDgpID4+IDJdID0gaDtcbiAgICAgICAgICAgICAgICAgICAgY1thID4+IDJdID0gNDtcbiAgICAgICAgICAgICAgICAgICAgY1soYSArIDQpID4+IDJdID0gMjtcbiAgICAgICAgICAgICAgICAgICAgZiA9IGE7XG4gICAgICAgICAgICAgICAgICAgIGcgPSBmO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZyB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY1AoYSwgYiwgZCwgZSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgZCA9IGQgfCAwO1xuICAgICAgICAgICAgICAgIGUgPSBlIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZiA9IDA7XG4gICAgICAgICAgICAgICAgZiA9IGE7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGFZW2NbZiA+PiAyXSAmIDddKGNbKGYgKyA4KSA+PiAyXSB8IDAsIGIsIGQsIGUpIHwgMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNRKGEsIGIpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBjID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGUgPSAwO1xuICAgICAgICAgICAgICAgIGMgPSBpO1xuICAgICAgICAgICAgICAgIGkgPSAoaSArIDEwMjQpIHwgMDtcbiAgICAgICAgICAgICAgICBkID0gYyB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IGI7XG4gICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGEgPj4+IDAgPD0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYiA9IGE7XG4gICAgICAgICAgICAgICAgICAgIGlmIChiID4+PiAwID4gMTAyNCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYiA9IDEwMjQ7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYSA9IChhIC0gYikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAoYiB8IDApICE9IChjUChlLCBkIHwgMCwgMSwgYikgfCAwKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaSA9IGM7XG4gICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY1IoYSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgYiA9IDA7XG4gICAgICAgICAgICAgICAgYiA9IGE7XG4gICAgICAgICAgICAgICAgYSA9IGFXW2NbKGIgKyA0KSA+PiAyXSAmIDddKGNbKGIgKyA4KSA+PiAyXSB8IDApIHwgMDtcbiAgICAgICAgICAgICAgICBjMChiKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gYSB8IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjUygpIHtcbiAgICAgICAgICAgICAgICBsZXQgYSA9IDA7XG4gICAgICAgICAgICAgICAgY1sxNjc2XSA9IGJpKDUxNikgfCAwO1xuICAgICAgICAgICAgICAgIGM1KGNbMTY3Nl0gfCAwLCAwLCA1MTYpO1xuICAgICAgICAgICAgICAgIGEgPSBiaSgzNTg0KSB8IDA7XG4gICAgICAgICAgICAgICAgY1tjWzE2NzZdID4+IDJdID0gYTtcbiAgICAgICAgICAgICAgICBjNShjW2NbMTY3Nl0gPj4gMl0gfCAwLCAwLCAzNTg0KTtcbiAgICAgICAgICAgICAgICBjWzE4MDRdID0gYmkoNTE2KSB8IDA7XG4gICAgICAgICAgICAgICAgYzUoY1sxODA0XSB8IDAsIDAsIDUxNik7XG4gICAgICAgICAgICAgICAgYSA9IGJpKDM1ODQpIHwgMDtcbiAgICAgICAgICAgICAgICBjW2NbMTgwNF0gPj4gMl0gPSBhO1xuICAgICAgICAgICAgICAgIGM1KGNbY1sxODA0XSA+PiAyXSB8IDAsIDAsIDM1ODQpO1xuICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY1QoYikge1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGggPSAwLFxuICAgICAgICAgICAgICAgICAgICBqID0gMDtcbiAgICAgICAgICAgICAgICBkID0gaTtcbiAgICAgICAgICAgICAgICBpID0gKGkgKyAxMDI0KSB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGQgfCAwO1xuICAgICAgICAgICAgICAgIGYgPSBiO1xuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChmIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChjMShmIHwgMCkgfCAwKSA+Pj4gMCA+PSAxMDI0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBiID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBnID0gZjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGMyKGIgfCAwLCBnIHwgMCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgZyA9IGFFKGYgfCAwLCA0NykgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChnIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFbKGUgKyAoZyAtIGYpKSB8IDBdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID0gY1ttID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXIoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGcgfCAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2NDgwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGcgPSBpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGkgPSAoaSArIDgpIHwgMCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjW2cgPj4gMl0gPSBiKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZykgfCAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmooZSB8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgY1MoKSB8IDA7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGYgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGFbZl0gfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBoID0gZjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGogPSBjVShoKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBpID0gZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBqIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgIGYgPSA2NTIwO1xuICAgICAgICAgICAgICAgIGggPSBmO1xuICAgICAgICAgICAgICAgIGogPSBjVShoKSB8IDA7XG4gICAgICAgICAgICAgICAgaSA9IGQ7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGogfCAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gY1UoYikge1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGggPSAwLFxuICAgICAgICAgICAgICAgICAgICBqID0gMCxcbiAgICAgICAgICAgICAgICAgICAgayA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGwgPSAwLFxuICAgICAgICAgICAgICAgICAgICBuID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHAgPSAwLFxuICAgICAgICAgICAgICAgICAgICBxID0gMCxcbiAgICAgICAgICAgICAgICAgICAgciA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHMgPSAwLFxuICAgICAgICAgICAgICAgICAgICB0ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgdSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHYgPSAwLFxuICAgICAgICAgICAgICAgICAgICB3ID0gMDtcbiAgICAgICAgICAgICAgICBkID0gaTtcbiAgICAgICAgICAgICAgICBpID0gKGkgKyAxMDY0KSB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGQgfCAwO1xuICAgICAgICAgICAgICAgIGYgPSAoZCArIDEwMjQpIHwgMDtcbiAgICAgICAgICAgICAgICBnID0gYjtcbiAgICAgICAgICAgICAgICBiID0gMDtcbiAgICAgICAgICAgICAgICBoID0gMDtcbiAgICAgICAgICAgICAgICBpZiAoKGNbMTY2MF0gfCAwKSA+IDUwKSB7XG4gICAgICAgICAgICAgICAgICAgIGogPSBjW20gPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBhcihcbiAgICAgICAgICAgICAgICAgICAgICAgIGogfCAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgNTc5MixcbiAgICAgICAgICAgICAgICAgICAgICAgICgoayA9IGkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGkgPSAoaSArIDEpIHwgMCksXG4gICAgICAgICAgICAgICAgICAgICAgICAoaSA9IChpICsgNykgJiAtOCksXG4gICAgICAgICAgICAgICAgICAgICAgICAoY1trID4+IDJdID0gMCksXG4gICAgICAgICAgICAgICAgICAgICAgICBrKSB8IDBcbiAgICAgICAgICAgICAgICAgICAgKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBrO1xuICAgICAgICAgICAgICAgICAgICBsID0gLTE7XG4gICAgICAgICAgICAgICAgICAgIG4gPSBsO1xuICAgICAgICAgICAgICAgICAgICBpID0gZDtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG4gfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBqID0gYmgoZykgfCAwO1xuICAgICAgICAgICAgICAgIG8gPSBqO1xuICAgICAgICAgICAgICAgIGlmICgoaiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgaiA9IGNbbSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIHAgPSBnO1xuICAgICAgICAgICAgICAgICAgICBhcihcbiAgICAgICAgICAgICAgICAgICAgICAgIGogfCAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgNTM5MixcbiAgICAgICAgICAgICAgICAgICAgICAgICgoayA9IGkpLCAoaSA9IChpICsgOCkgfCAwKSwgKGNbayA+PiAyXSA9IHApLCBrKSB8IDBcbiAgICAgICAgICAgICAgICAgICAgKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBrO1xuICAgICAgICAgICAgICAgICAgICBsID0gLTE7XG4gICAgICAgICAgICAgICAgICAgIG4gPSBsO1xuICAgICAgICAgICAgICAgICAgICBpID0gZDtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG4gfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBMMTg4MTogd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChjXyhlIHwgMCwgMTAyNCwgbykgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBxID0gMTY0NjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGggPSAoaCArIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgcCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIGNbZiA+PiAyXSA9IGF5KGUgfCAwLCA1MDk2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoY1tmID4+IDJdIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChhVihjW2YgPj4gMl0gfCAwLCA0ODQwKSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwID0gLTE7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYVtjW2YgPj4gMl0gfCAwXSB8IDApID09IDM1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlIEwxODgxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChjWyhmICsgKHAgPDwgMikpID4+IDJdIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGFbY1soZiArIChwIDw8IDIpKSA+PiAyXSB8IDBdIHwgMCkgPT0gMzUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgciA9IChwIHwgMCkgPCAxMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICghcikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgaiA9IChwICsgMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgcCA9IGo7XG4gICAgICAgICAgICAgICAgICAgICAgICBjWyhmICsgKGogPDwgMikpID4+IDJdID0gYXkoMCwgNTA5NikgfCAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYVYoY1tmID4+IDJdIHwgMCwgNDgzMikgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChhVihjW2YgPj4gMl0gfCAwLCA0ODE2KSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IDE1MDQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGFWKGNbZiA+PiAyXSB8IDAsIDQ4MDApIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gMTUwNDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYVYoY1tmID4+IDJdIHwgMCwgNjU1MikgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAxNTA0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChhVihjW2YgPj4gMl0gfCAwLCA2NTM2KSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IDE1MDQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGFWKGNbZiA+PiAyXSB8IDAsIDY1MDQpIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGFWKGNbZiA+PiAyXSB8IDAsIDY0MTYpIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFWKGNbZiA+PiAyXSB8IDAsIDY0MDApIHwgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gMTUwOTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFWKGNbZiA+PiAyXSB8IDAsIDYzNDQpIHwgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYVYoY1tmID4+IDJdIHwgMCwgNjI4MCkgfCAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhVihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbZiA+PiAyXSB8IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2MTc2XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYVYoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tmID4+IDJdIHwgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2MTM2XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA9PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAxNTE2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFWKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbZiA+PiAyXSB8IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNjA3MlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFWKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW2YgPj4gMl0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNjAwOFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFWKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfCAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTk1MlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFWKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1ODgwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYVYoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDU3ODRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhVihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZiA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTcyMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFWKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1NjE2XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocCB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApIDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gMTU2MjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMMTg4MTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYVtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAxNTYyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwxODgxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZiA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1N1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IDE1NjI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDE4ODE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhTChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHMgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IDE1NjU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDE4ODE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHMgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI3XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gMTU2NTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMMTg4MTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYiB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IDE1Njc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDE4ODE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGIgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChzICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGMwKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGIgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgocyAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGogPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGMxKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChzICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IGo7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjMihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0IHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChzICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI0KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gLTE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYiA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgocyAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMCkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IC0xO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGIgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHMgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjgpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPSAtMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChzICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gLTE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYiA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgocyAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gLTE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYiA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgocyAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gLTE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ID0gMjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1IHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID49XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChwIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYUgoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChmICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHUgPDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNjFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaiA9IHQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodCB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA9PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAxNTczO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMMTg4MTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdCA9IGo7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaiA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYVYoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChmICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHUgPDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTI3MlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFWKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChmICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1IDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTIwOFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFWKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGYgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1IDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1MTUyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYVYoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChmICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHUgPDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTAwOFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFWKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChmICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh1IDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDk0NFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gMTYyNTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwxODgxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhVihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1ZTNcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhVihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaiB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0OTkyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYVYoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDkzNlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IDE2MjE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwxODgxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgocyAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjgpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNCkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYiA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHMgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDI4KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYiA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgocyAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMCkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYVYoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaiB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNWUzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYVYoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGogfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDk5MlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAxNjExO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwxODgxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGIgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHMgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjgpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGIgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHMgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjgpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjApID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhVihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGogfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1MTQ0XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYVYoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaiB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTExMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFWKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUxMDRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2ID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgoKCgoYUwoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTAwKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMDApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgL1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTU3KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHYgPSAxMjc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHYgPSA2NDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodiB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IDE2MDQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwxODgxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh2IHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI3XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAxNjA0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMMTg4MTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAodiB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0NVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ4XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gMTYwNDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMMTg4MTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYVtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgalxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTdcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAxNjA0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwxODgxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGIgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChzICpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPSB2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdiA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYUwoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGogfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHYgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IDE1ODY7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDE4ODE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHYgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI3XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gMTU4NjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMMTg4MTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYVtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgalxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNDhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAxNTg2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwxODgxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1N1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IDE1ODY7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDE4ODE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYiA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgocyAqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA0KSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gdjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHYgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYUwoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaiB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHYgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApIDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gMTU3OTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwxODgxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICh2IHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4MDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gMTU3OTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwxODgxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGpcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApIDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ4XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IDE1Nzk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMMTg4MTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYVtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA1N1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAxNTc5O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDE4ODE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKHMgKlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOCkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPSB2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHUgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChwIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAxNTUyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwxODgxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcyA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYUwoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNCkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHMgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IDE1NTU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDE4ODE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHMgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTI3XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gMTU1NTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMMTg4MTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDY3MDQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHMgPDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyKSkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNjcwNCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocyA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiaShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUxNlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjNShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg2NzA0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocyA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyKSkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTE2XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmkoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAzNTg0XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNjcwNCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHMgPDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IHQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYzUoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg2NzA0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHMgPDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM1ODRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYiA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDY3MDQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHMgPDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyKSkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHAgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApIDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gMTU0MztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwxODgxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYUwoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGYgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNCkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocyB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAxNTQ2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDE4ODE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHMgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEyN1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAxNTQ2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDE4ODE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDcyMTYgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocyA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNzIxNiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzIDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyKSkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmkoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDUxNlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjNShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNzIxNiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocyA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTE2XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdCA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmkoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDM1ODRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoNzIxNiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocyA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IHQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjNShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDcyMTYgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzIDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDIpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMzU4NFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDcyMTYgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocyA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHAgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gMTUzOTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDE4ODE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGYgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjNyhcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNzcyOCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdCB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyNTVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhWzc5ODNdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocCB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApIDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gMTUzMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMMTg4MTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMgPSAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDFcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHMgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPj1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHAgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMTY2MF0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1sxNjYwXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1UoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHMgPDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWzE2NjBdID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbMTY2MF0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgLVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAocCB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAxNTIzO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDE4ODE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcyA9IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHMgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA+PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChwIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYmooXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGYgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKHMgPDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyKSkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHMgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW20gPj4gMl0gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0IHwgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNTk2MCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChrID0gaSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGkgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDcpICZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC04KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrID4+IDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IDApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrKSB8IDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0gaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQgPSBjW20gPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXIoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdCB8IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNjAxNixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGsgPSBpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpICsgMSkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpICsgNykgJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtOCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbayA+PiAyXSA9IDApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGspIHwgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0gaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAxNTE2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChxIHwgMCkgPT0gMTUxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQgPSBjW20gPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHcgPSBjW2YgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0IHwgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNjA4OCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChrID0gaSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpID0gKGkgKyA4KSB8IDApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1trID4+IDJdID0gdyksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGspIHwgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgPSBrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdyA9IGNbbSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3IHwgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2MTkyLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoayA9IGkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpID0gKGkgKyAxKSB8IDApLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpID0gKGkgKyA3KSAmIC04KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1trID4+IDJdID0gMCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaykgfCAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgPSBrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdyA9IGNbbSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdyB8IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA2Mjk2LFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChrID0gaSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaSA9IChpICsgMSkgfCAwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChpID0gKGkgKyA3KSAmIC04KSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjW2sgPj4gMl0gPSAwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGspIHwgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gMTUwOTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgocSB8IDApID09IDE1MDkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdyA9IGNbbSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ID0gY1tmID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHcgfCAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDYzNTIsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChrID0gaSksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGkgPSAoaSArIDgpIHwgMCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbayA+PiAyXSA9IHQpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGspIHwgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0gaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQgPSBjW20gPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcihcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQgfCAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgNjQzMixcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoayA9IGkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGkgPSAoaSArIDEpIHwgMCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoaSA9IChpICsgNykgJiAtOCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1trID4+IDJdID0gMCksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrKSB8IDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgPSBrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IDE1MDQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICBpZiAoKHEgfCAwKSA9PSAxNTA0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBxID0gMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBpZiAoKHEgfCAwKSA9PSAxNTIzKSB7XG4gICAgICAgICAgICAgICAgICAgIHMgPSBjW20gPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBiID0gZztcbiAgICAgICAgICAgICAgICAgICAgdiA9IGg7XG4gICAgICAgICAgICAgICAgICAgIGFyKFxuICAgICAgICAgICAgICAgICAgICAgICAgcyB8IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICA1OTEyLFxuICAgICAgICAgICAgICAgICAgICAgICAgKChrID0gaSksXG4gICAgICAgICAgICAgICAgICAgICAgICAoaSA9IChpICsgMTYpIHwgMCksXG4gICAgICAgICAgICAgICAgICAgICAgICAoY1trID4+IDJdID0gYiksXG4gICAgICAgICAgICAgICAgICAgICAgICAoY1soayArIDgpID4+IDJdID0gdiksXG4gICAgICAgICAgICAgICAgICAgICAgICBrKSB8IDBcbiAgICAgICAgICAgICAgICAgICAgKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBrO1xuICAgICAgICAgICAgICAgICAgICBsID0gLTI7XG4gICAgICAgICAgICAgICAgICAgIG4gPSBsO1xuICAgICAgICAgICAgICAgICAgICBpID0gZDtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG4gfCAwO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKHEgfCAwKSA9PSAxNTU1KSB7XG4gICAgICAgICAgICAgICAgICAgIGFyKFxuICAgICAgICAgICAgICAgICAgICAgICAgY1ttID4+IDJdIHwgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgIDU1MjAsXG4gICAgICAgICAgICAgICAgICAgICAgICAoKGsgPSBpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChpID0gKGkgKyAxNikgfCAwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChjW2sgPj4gMl0gPSBnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChjWyhrICsgOCkgPj4gMl0gPSBoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGspIHwgMFxuICAgICAgICAgICAgICAgICAgICApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGs7XG4gICAgICAgICAgICAgICAgICAgIGwgPSAtMjtcbiAgICAgICAgICAgICAgICAgICAgbiA9IGw7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBkO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbiB8IDA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICgocSB8IDApID09IDE1NjIpIHtcbiAgICAgICAgICAgICAgICAgICAgYXIoXG4gICAgICAgICAgICAgICAgICAgICAgICBjW20gPj4gMl0gfCAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgNTQ4MCxcbiAgICAgICAgICAgICAgICAgICAgICAgICgoayA9IGkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGkgPSAoaSArIDE2KSB8IDApLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGNbayA+PiAyXSA9IGcpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGNbKGsgKyA4KSA+PiAyXSA9IGgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgaykgfCAwXG4gICAgICAgICAgICAgICAgICAgICkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBpID0gaztcbiAgICAgICAgICAgICAgICAgICAgbCA9IC0yO1xuICAgICAgICAgICAgICAgICAgICBuID0gbDtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGQ7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuIHwgMDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKChxIHwgMCkgPT0gMTU2NSkge1xuICAgICAgICAgICAgICAgICAgICBhcihcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbbSA+PiAyXSB8IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICA1NDMyLFxuICAgICAgICAgICAgICAgICAgICAgICAgKChrID0gaSksXG4gICAgICAgICAgICAgICAgICAgICAgICAoaSA9IChpICsgMTYpIHwgMCksXG4gICAgICAgICAgICAgICAgICAgICAgICAoY1trID4+IDJdID0gZyksXG4gICAgICAgICAgICAgICAgICAgICAgICAoY1soayArIDgpID4+IDJdID0gaCksXG4gICAgICAgICAgICAgICAgICAgICAgICBrKSB8IDBcbiAgICAgICAgICAgICAgICAgICAgKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBrO1xuICAgICAgICAgICAgICAgICAgICBsID0gLTI7XG4gICAgICAgICAgICAgICAgICAgIG4gPSBsO1xuICAgICAgICAgICAgICAgICAgICBpID0gZDtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG4gfCAwO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKHEgfCAwKSA9PSAxNTY3KSB7XG4gICAgICAgICAgICAgICAgICAgIGFyKFxuICAgICAgICAgICAgICAgICAgICAgICAgY1ttID4+IDJdIHwgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgIDUzMjAsXG4gICAgICAgICAgICAgICAgICAgICAgICAoKGsgPSBpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChpID0gKGkgKyAxNikgfCAwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChjW2sgPj4gMl0gPSBnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChjWyhrICsgOCkgPj4gMl0gPSBoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGspIHwgMFxuICAgICAgICAgICAgICAgICAgICApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGs7XG4gICAgICAgICAgICAgICAgICAgIGwgPSAtMjtcbiAgICAgICAgICAgICAgICAgICAgbiA9IGw7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBkO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbiB8IDA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICgocSB8IDApID09IDE1MzkpIHtcbiAgICAgICAgICAgICAgICAgICAgYXIoXG4gICAgICAgICAgICAgICAgICAgICAgICBjW20gPj4gMl0gfCAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgNTcyOCxcbiAgICAgICAgICAgICAgICAgICAgICAgICgoayA9IGkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGkgPSAoaSArIDE2KSB8IDApLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGNbayA+PiAyXSA9IGcpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGNbKGsgKyA4KSA+PiAyXSA9IGgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgaykgfCAwXG4gICAgICAgICAgICAgICAgICAgICkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBpID0gaztcbiAgICAgICAgICAgICAgICAgICAgbCA9IC0yO1xuICAgICAgICAgICAgICAgICAgICBuID0gbDtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGQ7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuIHwgMDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKChxIHwgMCkgPT0gMTUzMSkge1xuICAgICAgICAgICAgICAgICAgICBhcihcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbbSA+PiAyXSB8IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICA1ODQwLFxuICAgICAgICAgICAgICAgICAgICAgICAgKChrID0gaSksXG4gICAgICAgICAgICAgICAgICAgICAgICAoaSA9IChpICsgMTYpIHwgMCksXG4gICAgICAgICAgICAgICAgICAgICAgICAoY1trID4+IDJdID0gZyksXG4gICAgICAgICAgICAgICAgICAgICAgICAoY1soayArIDgpID4+IDJdID0gaCksXG4gICAgICAgICAgICAgICAgICAgICAgICBrKSB8IDBcbiAgICAgICAgICAgICAgICAgICAgKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBrO1xuICAgICAgICAgICAgICAgICAgICBsID0gLTI7XG4gICAgICAgICAgICAgICAgICAgIG4gPSBsO1xuICAgICAgICAgICAgICAgICAgICBpID0gZDtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG4gfCAwO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKHEgfCAwKSA9PSAxNTUyKSB7XG4gICAgICAgICAgICAgICAgICAgIGFyKFxuICAgICAgICAgICAgICAgICAgICAgICAgY1ttID4+IDJdIHwgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgIDU1NzYsXG4gICAgICAgICAgICAgICAgICAgICAgICAoKGsgPSBpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChpID0gKGkgKyAxNikgfCAwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChjW2sgPj4gMl0gPSBnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChjWyhrICsgOCkgPj4gMl0gPSBoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGspIHwgMFxuICAgICAgICAgICAgICAgICAgICApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGs7XG4gICAgICAgICAgICAgICAgICAgIGwgPSAtMjtcbiAgICAgICAgICAgICAgICAgICAgbiA9IGw7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBkO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbiB8IDA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICgocSB8IDApID09IDE1NzkpIHtcbiAgICAgICAgICAgICAgICAgICAgYXIoXG4gICAgICAgICAgICAgICAgICAgICAgICBjW20gPj4gMl0gfCAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgNTIxNixcbiAgICAgICAgICAgICAgICAgICAgICAgICgoayA9IGkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGkgPSAoaSArIDI0KSB8IDApLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGNbayA+PiAyXSA9IGcpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGNbKGsgKyA4KSA+PiAyXSA9IGgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGNbKGsgKyAxNikgPj4gMl0gPSA4MDApLFxuICAgICAgICAgICAgICAgICAgICAgICAgaykgfCAwXG4gICAgICAgICAgICAgICAgICAgICkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBpID0gaztcbiAgICAgICAgICAgICAgICAgICAgbCA9IC0yO1xuICAgICAgICAgICAgICAgICAgICBuID0gbDtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGQ7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuIHwgMDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKChxIHwgMCkgPT0gMTU4Nikge1xuICAgICAgICAgICAgICAgICAgICBhcihcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbbSA+PiAyXSB8IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICA1MTYwLFxuICAgICAgICAgICAgICAgICAgICAgICAgKChrID0gaSksXG4gICAgICAgICAgICAgICAgICAgICAgICAoaSA9IChpICsgMTYpIHwgMCksXG4gICAgICAgICAgICAgICAgICAgICAgICAoY1trID4+IDJdID0gZyksXG4gICAgICAgICAgICAgICAgICAgICAgICAoY1soayArIDgpID4+IDJdID0gaCksXG4gICAgICAgICAgICAgICAgICAgICAgICBrKSB8IDBcbiAgICAgICAgICAgICAgICAgICAgKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBrO1xuICAgICAgICAgICAgICAgICAgICBsID0gLTI7XG4gICAgICAgICAgICAgICAgICAgIG4gPSBsO1xuICAgICAgICAgICAgICAgICAgICBpID0gZDtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG4gfCAwO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKHEgfCAwKSA9PSAxNjExKSB7XG4gICAgICAgICAgICAgICAgICAgIGFyKFxuICAgICAgICAgICAgICAgICAgICAgICAgY1ttID4+IDJdIHwgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgIDQ5NTIsXG4gICAgICAgICAgICAgICAgICAgICAgICAoKGsgPSBpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChpID0gKGkgKyAxNikgfCAwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChjW2sgPj4gMl0gPSBnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChjWyhrICsgOCkgPj4gMl0gPSBoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGspIHwgMFxuICAgICAgICAgICAgICAgICAgICApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGs7XG4gICAgICAgICAgICAgICAgICAgIGwgPSAtMjtcbiAgICAgICAgICAgICAgICAgICAgbiA9IGw7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBkO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbiB8IDA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICgocSB8IDApID09IDE2MjEpIHtcbiAgICAgICAgICAgICAgICAgICAgYXIoXG4gICAgICAgICAgICAgICAgICAgICAgICBjW20gPj4gMl0gfCAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgNDg4OCxcbiAgICAgICAgICAgICAgICAgICAgICAgICgoayA9IGkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGkgPSAoaSArIDE2KSB8IDApLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGNbayA+PiAyXSA9IGcpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGNbKGsgKyA4KSA+PiAyXSA9IGgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgaykgfCAwXG4gICAgICAgICAgICAgICAgICAgICkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBpID0gaztcbiAgICAgICAgICAgICAgICAgICAgbCA9IC0yO1xuICAgICAgICAgICAgICAgICAgICBuID0gbDtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGQ7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuIHwgMDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKChxIHwgMCkgPT0gMTYyNSkge1xuICAgICAgICAgICAgICAgICAgICB2ID0gY1soZiArICh1IDw8IDIpKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGFyKFxuICAgICAgICAgICAgICAgICAgICAgICAgY1ttID4+IDJdIHwgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgIDUyODAsXG4gICAgICAgICAgICAgICAgICAgICAgICAoKGsgPSBpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChpID0gKGkgKyAyNCkgfCAwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChjW2sgPj4gMl0gPSBnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChjWyhrICsgOCkgPj4gMl0gPSBoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChjWyhrICsgMTYpID4+IDJdID0gdiksXG4gICAgICAgICAgICAgICAgICAgICAgICBrKSB8IDBcbiAgICAgICAgICAgICAgICAgICAgKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBrO1xuICAgICAgICAgICAgICAgICAgICBsID0gLTI7XG4gICAgICAgICAgICAgICAgICAgIG4gPSBsO1xuICAgICAgICAgICAgICAgICAgICBpID0gZDtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG4gfCAwO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKHEgfCAwKSA9PSAxNTQ2KSB7XG4gICAgICAgICAgICAgICAgICAgIGFyKFxuICAgICAgICAgICAgICAgICAgICAgICAgY1ttID4+IDJdIHwgMCxcbiAgICAgICAgICAgICAgICAgICAgICAgIDU2MjQsXG4gICAgICAgICAgICAgICAgICAgICAgICAoKGsgPSBpKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChpID0gKGkgKyAxNikgfCAwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChjW2sgPj4gMl0gPSBnKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChjWyhrICsgOCkgPj4gMl0gPSBoKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGspIHwgMFxuICAgICAgICAgICAgICAgICAgICApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGs7XG4gICAgICAgICAgICAgICAgICAgIGwgPSAtMjtcbiAgICAgICAgICAgICAgICAgICAgbiA9IGw7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBkO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbiB8IDA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICgocSB8IDApID09IDE1NDMpIHtcbiAgICAgICAgICAgICAgICAgICAgYXIoXG4gICAgICAgICAgICAgICAgICAgICAgICBjW20gPj4gMl0gfCAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgNTY4MCxcbiAgICAgICAgICAgICAgICAgICAgICAgICgoayA9IGkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGkgPSAoaSArIDE2KSB8IDApLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGNbayA+PiAyXSA9IGcpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGNbKGsgKyA4KSA+PiAyXSA9IGgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgaykgfCAwXG4gICAgICAgICAgICAgICAgICAgICkgfCAwO1xuICAgICAgICAgICAgICAgICAgICBpID0gaztcbiAgICAgICAgICAgICAgICAgICAgbCA9IC0yO1xuICAgICAgICAgICAgICAgICAgICBuID0gbDtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGQ7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuIHwgMDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKChxIHwgMCkgPT0gMTYwNCkge1xuICAgICAgICAgICAgICAgICAgICBhcihcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbbSA+PiAyXSB8IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICA1MDE2LFxuICAgICAgICAgICAgICAgICAgICAgICAgKChrID0gaSksXG4gICAgICAgICAgICAgICAgICAgICAgICAoaSA9IChpICsgMTYpIHwgMCksXG4gICAgICAgICAgICAgICAgICAgICAgICAoY1trID4+IDJdID0gZyksXG4gICAgICAgICAgICAgICAgICAgICAgICAoY1soayArIDgpID4+IDJdID0gaCksXG4gICAgICAgICAgICAgICAgICAgICAgICBrKSB8IDBcbiAgICAgICAgICAgICAgICAgICAgKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBrO1xuICAgICAgICAgICAgICAgICAgICBsID0gLTI7XG4gICAgICAgICAgICAgICAgICAgIG4gPSBsO1xuICAgICAgICAgICAgICAgICAgICBpID0gZDtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG4gfCAwO1xuICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoKHEgfCAwKSA9PSAxNTczKSB7XG4gICAgICAgICAgICAgICAgICAgIHYgPSBjWyhmICsgKHUgPDwgMikpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgYXIoXG4gICAgICAgICAgICAgICAgICAgICAgICBjW20gPj4gMl0gfCAwLFxuICAgICAgICAgICAgICAgICAgICAgICAgNTI4MCxcbiAgICAgICAgICAgICAgICAgICAgICAgICgoayA9IGkpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGkgPSAoaSArIDI0KSB8IDApLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGNbayA+PiAyXSA9IGcpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGNbKGsgKyA4KSA+PiAyXSA9IGgpLFxuICAgICAgICAgICAgICAgICAgICAgICAgKGNbKGsgKyAxNikgPj4gMl0gPSB2KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGspIHwgMFxuICAgICAgICAgICAgICAgICAgICApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGs7XG4gICAgICAgICAgICAgICAgICAgIGwgPSAtMjtcbiAgICAgICAgICAgICAgICAgICAgbiA9IGw7XG4gICAgICAgICAgICAgICAgICAgIGkgPSBkO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gbiB8IDA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICgocSB8IDApID09IDE2NDYpIHtcbiAgICAgICAgICAgICAgICAgICAgYW8obyB8IDApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgbCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIG4gPSBsO1xuICAgICAgICAgICAgICAgICAgICBpID0gZDtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG4gfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGNWKGQsIGUsIGYsIGcpIHtcbiAgICAgICAgICAgICAgICBkID0gZCB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGUgfCAwO1xuICAgICAgICAgICAgICAgIGYgPSBmIHwgMDtcbiAgICAgICAgICAgICAgICBnID0gZyB8IDA7XG4gICAgICAgICAgICAgICAgY1sxNjcyXSA9IGQ7XG4gICAgICAgICAgICAgICAgYlszMzQ2XSA9IGU7XG4gICAgICAgICAgICAgICAgYVs2Njk0XSA9IGY7XG4gICAgICAgICAgICAgICAgYlszMzQ4XSA9IGc7XG4gICAgICAgICAgICAgICAgcmV0dXJuIDY2ODg7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjVyhmLCBnLCBoKSB7XG4gICAgICAgICAgICAgICAgZiA9IGYgfCAwO1xuICAgICAgICAgICAgICAgIGcgPSBnIHwgMDtcbiAgICAgICAgICAgICAgICBoID0gaCB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGogPSAwLFxuICAgICAgICAgICAgICAgICAgICBrID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG4gPSAwO1xuICAgICAgICAgICAgICAgIGogPSBpO1xuICAgICAgICAgICAgICAgIGsgPSBmO1xuICAgICAgICAgICAgICAgIGYgPSBoO1xuICAgICAgICAgICAgICAgIGlmICgoayB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgbCA9IDA7XG4gICAgICAgICAgICAgICAgICAgIG4gPSBsO1xuICAgICAgICAgICAgICAgICAgICBpID0gajtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG4gfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBoID0gYmkoMTQxNjQpIHwgMDtcbiAgICAgICAgICAgICAgICBjNShoIHwgMCwgMCwgMTQxNjQpO1xuICAgICAgICAgICAgICAgIGNbKGggKyAyNCkgPj4gMl0gPSBnO1xuICAgICAgICAgICAgICAgIGcgPSAwO1xuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZyB8IDApID49IDEyOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKChjWyg2NzA0ICsgKGcgPDwgMikpID4+IDJdIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY1soaCArIDI4ICsgKGcgPDwgMikpID4+IDJdID0gYmkoNTE2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBjNShjWyhoICsgMjggKyAoZyA8PCAyKSkgPj4gMl0gfCAwLCAwLCA1MTYpO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1tjWyhoICsgMjggKyAoZyA8PCAyKSkgPj4gMl0gPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbY1soNjcwNCArIChnIDw8IDIpKSA+PiAyXSA+PiAyXTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoKGNbKDcyMTYgKyAoZyA8PCAyKSkgPj4gMl0gfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjWyhoICsgNTQwICsgKGcgPDwgMikpID4+IDJdID0gYmkoNTE2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBjNShjWyhoICsgNTQwICsgKGcgPDwgMikpID4+IDJdIHwgMCwgMCwgNTE2KTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbY1soaCArIDU0MCArIChnIDw8IDIpKSA+PiAyXSA+PiAyXSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tjWyg3MjE2ICsgKGcgPDwgMikpID4+IDJdID4+IDJdO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGcgPSAoZyArIDEpIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY1soaCArIDIwKSA+PiAyXSA9IDcwO1xuICAgICAgICAgICAgICAgIGNbKGggKyAxMzA1MikgPj4gMl0gPSAzMjtcbiAgICAgICAgICAgICAgICBjWyhoICsgMTMwNTYpID4+IDJdID0gMzMyODA7XG4gICAgICAgICAgICAgICAgY1soaCArIDQpID4+IDJdID0gY1tmID4+IDJdO1xuICAgICAgICAgICAgICAgIGNbKGggKyA4KSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgaWYgKCgoYlsoZiArIDQpID4+IDFdICYgMjU1KSB8IDApID09IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgIGcgPSAoaCArIDgpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1tnID4+IDJdID0gY1tnID4+IDJdIHwgNDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgaWYgKCgoYlsoZiArIDQpID4+IDFdICYgMzI3NjgpIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBnID0gKGggKyA4KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGNbZyA+PiAyXSA9IGNbZyA+PiAyXSB8IDI7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGlmICgoZFsoZiArIDYpIHwgMF0gfCAwKSA9PSAxKSB7XG4gICAgICAgICAgICAgICAgICAgIGcgPSAoaCArIDgpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1tnID4+IDJdID0gY1tnID4+IDJdIHwgMTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZyA9IGVbKGYgKyA0KSA+PiAxXSB8IDA7XG4gICAgICAgICAgICAgICAgaWYgKChnIHwgMCkgPT0gMzY4ODApIHtcbiAgICAgICAgICAgICAgICAgICAgY1soaCArIDEwNjApID4+IDJdID0gNDtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKChnIHwgMCkgPT0gMTYpIHtcbiAgICAgICAgICAgICAgICAgICAgY1soaCArIDEwNjApID4+IDJdID0gNjtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKChnIHwgMCkgPT0gMzI3NzYpIHtcbiAgICAgICAgICAgICAgICAgICAgY1soaCArIDEwNjApID4+IDJdID0gMTA7XG4gICAgICAgICAgICAgICAgfSBlbHNlIGlmICgoZyB8IDApID09IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgY1soaCArIDEwNjApID4+IDJdID0gODtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKChnIHwgMCkgPT0gMzI3ODQpIHtcbiAgICAgICAgICAgICAgICAgICAgY1soaCArIDEwNjApID4+IDJdID0gMjtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICBhcihcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbbSA+PiAyXSB8IDAsXG4gICAgICAgICAgICAgICAgICAgICAgICA2MTQ0LFxuICAgICAgICAgICAgICAgICAgICAgICAgKChnID0gaSksXG4gICAgICAgICAgICAgICAgICAgICAgICAoaSA9IChpICsgMSkgfCAwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChpID0gKGkgKyA3KSAmIC04KSxcbiAgICAgICAgICAgICAgICAgICAgICAgIChjW2cgPj4gMl0gPSAwKSxcbiAgICAgICAgICAgICAgICAgICAgICAgIGcpIHwgMFxuICAgICAgICAgICAgICAgICAgICApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGc7XG4gICAgICAgICAgICAgICAgICAgIGNbKGggKyAxMDYwKSA+PiAyXSA9IDY7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNbKGggKyAxMDY0KSA+PiAyXSA9IGVbKGYgKyA4KSA+PiAxXSB8IDA7XG4gICAgICAgICAgICAgICAgY1soaCArIDEwNjgpID4+IDJdID0gYmkoZVsoZiArIDgpID4+IDFdIDw8IDEpIHwgMDtcbiAgICAgICAgICAgICAgICBjWyhoICsgMTA3MikgPj4gMl0gPSBiaSgoZVsoZiArIDgpID4+IDFdIDw8IDEpIDw8IDIpIHwgMDtcbiAgICAgICAgICAgICAgICBjWyhoICsgMTIpID4+IDJdID1cbiAgICAgICAgICAgICAgICAgICAgXyhcbiAgICAgICAgICAgICAgICAgICAgICAgICgoY1soaCArIDgpID4+IDJdICYgMSkgfCAwKSAhPSAwID8gMSA6IDIsXG4gICAgICAgICAgICAgICAgICAgICAgICAoKGNbKGggKyA4KSA+PiAyXSAmIDQpIHwgMCkgIT0gMCA/IDIgOiAxXG4gICAgICAgICAgICAgICAgICAgICkgfCAwO1xuICAgICAgICAgICAgICAgIGNbKGggKyAxMzA2MCkgPj4gMl0gPSAoKGNbZiA+PiAyXSB8IDApIC8gMWUzKSB8IDA7XG4gICAgICAgICAgICAgICAgaWYgKChjWyhoICsgMTMwNjApID4+IDJdIHwgMCkgPCAxKSB7XG4gICAgICAgICAgICAgICAgICAgIGNbKGggKyAxMzA2MCkgPj4gMl0gPSAxO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoY1soaCArIDEzMDYwKSA+PiAyXSB8IDApID4gMjU1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjWyhoICsgMTMwNjApID4+IDJdID0gMjU1O1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNbKGggKyAxMzA2NCkgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgIGNbKGggKyAxMzA2OCkgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgIGNbKGggKyAxMzA3NikgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICBjcShrLCBoLCAoaCArIDEzMTAwKSB8IDAsIChoICsgMTMwNzIpIHwgMCkgfCAwO1xuICAgICAgICAgICAgICAgIGlmICgoY1soaCArIDEzMDc2KSA+PiAyXSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgYzAoaCk7XG4gICAgICAgICAgICAgICAgICAgIGwgPSAwO1xuICAgICAgICAgICAgICAgICAgICBuID0gbDtcbiAgICAgICAgICAgICAgICAgICAgaSA9IGo7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgY1soaCArIDEwNTIpID4+IDJdID0gMDtcbiAgICAgICAgICAgICAgICBjWyhoICsgMTA1NikgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgIGlmICgoYVs3NzI4XSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgayA9IGg7XG4gICAgICAgICAgICAgICAgICAgIGJ6KGssIDc3MjgpIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYnYoaCkgfCAwO1xuICAgICAgICAgICAgICAgIGwgPSBoO1xuICAgICAgICAgICAgICAgIG4gPSBsO1xuICAgICAgICAgICAgICAgIGkgPSBqO1xuICAgICAgICAgICAgICAgIHJldHVybiBuIHwgMDtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIG1pZF9zb25nX2xvYWRcbiAgICAgICAgICAgIGZ1bmN0aW9uIGNYKGEsIGIpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIHJldHVybiBjVyhhLCAwLCBiKSB8IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBtaWRfc29uZ19mcmVlXG4gICAgICAgICAgICBmdW5jdGlvbiBjWShhKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBiID0gMDtcbiAgICAgICAgICAgICAgICBiID0gYTtcbiAgICAgICAgICAgICAgICBieChiKTtcbiAgICAgICAgICAgICAgICBhID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGEgfCAwKSA+PSAxMjgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICgoY1soYiArIDI4ICsgKGEgPDwgMikpID4+IDJdIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYzAoY1soYiArIDI4ICsgKGEgPDwgMikpID4+IDJdIHwgMCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKChjWyhiICsgNTQwICsgKGEgPDwgMikpID4+IDJdIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYzAoY1soYiArIDU0MCArIChhIDw8IDIpKSA+PiAyXSB8IDApO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGEgPSAoYSArIDEpIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYzAoY1soYiArIDEwNzIpID4+IDJdIHwgMCk7XG4gICAgICAgICAgICAgICAgYzAoY1soYiArIDEwNjgpID4+IDJdIHwgMCk7XG4gICAgICAgICAgICAgICAgYzAoY1soYiArIDEzMDc2KSA+PiAyXSB8IDApO1xuICAgICAgICAgICAgICAgIGEgPSAwO1xuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChhID4+PiAwID49IDgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICgoY1soYiArIDEzMTA0ICsgKGEgPDwgMikpID4+IDJdIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYzAoY1soYiArIDEzMTA0ICsgKGEgPDwgMikpID4+IDJdIHwgMCk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgYSA9IChhICsgMSkgfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjMChiKTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICAvLyBtaWRfZXhpdFxuICAgICAgICAgICAgZnVuY3Rpb24gY1ooKSB7XG4gICAgICAgICAgICAgICAgbGV0IGEgPSAwLFxuICAgICAgICAgICAgICAgICAgICBiID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGUgPSAwO1xuICAgICAgICAgICAgICAgIGEgPSAwO1xuICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoYSB8IDApID49IDEyOCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKChjWyg2NzA0ICsgKGEgPDwgMikpID4+IDJdIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgYiA9IGNbY1soNjcwNCArIChhIDw8IDIpKSA+PiAyXSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGIgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChkIHwgMCkgPj0gMTI4KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGNbKGIgKyAoKGQgKiAyOCkgfCAwKSkgPj4gMl0gfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjMChjWyhiICsgKChkICogMjgpIHwgMCkpID4+IDJdIHwgMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IChkICsgMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjMChiKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGMwKGNbKDY3MDQgKyAoYSA8PCAyKSkgPj4gMl0gfCAwKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoKGNbKDcyMTYgKyAoYSA8PCAyKSkgPj4gMl0gfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlID0gY1tjWyg3MjE2ICsgKGEgPDwgMikpID4+IDJdID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGQgfCAwKSA+PSAxMjgpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY1soZSArICgoZCAqIDI4KSB8IDApKSA+PiAyXSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGMwKGNbKGUgKyAoKGQgKiAyOCkgfCAwKSkgPj4gMl0gfCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gKGQgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGMwKGUpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgYzAoY1soNzIxNiArIChhIDw8IDIpKSA+PiAyXSB8IDApO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGEgPSAoYSArIDEpIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYmsoKTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjXyhiLCBjLCBkKSB7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGMgPSBjIHwgMDtcbiAgICAgICAgICAgICAgICBkID0gZCB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGggPSAwLFxuICAgICAgICAgICAgICAgICAgICBpID0gMDtcbiAgICAgICAgICAgICAgICBlID0gYjtcbiAgICAgICAgICAgICAgICBiID0gYztcbiAgICAgICAgICAgICAgICBjID0gZDtcbiAgICAgICAgICAgICAgICBkID0gMDtcbiAgICAgICAgICAgICAgICBmID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGQgfCAwKSA8IChiIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGcgPSAoKGYgfCAwKSAhPSAwKSBeIDE7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBnID0gMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICBpZiAoIWcpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICgoYW4oKGUgKyBkKSB8IDAsIDEsIDEsIGMgfCAwKSB8IDApICE9IDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGggPSAxNzUyO1xuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgaWYgKChhWyhlICsgZCkgfCAwXSB8IDApID09IDEwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBoID0gMTc1NTtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYVsoZSArIGQpIHwgMF0gfCAwKSA9PSAxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGggPSAxNzU1O1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGlmICgoaCB8IDApID09IDE3NTUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGggPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgYVsoZSArIGQpIHwgMF0gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgZiA9IDE7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgZCA9IChkICsgMSkgfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBhWyhlICsgZCkgfCAwXSA9IDA7XG4gICAgICAgICAgICAgICAgaWYgKChkIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBpID0gZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGkgfCAwO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIGkgPSAwO1xuICAgICAgICAgICAgICAgICAgICByZXR1cm4gaSB8IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gbWFsbG9jXG4gICAgICAgICAgICBmdW5jdGlvbiBjJChhKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBiID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGggPSAwLFxuICAgICAgICAgICAgICAgICAgICBpID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGsgPSAwLFxuICAgICAgICAgICAgICAgICAgICBsID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG4gPSAwLFxuICAgICAgICAgICAgICAgICAgICBvID0gMCxcbiAgICAgICAgICAgICAgICAgICAgcCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHEgPSAwLFxuICAgICAgICAgICAgICAgICAgICByID0gMCxcbiAgICAgICAgICAgICAgICAgICAgcyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHQgPSAwLFxuICAgICAgICAgICAgICAgICAgICB1ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgdiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHcgPSAwLFxuICAgICAgICAgICAgICAgICAgICB4ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgeSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHogPSAwLFxuICAgICAgICAgICAgICAgICAgICBBID0gMCxcbiAgICAgICAgICAgICAgICAgICAgQiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIEMgPSAwLFxuICAgICAgICAgICAgICAgICAgICBEID0gMCxcbiAgICAgICAgICAgICAgICAgICAgRSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIEYgPSAwLFxuICAgICAgICAgICAgICAgICAgICBHID0gMCxcbiAgICAgICAgICAgICAgICAgICAgSCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIEkgPSAwLFxuICAgICAgICAgICAgICAgICAgICBKID0gMCxcbiAgICAgICAgICAgICAgICAgICAgSyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIEwgPSAwLFxuICAgICAgICAgICAgICAgICAgICBNID0gMCxcbiAgICAgICAgICAgICAgICAgICAgTiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIE8gPSAwLFxuICAgICAgICAgICAgICAgICAgICBQID0gMCxcbiAgICAgICAgICAgICAgICAgICAgUSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIFIgPSAwLFxuICAgICAgICAgICAgICAgICAgICBTID0gMCxcbiAgICAgICAgICAgICAgICAgICAgVCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIFUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBWID0gMCxcbiAgICAgICAgICAgICAgICAgICAgVyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIFggPSAwLFxuICAgICAgICAgICAgICAgICAgICBZID0gMCxcbiAgICAgICAgICAgICAgICAgICAgWiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIF8gPSAwLFxuICAgICAgICAgICAgICAgICAgICAkID0gMCxcbiAgICAgICAgICAgICAgICAgICAgYWEgPSAwLFxuICAgICAgICAgICAgICAgICAgICBhYiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGFjID0gMCxcbiAgICAgICAgICAgICAgICAgICAgYWQgPSAwLFxuICAgICAgICAgICAgICAgICAgICBhZSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGFmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgYWcgPSAwLFxuICAgICAgICAgICAgICAgICAgICBhaCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGFpID0gMCxcbiAgICAgICAgICAgICAgICAgICAgYWogPSAwLFxuICAgICAgICAgICAgICAgICAgICBhayA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGFsID0gMCxcbiAgICAgICAgICAgICAgICAgICAgYW4gPSAwLFxuICAgICAgICAgICAgICAgICAgICBhbyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGFwID0gMCxcbiAgICAgICAgICAgICAgICAgICAgYXIgPSAwLFxuICAgICAgICAgICAgICAgICAgICBhcyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGF0ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgYXUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBhdiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGF3ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgYXggPSAwLFxuICAgICAgICAgICAgICAgICAgICBheSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGF6ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgYUEgPSAwLFxuICAgICAgICAgICAgICAgICAgICBhQiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGFDID0gMCxcbiAgICAgICAgICAgICAgICAgICAgYUQgPSAwLFxuICAgICAgICAgICAgICAgICAgICBhRSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGFGID0gMCxcbiAgICAgICAgICAgICAgICAgICAgYUcgPSAwLFxuICAgICAgICAgICAgICAgICAgICBhSCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGFJID0gMDtcbiAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgIGlmIChhID4+PiAwIDwgMjQ1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYSA+Pj4gMCA8IDExKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYiA9IDE2O1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiID0gKGEgKyAxMSkgJiAtODtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGQgPSBiID4+PiAzO1xuICAgICAgICAgICAgICAgICAgICAgICAgZSA9IGNbMTk5Nl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgZiA9IGUgPj4+IChkID4+PiAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoKGYgJiAzKSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID0gKCgoZiAmIDEpIF4gMSkgKyBkKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaCA9IGcgPDwgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0gKDgwMjQgKyAoaCA8PCAyKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGogPSAoODAyNCArICgoaCArIDIpIDw8IDIpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaCA9IGNbaiA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgayA9IChoICsgOCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGwgPSBjW2sgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChpIHwgMCkgPT0gKGwgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1sxOTk2XSA9IGUgJiB+KDEgPDwgZyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobCA+Pj4gMCA8IChjWzJlM10gfCAwKSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtID0gKGwgKyAxMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChjW20gPj4gMl0gfCAwKSA9PSAoaCB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1ttID4+IDJdID0gaTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW2ogPj4gMl0gPSBsO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbCA9IGcgPDwgMztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhoICsgNCkgPj4gMl0gPSBsIHwgMztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqID0gKGggKyAobCB8IDQpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tqID4+IDJdID0gY1tqID4+IDJdIHwgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuID0gaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbiB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYiA+Pj4gMCA8PSAoY1sxOTk4XSB8IDApID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbyA9IGI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGYgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaiA9IDIgPDwgZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsID0gKGYgPDwgZCkgJiAoaiB8IC1qKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqID0gKChsICYgLWwpIC0gMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGwgPSAoaiA+Pj4gMTIpICYgMTY7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGogPj4+IChsID4+PiAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBqID0gKGkgPj4+IDUpICYgODtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtID0gaSA+Pj4gKGogPj4+IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgPSAobSA+Pj4gMikgJiA0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAgPSBtID4+PiAoaSA+Pj4gMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9IChwID4+PiAxKSAmIDI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IHAgPj4+IChtID4+PiAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwID0gKHEgPj4+IDEpICYgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByID0gKChqIHwgbCB8IGkgfCBtIHwgcCkgKyAocSA+Pj4gKHAgPj4+IDApKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAgPSByIDw8IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9ICg4MDI0ICsgKHAgPDwgMikpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtID0gKDgwMjQgKyAoKHAgKyAyKSA8PCAyKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAgPSBjW20gPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgPSAocCArIDgpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsID0gY1tpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgocSB8IDApID09IChsIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMTk5Nl0gPSBlICYgfigxIDw8IHIpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGwgPj4+IDAgPCAoY1syZTNdIHwgMCkgPj4+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaiA9IChsICsgMTIpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY1tqID4+IDJdIHwgMCkgPT0gKHAgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbaiA+PiAyXSA9IHE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1ttID4+IDJdID0gbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGwgPSByIDw8IDM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9IChsIC0gYikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKHAgKyA0KSA+PiAyXSA9IGIgfCAzO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSBwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUgPSAocSArIGIpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhxICsgKGIgfCA0KSkgPj4gMl0gPSBtIHwgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhxICsgbCkgPj4gMl0gPSBtO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGwgPSBjWzE5OThdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGwgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSBjWzIwMDFdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IGwgPj4+IDM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGwgPSBkIDw8IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYgPSAoODAyNCArIChsIDw8IDIpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBjWzE5OTZdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaCA9IDEgPDwgZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCgoayAmIGgpIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMTk5Nl0gPSBrIHwgaDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzID0gZjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0ID0gKDgwMjQgKyAoKGwgKyAyKSA8PCAyKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gKDgwMjQgKyAoKGwgKyAyKSA8PCAyKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGcgPSBjW2QgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChnID4+PiAwID49IChjWzJlM10gfCAwKSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzID0gZztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdCA9IGQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1t0ID4+IDJdID0gcTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1socyArIDEyKSA+PiAyXSA9IHE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKHEgKyA4KSA+PiAyXSA9IHM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKHEgKyAxMikgPj4gMl0gPSBmO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWzE5OThdID0gbTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWzIwMDFdID0gZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuID0gaTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbiB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBsID0gY1sxOTk3XSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGwgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbyA9IGI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBoID0gKChsICYgLWwpIC0gMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgbCA9IChoID4+PiAxMikgJiAxNjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBoID4+PiAobCA+Pj4gMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBoID0gKGsgPj4+IDUpICYgODtcbiAgICAgICAgICAgICAgICAgICAgICAgIHAgPSBrID4+PiAoaCA+Pj4gMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBrID0gKHAgPj4+IDIpICYgNDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHIgPSBwID4+PiAoayA+Pj4gMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBwID0gKHIgPj4+IDEpICYgMjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGQgPSByID4+PiAocCA+Pj4gMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICByID0gKGQgPj4+IDEpICYgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGcgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg4Mjg4ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKGggfCBsIHwgayB8IHAgfCByKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGQgPj4+IChyID4+PiAwKSkpIDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMikpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICByID0gZztcbiAgICAgICAgICAgICAgICAgICAgICAgIGQgPSBnO1xuICAgICAgICAgICAgICAgICAgICAgICAgcCA9ICgoY1soZyArIDQpID4+IDJdICYgLTgpIC0gYikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID0gY1sociArIDE2KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChnIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrID0gY1sociArIDIwKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoayB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdSA9IGs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ID0gZztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZyA9ICgoY1sodSArIDQpID4+IDJdICYgLTgpIC0gYikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBnID4+PiAwIDwgcCA+Pj4gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByID0gdTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gayA/IHUgOiBkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAgPSBrID8gZyA6IHA7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICByID0gZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGkgPSBjWzJlM10gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHIgPj4+IDAgPCBpID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGUgPSAociArIGIpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG0gPSBlO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHIgPj4+IDAgPj0gZSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlID0gY1soZCArIDI0KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBmID0gY1soZCArIDEyKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChmIHwgMCkgPT0gKGQgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gKGQgKyAyMCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID0gY1txID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChnIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgayA9IChkICsgMTYpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGwgPSBjW2sgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChsIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHYgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3ID0gbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4ID0gaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHcgPSBnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeCA9IHE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAodyArIDIwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID0gY1txID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZyB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3ID0gZztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4ID0gcTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAodyArIDE2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID0gY1txID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZyB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdyA9IGc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeCA9IHE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHggPj4+IDAgPCBpID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW3ggPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdiA9IHc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSBjWyhkICsgOCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocSA+Pj4gMCA8IGkgPj4+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID0gKHEgKyAxMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGNbZyA+PiAyXSB8IDApICE9IChkIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrID0gKGYgKyA4KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY1trID4+IDJdIHwgMCkgPT0gKGQgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tnID4+IDJdID0gZjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbayA+PiAyXSA9IHE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2ID0gZjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBMMjMwNDogZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZiA9IChkICsgMjgpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9ICg4Mjg4ICsgKGNbZiA+PiAyXSA8PCAyKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGQgfCAwKSA9PSAoY1tpID4+IDJdIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW2kgPj4gMl0gPSB2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgodiB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMTk5N10gPSBjWzE5OTddICYgfigxIDw8IGNbZiA+PiAyXSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDIzMDQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlID4+PiAwIDwgKGNbMmUzXSB8IDApID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gKGUgKyAxNikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY1txID4+IDJdIHwgMCkgPT0gKGQgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW3EgPj4gMl0gPSB2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGUgKyAyMCkgPj4gMl0gPSB2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKHYgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwyMzA0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh2ID4+PiAwIDwgKGNbMmUzXSB8IDApID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1sodiArIDI0KSA+PiAyXSA9IGU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYgPSBjWyhkICsgMTYpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChmIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmID4+PiAwIDwgKGNbMmUzXSB8IDApID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKHYgKyAxNikgPj4gMl0gPSBmO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhmICsgMjQpID4+IDJdID0gdjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZiA9IGNbKGQgKyAyMCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGYgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZiA+Pj4gMCA8IChjWzJlM10gfCAwKSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1sodiArIDIwKSA+PiAyXSA9IGY7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhmICsgMjQpID4+IDJdID0gdjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAocCA+Pj4gMCA8IDE2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZSA9IChwICsgYikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGQgKyA0KSA+PiAyXSA9IGUgfCAzO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYgPSAociArIChlICsgNCkpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW2YgPj4gMl0gPSBjW2YgPj4gMl0gfCAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhkICsgNCkgPj4gMl0gPSBiIHwgMztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhyICsgKGIgfCA0KSkgPj4gMl0gPSBwIHwgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhyICsgKHAgKyBiKSkgPj4gMl0gPSBwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYgPSBjWzE5OThdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGYgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUgPSBjWzIwMDFdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGYgPj4+IDM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYgPSBpIDw8IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSAoODAyNCArIChmIDw8IDIpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBjWzE5OTZdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZyA9IDEgPDwgaTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCgoayAmIGcpIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMTk5Nl0gPSBrIHwgZztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5ID0gcTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB6ID0gKDgwMjQgKyAoKGYgKyAyKSA8PCAyKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0gKDgwMjQgKyAoKGYgKyAyKSA8PCAyKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGwgPSBjW2kgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChsID4+PiAwID49IChjWzJlM10gfCAwKSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5ID0gbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeiA9IGk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1t6ID4+IDJdID0gZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soeSArIDEyKSA+PiAyXSA9IGU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGUgKyA4KSA+PiAyXSA9IHk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGUgKyAxMikgPj4gMl0gPSBxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWzE5OThdID0gcDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWzIwMDFdID0gbTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGYgPSAoZCArIDgpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvID0gYjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbiA9IGY7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbiB8IDA7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYSA+Pj4gMCA+IDQyOTQ5NjcyMzEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvID0gLTE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBmID0gKGEgKyAxMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgZyA9IGYgJiAtODtcbiAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBjWzE5OTddIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoayB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvID0gZztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHIgPSAtZyB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBpID0gZiA+Pj4gODtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGkgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEEgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChnID4+PiAwID4gMTY3NzcyMTUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEEgPSAzMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGYgPSAoKChpICsgMTA0ODMyMCkgfCAwKSA+Pj4gMTYpICYgODtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbCA9IGkgPDwgZjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaCA9ICgoKGwgKyA1MjAxOTIpIHwgMCkgPj4+IDE2KSAmIDQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGogPSBsIDw8IGg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGwgPSAoKChqICsgMjQ1NzYwKSB8IDApID4+PiAxNikgJiAyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCID0gKDE0IC0gKGggfCBmIHwgbCkgKyAoKGogPDwgbCkgPj4+IDE1KSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoZyA+Pj4gKCgoQiArIDcpIHwgMCkgPj4+IDApKSAmIDEpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChCIDw8IDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGNbKDgyODggKyAoQSA8PCAyKSkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgTDIzNTI6IGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGkgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEMgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEID0gcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChBIHwgMCkgPT0gMzEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEYgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRiA9ICgyNSAtIChBID4+PiAxKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtID0gcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcCA9IGk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSBnIDw8IEY7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQiA9IGNbKHAgKyA0KSA+PiAyXSAmIC04O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbCA9IChCIC0gZykgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGwgPj4+IDAgPCBtID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChCIHwgMCkgPT0gKGcgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDID0gcDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRCA9IGw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEUgPSBwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMMjM1MjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHID0gcDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSCA9IGw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHID0gZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBIID0gbTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGwgPSBjWyhwICsgMjApID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEIgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKHAgKyAxNiArICgocSA+Pj4gMzEpIDw8IDIpKSA+PiAyXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGogPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgobCB8IDApID09IDApIHwgKChsIHwgMCkgPT0gKEIgfCAwKSlcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPyBlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDogbDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoQiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDID0gRztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBEID0gSDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFID0gajtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IEc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9IEg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcCA9IEI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IHEgPDwgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlID0gajtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCgoRSB8IDApID09IDApICYgKChDIHwgMCkgPT0gMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0gMiA8PCBBO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIgPSBrICYgKGkgfCAtaSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChyIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvID0gZztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgPSAoKHIgJiAtcikgLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgciA9IChpID4+PiAxMikgJiAxNjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlID0gaSA+Pj4gKHIgPj4+IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgPSAoZSA+Pj4gNSkgJiA4O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSBlID4+PiAoaSA+Pj4gMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZSA9IChxID4+PiAyKSAmIDQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcCA9IHEgPj4+IChlID4+PiAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gKHAgPj4+IDEpICYgMjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBtID0gcCA+Pj4gKHEgPj4+IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAgPSAobSA+Pj4gMSkgJiAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEkgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDgyODggK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKGkgfCByIHwgZSB8IHEgfCBwKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChtID4+PiAocCA+Pj4gMCkpKSA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyKSkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBJID0gRTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoSSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBKID0gRDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBLID0gQztcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcCA9IEk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9IEQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IEM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZSA9ICgoY1socCArIDQpID4+IDJdICYgLTgpIC0gZykgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByID0gZSA+Pj4gMCA8IG0gPj4+IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgPSByID8gZSA6IG07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUgPSByID8gcCA6IHE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIgPSBjWyhwICsgMTYpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChyIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcCA9IHI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtID0gaTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSBlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29udGludWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgciA9IGNbKHAgKyAyMCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKHIgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBKID0gaTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEsgPSBlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwID0gcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0gPSBpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IGU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKEsgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbyA9IGc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoSiA+Pj4gMCA+PSAoKChjWzE5OThdIHwgMCkgLSBnKSB8IDApID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbyA9IGc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBxID0gSztcbiAgICAgICAgICAgICAgICAgICAgICAgIG0gPSBjWzJlM10gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHEgPj4+IDAgPCBtID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHAgPSAocSArIGcpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGsgPSBwO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHEgPj4+IDAgPj0gcCA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBlID0gY1soSyArIDI0KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBpID0gY1soSyArIDEyKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChpIHwgMCkgPT0gKEsgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByID0gKEsgKyAyMCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gY1tyID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChkIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaiA9IChLICsgMTYpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEIgPSBjW2ogPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChCIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEwgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNID0gQjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOID0gajtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE0gPSBkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTiA9IHI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIgPSAoTSArIDIwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gY1tyID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZCB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNID0gZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOID0gcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIgPSAoTSArIDE2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gY1tyID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZCB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTSA9IGQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTiA9IHI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE4gPj4+IDAgPCBtID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW04gPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTCA9IE07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIgPSBjWyhLICsgOCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAociA+Pj4gMCA8IG0gPj4+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gKHIgKyAxMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGNbZCA+PiAyXSB8IDApICE9IChLIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqID0gKGkgKyA4KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY1tqID4+IDJdIHwgMCkgPT0gKEsgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tkID4+IDJdID0gaTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbaiA+PiAyXSA9IHI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBMID0gaTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBMMjQwMjogZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IChLICsgMjgpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9ICg4Mjg4ICsgKGNbaSA+PiAyXSA8PCAyKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKEsgfCAwKSA9PSAoY1ttID4+IDJdIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW20gPj4gMl0gPSBMO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoTCB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMTk5N10gPSBjWzE5OTddICYgfigxIDw8IGNbaSA+PiAyXSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDI0MDI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlID4+PiAwIDwgKGNbMmUzXSB8IDApID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByID0gKGUgKyAxNikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY1tyID4+IDJdIHwgMCkgPT0gKEsgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW3IgPj4gMl0gPSBMO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGUgKyAyMCkgPj4gMl0gPSBMO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKEwgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwyNDAyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChMID4+PiAwIDwgKGNbMmUzXSB8IDApID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soTCArIDI0KSA+PiAyXSA9IGU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgPSBjWyhLICsgMTYpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChpIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpID4+PiAwIDwgKGNbMmUzXSB8IDApID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKEwgKyAxNikgPj4gMl0gPSBpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhpICsgMjQpID4+IDJdID0gTDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGNbKEsgKyAyMCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGkgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaSA+Pj4gMCA8IChjWzJlM10gfCAwKSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soTCArIDIwKSA+PiAyXSA9IGk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhpICsgMjQpID4+IDJdID0gTDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKEogPj4+IDAgPCAxNikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlID0gKEogKyBnKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKEsgKyA0KSA+PiAyXSA9IGUgfCAzO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0gKHEgKyAoZSArIDQpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbaSA+PiAyXSA9IGNbaSA+PiAyXSB8IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soSyArIDQpID4+IDJdID0gZyB8IDM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKHEgKyAoZyB8IDQpKSA+PiAyXSA9IEogfCAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhxICsgKEogKyBnKSkgPj4gMl0gPSBKO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0gSiA+Pj4gMztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKEogPj4+IDAgPCAyNTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUgPSBpIDw8IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtID0gKDgwMjQgKyAoZSA8PCAyKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgciA9IGNbMTk5Nl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaiA9IDEgPDwgaTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKChyICYgaikgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMTk5Nl0gPSByIHwgajtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTyA9IG07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFAgPSAoODAyNCArICgoZSArIDIpIDw8IDIpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9ICg4MDI0ICsgKChlICsgMikgPDwgMikpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IGNbaSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChkID4+PiAwID49IChjWzJlM10gfCAwKSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTyA9IGQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQID0gaTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tQID4+IDJdID0gaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKE8gKyAxMikgPj4gMl0gPSBrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1socSArIChnICsgOCkpID4+IDJdID0gTztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKHEgKyAoZyArIDEyKSkgPj4gMl0gPSBtO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZSA9IHA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGogPSBKID4+PiA4O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGogfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChKID4+PiAwID4gMTY3NzcyMTUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUSA9IDMxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgciA9ICgoKGogKyAxMDQ4MzIwKSB8IDApID4+PiAxNikgJiA4O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGkgPSBqIDw8IHI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9ICgoKGkgKyA1MjAxOTIpIHwgMCkgPj4+IDE2KSAmIDQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQiA9IGkgPDwgZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpID0gKCgoQiArIDI0NTc2MCkgfCAwKSA+Pj4gMTYpICYgMjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDE0IC1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChkIHwgciB8IGkpICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoQiA8PCBpKSA+Pj4gMTUpKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoSiA+Pj4gKCgobCArIDcpIHwgMCkgPj4+IDApKSAmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChsIDw8IDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaiA9ICg4Mjg4ICsgKFEgPDwgMikpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1socSArIChnICsgMjgpKSA+PiAyXSA9IFE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKHEgKyAoZyArIDIwKSkgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhxICsgKGcgKyAxNikpID4+IDJdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9IGNbMTk5N10gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBsID0gMSA8PCBRO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKChtICYgbCkgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWzE5OTddID0gbSB8IGw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW2ogPj4gMl0gPSBlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1socSArIChnICsgMjQpKSA+PiAyXSA9IGo7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhxICsgKGcgKyAxMikpID4+IDJdID0gZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKHEgKyAoZyArIDgpKSA+PiAyXSA9IGU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKFEgfCAwKSA9PSAzMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUiA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSID0gKDI1IC0gKFEgPj4+IDEpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbCA9IEogPDwgUjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9IGNbaiA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjWyhtICsgNCkgPj4gMl0gJiAtOCkgfCAwKSA9PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChKIHwgMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUyA9IChtICsgMTYgKyAoKGwgPj4+IDMxKSA8PCAyKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaiA9IGNbUyA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGogfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVCA9IDE5MTM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGwgPSBsIDw8IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9IGo7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChUIHwgMCkgPT0gMTkxMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFMgPj4+IDAgPCAoY1syZTNdIHwgMCkgPj4+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1MgPj4gMl0gPSBlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKHEgKyAoZyArIDI0KSkgPj4gMl0gPSBtO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKHEgKyAoZyArIDEyKSkgPj4gMl0gPSBlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKHEgKyAoZyArIDgpKSA+PiAyXSA9IGU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbCA9IChtICsgOCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBqID0gY1tsID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaSA9IGNbMmUzXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChtID4+PiAwIDwgaSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChqID4+PiAwIDwgaSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soaiArIDEyKSA+PiAyXSA9IGU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW2wgPj4gMl0gPSBlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1socSArIChnICsgOCkpID4+IDJdID0gajtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKHEgKyAoZyArIDEyKSkgPj4gMl0gPSBtO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1socSArIChnICsgMjQpKSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgcSA9IChLICsgOCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChxIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8gPSBnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuID0gcTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBuIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgIEsgPSBjWzE5OThdIHwgMDtcbiAgICAgICAgICAgICAgICBpZiAobyA+Pj4gMCA8PSBLID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIFMgPSAoSyAtIG8pIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgSiA9IGNbMjAwMV0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBpZiAoUyA+Pj4gMCA+IDE1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBSID0gSjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbMjAwMV0gPSBSICsgbztcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbMTk5OF0gPSBTO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1soUiArIChvICsgNCkpID4+IDJdID0gUyB8IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICBjWyhSICsgSykgPj4gMl0gPSBTO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1soSiArIDQpID4+IDJdID0gbyB8IDM7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBjWzE5OThdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbMjAwMV0gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1soSiArIDQpID4+IDJdID0gSyB8IDM7XG4gICAgICAgICAgICAgICAgICAgICAgICBTID0gKEogKyAoSyArIDQpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBjW1MgPj4gMl0gPSBjW1MgPj4gMl0gfCAxO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIG4gPSAoSiArIDgpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG4gfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBKID0gY1sxOTk5XSB8IDA7XG4gICAgICAgICAgICAgICAgaWYgKG8gPj4+IDAgPCBKID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgIFMgPSAoSiAtIG8pIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgY1sxOTk5XSA9IFM7XG4gICAgICAgICAgICAgICAgICAgIEogPSBjWzIwMDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgSyA9IEo7XG4gICAgICAgICAgICAgICAgICAgIGNbMjAwMl0gPSBLICsgbztcbiAgICAgICAgICAgICAgICAgICAgY1soSyArIChvICsgNCkpID4+IDJdID0gUyB8IDE7XG4gICAgICAgICAgICAgICAgICAgIGNbKEogKyA0KSA+PiAyXSA9IG8gfCAzO1xuICAgICAgICAgICAgICAgICAgICBuID0gKEogKyA4KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKGNbMTY2Nl0gfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBKID0gYW0oMzApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoKChKIC0gMSkgJiBKKSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWzE2NjhdID0gSjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWzE2NjddID0gSjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWzE2NjldID0gLTE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1sxNjcwXSA9IC0xO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMTY3MV0gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMjEwN10gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMTY2Nl0gPSAoKGFKKDApIHwgMCkgJiAtMTYpIF4gMTQzMTY1NTc2ODtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgIEogPSAobyArIDQ4KSB8IDA7XG4gICAgICAgICAgICAgICAgUyA9IGNbMTY2OF0gfCAwO1xuICAgICAgICAgICAgICAgIEsgPSAobyArIDQ3KSB8IDA7XG4gICAgICAgICAgICAgICAgUiA9IChTICsgSykgfCAwO1xuICAgICAgICAgICAgICAgIFEgPSAtUyB8IDA7XG4gICAgICAgICAgICAgICAgUyA9IFIgJiBRO1xuICAgICAgICAgICAgICAgIGlmIChTID4+PiAwIDw9IG8gPj4+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgbiA9IDA7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBuIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgTyA9IGNbMjEwNl0gfCAwO1xuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKChPIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgUCA9IGNbMjEwNF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgTCA9IChQICsgUykgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChMID4+PiAwIDw9IFAgPj4+IDApIHwgKEwgPj4+IDAgPiBPID4+PiAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG4gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBuIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgIEwyNDk0OiBkbyB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoKGNbMjEwN10gJiA0KSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIE8gPSBjWzIwMDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIEwyNDk2OiBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChPIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUID0gMTk0MztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBMID0gTztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUCA9IDg0MzI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVID0gUCB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBNID0gY1tVID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChNID4+PiAwIDw9IEwgPj4+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBWID0gKFAgKyA0KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKE0gKyAoY1tWID4+IDJdIHwgMCkpIHwgMCkgPj4+IDAgPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBMID4+PiAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE0gPSBjWyhQICsgOCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChNIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFQgPSAxOTQzO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwyNDk2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQID0gTTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKFAgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUID0gMTk0MztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEwgPSAoUiAtIChjWzE5OTldIHwgMCkpICYgUTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKEwgPj4+IDAgPj0gMjE0NzQ4MzY0Nykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVyA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtID0gYVMoTCB8IDApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAobSB8IDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKChjW1UgPj4gMl0gfCAwKSArIChjW1YgPj4gMl0gfCAwKSkgfCAwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWCA9IGUgPyBtIDogLTE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFkgPSBlID8gTCA6IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFogPSBtO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfID0gTDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVCA9IDE5NTI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChUIHwgMCkgPT0gMTk0Mykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPID0gYVMoMCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKE8gfCAwKSA9PSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVyA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID0gTztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTCA9IGNbMTY2N10gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtID0gKEwgLSAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoKG0gJiBnKSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQgPSBTO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCA9IChTIC0gZyArICgobSArIGcpICYgLUwpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTCA9IGNbMjEwNF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID0gKEwgKyAkKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICEoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCQgPj4+IDAgPiBvID4+PiAwKSAmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCQgPj4+IDAgPCAyMTQ3NDgzNjQ3KVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFcgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9IGNbMjEwNl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKG0gfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGcgPj4+IDAgPD0gTCA+Pj4gMCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChnID4+PiAwID4gbSA+Pj4gMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFcgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0gPSBhUygkIHwgMCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID0gKG0gfCAwKSA9PSAoTyB8IDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBYID0gZyA/IE8gOiAtMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWSA9IGcgPyAkIDogMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWiA9IG07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF8gPSAkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUID0gMTk1MjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIEwyNTE2OiBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChUIHwgMCkgPT0gMTk1Mikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtID0gLV8gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKFggfCAwKSAhPSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWEgPSBZO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWIgPSBYO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVCA9IDE5NjM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMMjQ5NDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChaIHwgMCkgIT0gLTEpICZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoXyA+Pj4gMCA8IDIxNDc0ODM2NDcpICZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoXyA+Pj4gMCA8IEogPj4+IDApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID0gY1sxNjY4XSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTyA9IChLIC0gXyArIGcpICYgLWc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKE8gPj4+IDAgPj0gMjE0NzQ4MzY0Nykge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhYyA9IF87XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGFTKE8gfCAwKSB8IDApID09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFTKG0gfCAwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFcgPSBZO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMMjUxNjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhYyA9IChPICsgXykgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjID0gXztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoWiB8IDApID09IC0xKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBXID0gWTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFhID0gYWM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhYiA9IFo7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUID0gMTk2MztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwyNDk0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjWzIxMDddID0gY1syMTA3XSB8IDQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBhZCA9IFc7XG4gICAgICAgICAgICAgICAgICAgICAgICBUID0gMTk2MDtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGFkID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIFQgPSAxOTYwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKFQgfCAwKSA9PSAxOTYwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoUyA+Pj4gMCA+PSAyMTQ3NDgzNjQ3KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBXID0gYVMoUyB8IDApIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIFogPSBhUygwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgIShcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChaIHwgMCkgIT0gLTEpICZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChXIHwgMCkgIT0gLTEpICZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFcgPj4+IDAgPCBaID4+PiAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgYWMgPSAoWiAtIFcpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIFogPSBhYyA+Pj4gMCA+ICgobyArIDQwKSB8IDApID4+PiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgWSA9IFogPyBXIDogLTE7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKFkgfCAwKSAhPSAtMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFhID0gWiA/IGFjIDogYWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYWIgPSBZO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFQgPSAxOTYzO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKFQgfCAwKSA9PSAxOTYzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBhZCA9ICgoY1syMTA0XSB8IDApICsgYWEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbMjEwNF0gPSBhZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhZCA+Pj4gMCA+IChjWzIxMDVdIHwgMCkgPj4+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWzIxMDVdID0gYWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBhZCA9IGNbMjAwMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgTDI1MzY6IGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGFkIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTID0gY1syZTNdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCgoUyB8IDApID09IDApIHwgKGFiID4+PiAwIDwgUyA+Pj4gMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMmUzXSA9IGFiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMjEwOF0gPSBhYjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1syMTA5XSA9IGFhO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWzIxMTFdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1syMDA1XSA9IGNbMTY2Nl07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMjAwNF0gPSAtMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUyA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFkgPSBTIDw8IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhYyA9ICg4MDI0ICsgKFkgPDwgMikpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKDgwMjQgKyAoKFkgKyAzKSA8PCAyKSkgPj4gMl0gPSBhYztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKDgwMjQgKyAoKFkgKyAyKSA8PCAyKSkgPj4gMl0gPSBhYztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFMgPSAoUyArIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoUyA+Pj4gMCA8IDMyKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUyA9IChhYiArIDgpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCgoUyAmIDcpIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWUgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWUgPSAtUyAmIDc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUyA9IChhYSAtIDQwIC0gYWUpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1syMDAyXSA9IGFiICsgYWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMTk5OV0gPSBTO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhhYiArIChhZSArIDQpKSA+PiAyXSA9IFMgfCAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhhYiArIChhYSAtIDM2KSkgPj4gMl0gPSA0MDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1syMDAzXSA9IGNbMTY3MF07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUyA9IDg0MzI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZiA9IGNbUyA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZyA9IChTICsgNCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWggPSBjW2FnID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYWIgfCAwKSA9PSAoKGFmICsgYWgpIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUID0gMTk3NTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjID0gY1soUyArIDgpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYWMgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFMgPSBhYztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKFQgfCAwKSA9PSAxOTc1KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCgoY1soUyArIDEyKSA+PiAyXSAmIDgpIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWMgPSBhZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICEoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYWMgPj4+IDAgPj0gYWYgPj4+IDApICZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhYyA+Pj4gMCA8IGFiID4+PiAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW2FnID4+IDJdID0gYWggKyBhYTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhYyA9IGNbMjAwMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFkgPSAoKGNbMTk5OV0gfCAwKSArIGFhKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWiA9IGFjO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFcgPSAoYWMgKyA4KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCgoVyAmIDcpIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhaSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWkgPSAtVyAmIDc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFcgPSAoWSAtIGFpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1syMDAyXSA9IFogKyBhaTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWzE5OTldID0gVztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhaICsgKGFpICsgNCkpID4+IDJdID0gVyB8IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soWiArIChZICsgNCkpID4+IDJdID0gNDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1syMDAzXSA9IGNbMTY3MF07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDI1MzY7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYWIgPj4+IDAgPCAoY1syZTNdIHwgMCkgPj4+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMmUzXSA9IGFiO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFMgPSAoYWIgKyBhYSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBZID0gODQzMjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFqID0gWSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGNbYWogPj4gMl0gfCAwKSA9PSAoUyB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVCA9IDE5ODU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBaID0gY1soWSArIDgpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoWiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWSA9IFo7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChUIHwgMCkgPT0gMTk4NSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoKGNbKFkgKyAxMikgPj4gMl0gJiA4KSB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbYWogPj4gMl0gPSBhYjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTID0gKFkgKyA0KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tTID4+IDJdID0gKGNbUyA+PiAyXSB8IDApICsgYWE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUyA9IChhYiArIDgpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKChTICYgNykgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFrID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhayA9IC1TICYgNztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUyA9IChhYiArIChhYSArIDgpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCgoUyAmIDcpIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbCA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWwgPSAtUyAmIDc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFMgPSAoYWIgKyAoYWwgKyBhYSkpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBaID0gUztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBXID0gKGFrICsgbykgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjID0gKGFiICsgVykgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF8gPSBhYztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBLID0gKFMgLSAoYWIgKyBhaykgLSBvKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soYWIgKyAoYWsgKyA0KSkgPj4gMl0gPSBvIHwgMztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoWiB8IDApID09IChjWzIwMDJdIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEogPSAoKGNbMTk5OV0gfCAwKSArIEspIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMTk5OV0gPSBKO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1syMDAyXSA9IF87XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhhYiArIChXICsgNCkpID4+IDJdID0gSiB8IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKFogfCAwKSA9PSAoY1syMDAxXSB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSiA9ICgoY1sxOTk4XSB8IDApICsgSykgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMTk5OF0gPSBKO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMjAwMV0gPSBfO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGFiICsgKFcgKyA0KSkgPj4gMl0gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBKIHwgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhhYiArIChKICsgVykpID4+IDJdID0gSjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEogPSAoYWEgKyA0KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBYID0gY1soYWIgKyAoSiArIGFsKSkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCgoWCAmIDMpIHwgMCkgPT0gMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQgPSBYICYgLTg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgViA9IFggPj4+IDM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTDI1NzE6IGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFggPj4+IDAgPCAyNTYpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFUgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhYiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGFsIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA4KSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWEpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFiICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhYSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFsKSkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFIgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg4MDI0ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChWIDw8IDEpIDw8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyKSkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoVSB8IDApICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChSIHwgMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVSA+Pj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjWzJlM10gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID4+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFUgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMikgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChaIHwgMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoUSB8IDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFUgfCAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1sxOTk2XSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMTk5Nl0gJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB+KDEgPDwgVik7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoUSB8IDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChSIHwgMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW4gPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFEgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDgpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUSA+Pj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjWzJlM10gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID4+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoUSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA9PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFogfCAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFuID0gbTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoVSArIDEyKSA+PiAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gUTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbYW4gPj4gMl0gPSBVO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUiA9IFM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYWIgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChhbCB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjQpICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhYSkpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYWIgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFhICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxMiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWwpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFAgfCAwKSA9PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoUiB8IDApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIE8gPSBhbCB8IDE2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhYiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEogK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPKSkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTCA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGcgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChMIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA9PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhYiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChPICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFhKSkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBPID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoTyB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW8gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcCA9IE87XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXIgPSBlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXAgPSBMO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXIgPSBnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYXAgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyMCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBMID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoTCB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXAgPSBMO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyID0gZztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGcgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhcCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEwgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGcgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChMIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXAgPSBMO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyID0gZztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhciA+Pj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjWzJlM10gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID4+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFyID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYW8gPSBhcDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZyA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhYiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoYWwgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWEpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZyA+Pj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwIDxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjWzJlM10gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID4+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTCA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoZyArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTIpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEwgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgIT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChSIHwgMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoUCArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA9PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFIgfCAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgTCA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gUDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gZztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFvID0gUDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKG0gfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYWIgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYWEgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjggK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWwpKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFUgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICg4Mjg4ICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQID4+IDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMikpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFIgfCAwKSA9PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1tVID4+IDJdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBVID4+IDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IGFvO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYW8gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApICE9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1sxOTk3XSA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWzE5OTddICZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH4oXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMSA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFAgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMMjU3MTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtID4+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDAgPFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbMmUzXSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPj4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBRID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChtICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNikgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA9PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFIgfCAwKVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gYW87XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChtICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjApID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPSBhbztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYW8gfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID09XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDI1NzE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhbyA+Pj4gMCA8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGNbMmUzXSB8IDApID4+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYW8gKyAyNCkgPj4gMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IG07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBSID0gYWwgfCAxNjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFAgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhYiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoUiArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWEpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFAgfCAwKSAhPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFAgPj4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCA8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1syZTNdIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA+Pj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYW8gK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNikgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IFA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChQICtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMjQpID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPSBhbztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYWIgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEogK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFIpKSA+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChQIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFAgPj4+IDAgPFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjWzJlM10gfCAwKSA+Pj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFvICsgMjApID4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgXSA9IFA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFAgKyAyNCkgPj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gYW87XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcyA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhYiArICgoJCB8IGFsKSArIGFhKSkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF0ID0gKCQgKyBLKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFzID0gWjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdCA9IEs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBKID0gKGFzICsgNCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tKID4+IDJdID0gY1tKID4+IDJdICYgLTI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhhYiArIChXICsgNCkpID4+IDJdID0gYXQgfCAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soYWIgKyAoYXQgKyBXKSkgPj4gMl0gPSBhdDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEogPSBhdCA+Pj4gMztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhdCA+Pj4gMCA8IDI1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFYgPSBKIDw8IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWCA9ICg4MDI0ICsgKFYgPDwgMikpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBQID0gY1sxOTk2XSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9IDEgPDwgSjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoUCAmIG0pIHwgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWzE5OTZdID0gUCB8IG07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdSA9IFg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdiA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDgwMjQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKFYgKyAyKSA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMikpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSiA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDgwMjQgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKFYgKyAyKSA8PFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMikpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVSA9IGNbSiA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVSA+Pj4gMCA+PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChjWzJlM10gfCAwKSA+Pj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXUgPSBVO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF2ID0gSjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbYXYgPj4gMl0gPSBfO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGF1ICsgMTIpID4+IDJdID0gXztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhhYiArIChXICsgOCkpID4+IDJdID0gYXU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soYWIgKyAoVyArIDEyKSkgPj4gMl0gPSBYO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgViA9IGFjO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9IGF0ID4+PiA4O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgobSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXcgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF0ID4+PiAwID5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2Nzc3MjE1XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXcgPSAzMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFAgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgobSArIDEwNDgzMjApIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSA+Pj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAxNikgJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgODtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJCA9IG0gPDwgUDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSiA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKCgkICsgNTIwMTkyKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPj4+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYpICZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFUgPSAkIDw8IEo7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICQgPVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKCgoVSArIDI0NTc2MCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID4+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDE2KSAmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBRID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgxNCAtXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKEogfCBQIHwgJCkgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoVSA8PCAkKSA+Pj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTUpKSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhdyA9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGF0ID4+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICgoKFEgKyA3KSB8XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDApID4+PlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwKSkgJlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChRIDw8IDEpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9ICg4Mjg4ICsgKGF3IDw8IDIpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhhYiArIChXICsgMjgpKSA+PiAyXSA9IGF3O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soYWIgKyAoVyArIDIwKSkgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soYWIgKyAoVyArIDE2KSkgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWCA9IGNbMTk5N10gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUSA9IDEgPDwgYXc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKChYICYgUSkgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1sxOTk3XSA9IFggfCBRO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbbSA+PiAyXSA9IFY7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soYWIgKyAoVyArIDI0KSkgPj4gMl0gPSBtO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGFiICsgKFcgKyAxMikpID4+IDJdID0gVjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhhYiArIChXICsgOCkpID4+IDJdID0gVjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYXcgfCAwKSA9PSAzMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF4ID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXggPSAoMjUgLSAoYXcgPj4+IDEpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBRID0gYXQgPDwgYXg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBYID0gY1ttID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKGNbKFggKyA0KSA+PiAyXSAmXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAtOCkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMCkgPT1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGF0IHwgMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGF5ID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFggK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMTYgK1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChRID4+PiAzMSkgPDwgMikpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtID0gY1theSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChtIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUID0gMjA1ODtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUSA9IFEgPDwgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWCA9IG07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChUIHwgMCkgPT0gMjA1OCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXkgPj4+IDAgPFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoY1syZTNdIHwgMCkgPj4+IDBcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1theSA+PiAyXSA9IFY7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoYWIgKyAoVyArIDI0KSkgPj4gMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gWDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhYiArIChXICsgMTIpKSA+PiAyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF0gPSBWO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKGFiICsgKFcgKyA4KSkgPj4gMlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBdID0gVjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUSA9IChYICsgOCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9IGNbUSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkID0gY1syZTNdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChYID4+PiAwIDwgJCA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAobSA+Pj4gMCA8ICQgPj4+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhtICsgMTIpID4+IDJdID0gVjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1EgPj4gMl0gPSBWO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGFiICsgKFcgKyA4KSkgPj4gMl0gPSBtO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGFiICsgKFcgKyAxMikpID4+IDJdID0gWDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhhYiArIChXICsgMjQpKSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBuID0gKGFiICsgKGFrIHwgOCkpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gbiB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBZID0gYWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFcgPSA4NDMyO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXogPSBjW1cgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGF6ID4+PiAwIDw9IFkgPj4+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhQSA9IGNbKFcgKyA0KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYUIgPSAoYXogKyBhQSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhQiA+Pj4gMCA+IFkgPj4+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVyA9IGNbKFcgKyA4KSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVyA9IChheiArIChhQSAtIDM5KSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKChXICYgNykgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhQyA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhQyA9IC1XICYgNztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBXID0gKGF6ICsgKGFBIC0gNDcgKyBhQykpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYWMgPSBXID4+PiAwIDwgKChhZCArIDE2KSB8IDApID4+PiAwID8gWSA6IFc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFcgPSAoYWMgKyA4KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF8gPSAoYWIgKyA4KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoKF8gJiA3KSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFEID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFEID0gLV8gJiA3O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF8gPSAoYWEgLSA0MCAtIGFEKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMjAwMl0gPSBhYiArIGFEO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWzE5OTldID0gXztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soYWIgKyAoYUQgKyA0KSkgPj4gMl0gPSBfIHwgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soYWIgKyAoYWEgLSAzNikpID4+IDJdID0gNDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMjAwM10gPSBjWzE2NzBdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhhYyArIDQpID4+IDJdID0gMjc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbVyA+PiAyXSA9IGNbMjEwOF07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKFcgKyA0KSA+PiAyXSA9IGNbMjEwOV07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKFcgKyA4KSA+PiAyXSA9IGNbMjExMF07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKFcgKyAxMikgPj4gMl0gPSBjWzIxMTFdO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWzIxMDhdID0gYWI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMjEwOV0gPSBhYTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1syMTExXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMjExMF0gPSBXO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBXID0gKGFjICsgMjgpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tXID4+IDJdID0gNztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCgoYWMgKyAzMikgfCAwKSA+Pj4gMCA8IGFCID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfID0gVztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgVyA9IChfICsgNCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbVyA+PiAyXSA9IDc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCgoXyArIDgpIHwgMCkgPj4+IDAgPCBhQiA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfID0gVztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChhYyB8IDApID09IChZIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIF8gPSAoYWMgLSBhZCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBXID0gKFkgKyAoXyArIDQpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbVyA+PiAyXSA9IGNbVyA+PiAyXSAmIC0yO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhhZCArIDQpID4+IDJdID0gXyB8IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKFkgKyBfKSA+PiAyXSA9IF87XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFcgPSBfID4+PiAzO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXyA+Pj4gMCA8IDI1Nikge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSyA9IFcgPDwgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFogPSAoODAyNCArIChLIDw8IDIpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBTID0gY1sxOTk2XSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtID0gMSA8PCBXO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoKFMgJiBtKSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1sxOTk2XSA9IFMgfCBtO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhRSA9IFo7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFGID0gKDgwMjQgKyAoKEsgKyAyKSA8PCAyKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFcgPSAoODAyNCArICgoSyArIDIpIDw8IDIpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFEgPSBjW1cgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoUSA+Pj4gMCA+PSAoY1syZTNdIHwgMCkgPj4+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFFID0gUTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFGID0gVztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1thRiA+PiAyXSA9IGFkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soYUUgKyAxMikgPj4gMl0gPSBhZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGFkICsgOCkgPj4gMl0gPSBhRTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGFkICsgMTIpID4+IDJdID0gWjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEsgPSBhZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9IF8gPj4+IDg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgobSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhRyA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChfID4+PiAwID4gMTY3NzcyMTUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYUcgPSAzMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFMgPSAoKChtICsgMTA0ODMyMCkgfCAwKSA+Pj4gMTYpICYgODtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBZID0gbSA8PCBTO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFjID0gKCgoWSArIDUyMDE5MikgfCAwKSA+Pj4gMTYpICYgNDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBXID0gWSA8PCBhYztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBZID0gKCgoVyArIDI0NTc2MCkgfCAwKSA+Pj4gMTYpICYgMjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBRID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKDE0IC1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChhYyB8IFMgfCBZKSArXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAoKFcgPDwgWSkgPj4+IDE1KSkgfFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFHID1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChfID4+PiAoKChRICsgNykgfCAwKSA+Pj4gMCkpICZcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDEpIHxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKFEgPDwgMSk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtID0gKDgyODggKyAoYUcgPDwgMikpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soYWQgKyAyOCkgPj4gMl0gPSBhRztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soYWQgKyAyMCkgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhhZCArIDE2KSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFogPSBjWzE5OTddIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUSA9IDEgPDwgYUc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoKFogJiBRKSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMTk5N10gPSBaIHwgUTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbbSA+PiAyXSA9IEs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhhZCArIDI0KSA+PiAyXSA9IG07XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhhZCArIDEyKSA+PiAyXSA9IGFkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soYWQgKyA4KSA+PiAyXSA9IGFkO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChhRyB8IDApID09IDMxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhSCA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhSCA9ICgyNSAtIChhRyA+Pj4gMSkpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBRID0gXyA8PCBhSDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgWiA9IGNbbSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgxKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKChjWyhaICsgNCkgPj4gMl0gJiAtOCkgfCAwKSA9PVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChfIHwgMClcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYUkgPSAoWiArIDE2ICsgKChRID4+PiAzMSkgPDwgMikpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0gPSBjW2FJID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgobSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBUID0gMjA5MztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUSA9IFEgPDwgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBaID0gbTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKFQgfCAwKSA9PSAyMDkzKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoYUkgPj4+IDAgPCAoY1syZTNdIHwgMCkgPj4+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW2FJID4+IDJdID0gSztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhhZCArIDI0KSA+PiAyXSA9IFo7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soYWQgKyAxMikgPj4gMl0gPSBhZDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhhZCArIDgpID4+IDJdID0gYWQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgUSA9IChaICsgOCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfID0gY1tRID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbSA9IGNbMmUzXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChaID4+PiAwIDwgbSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChfID4+PiAwIDwgbSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soXyArIDEyKSA+PiAyXSA9IEs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW1EgPj4gMl0gPSBLO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soYWQgKyA4KSA+PiAyXSA9IF87XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhhZCArIDEyKSA+PiAyXSA9IFo7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhhZCArIDI0KSA+PiAyXSA9IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgYWQgPSBjWzE5OTldIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhZCA+Pj4gMCA8PSBvID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBfID0gKGFkIC0gbykgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1sxOTk5XSA9IF87XG4gICAgICAgICAgICAgICAgICAgICAgICBhZCA9IGNbMjAwMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgUSA9IGFkO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1syMDAyXSA9IFEgKyBvO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1soUSArIChvICsgNCkpID4+IDJdID0gXyB8IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICBjWyhhZCArIDQpID4+IDJdID0gbyB8IDM7XG4gICAgICAgICAgICAgICAgICAgICAgICBuID0gKGFkICsgOCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG4gfCAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgY1soYVEoKSB8IDApID4+IDJdID0gMTI7XG4gICAgICAgICAgICAgICAgbiA9IDA7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG4gfCAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgLy8gZnJlZVxuICAgICAgICAgICAgZnVuY3Rpb24gYzAoYSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgYiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGQgPSAwLFxuICAgICAgICAgICAgICAgICAgICBlID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGcgPSAwLFxuICAgICAgICAgICAgICAgICAgICBoID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGogPSAwLFxuICAgICAgICAgICAgICAgICAgICBrID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIG0gPSAwLFxuICAgICAgICAgICAgICAgICAgICBuID0gMCxcbiAgICAgICAgICAgICAgICAgICAgbyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHAgPSAwLFxuICAgICAgICAgICAgICAgICAgICBxID0gMCxcbiAgICAgICAgICAgICAgICAgICAgciA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHMgPSAwLFxuICAgICAgICAgICAgICAgICAgICB0ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgdSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHYgPSAwLFxuICAgICAgICAgICAgICAgICAgICB3ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgeCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIHkgPSAwLFxuICAgICAgICAgICAgICAgICAgICB6ID0gMCxcbiAgICAgICAgICAgICAgICAgICAgQSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIEIgPSAwLFxuICAgICAgICAgICAgICAgICAgICBDID0gMCxcbiAgICAgICAgICAgICAgICAgICAgRCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIEUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBGID0gMCxcbiAgICAgICAgICAgICAgICAgICAgRyA9IDAsXG4gICAgICAgICAgICAgICAgICAgIEggPSAwLFxuICAgICAgICAgICAgICAgICAgICBJID0gMCxcbiAgICAgICAgICAgICAgICAgICAgSiA9IDAsXG4gICAgICAgICAgICAgICAgICAgIEsgPSAwLFxuICAgICAgICAgICAgICAgICAgICBMID0gMCxcbiAgICAgICAgICAgICAgICAgICAgTSA9IDAsXG4gICAgICAgICAgICAgICAgICAgIE4gPSAwLFxuICAgICAgICAgICAgICAgICAgICBPID0gMDtcbiAgICAgICAgICAgICAgICBpZiAoKGEgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgYiA9IChhIC0gOCkgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBiO1xuICAgICAgICAgICAgICAgIGUgPSBjWzJlM10gfCAwO1xuICAgICAgICAgICAgICAgIGlmIChiID4+PiAwIDwgZSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBmID0gY1soYSAtIDQpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICBnID0gZiAmIDM7XG4gICAgICAgICAgICAgICAgaWYgKChnIHwgMCkgPT0gMSkge1xuICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBoID0gZiAmIC04O1xuICAgICAgICAgICAgICAgIGkgPSAoYSArIChoIC0gOCkpIHwgMDtcbiAgICAgICAgICAgICAgICBqID0gaTtcbiAgICAgICAgICAgICAgICBMMjc1MzogZG8ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKChmICYgMSkgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBrID0gY1tiID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZyB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBsID0gKC04IC0gaykgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgbSA9IChhICsgbCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgbiA9IG07XG4gICAgICAgICAgICAgICAgICAgICAgICBvID0gKGsgKyBoKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAobSA+Pj4gMCA8IGUgPj4+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChuIHwgMCkgPT0gKGNbMjAwMV0gfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAgPSAoYSArIChoIC0gNCkpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKChjW3AgPj4gMl0gJiAzKSB8IDApICE9IDMpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IG47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIgPSBvO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1sxOTk4XSA9IG87XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1twID4+IDJdID0gY1twID4+IDJdICYgLTI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soYSArIChsICsgNCkpID4+IDJdID0gbyB8IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tpID4+IDJdID0gbztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBwID0gayA+Pj4gMztcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChrID4+PiAwIDwgMjU2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgayA9IGNbKGEgKyAobCArIDgpKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcyA9IGNbKGEgKyAobCArIDEyKSkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQgPSAoODAyNCArICgocCA8PCAxKSA8PCAyKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChrIHwgMCkgIT0gKHQgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGsgPj4+IDAgPCBlID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY1soayArIDEyKSA+PiAyXSB8IDApID09IChuIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKHMgfCAwKSA9PSAoayB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMTk5Nl0gPSBjWzE5OTZdICYgfigxIDw8IHApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gbjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgciA9IG87XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgocyB8IDApID09ICh0IHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUgPSAocyArIDgpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzID4+PiAwIDwgZSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2ID0gKHMgKyA4KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGNbdiA+PiAyXSB8IDApID09IChuIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ID0gdjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhrICsgMTIpID4+IDJdID0gcztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW3UgPj4gMl0gPSBrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSBuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIgPSBvO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgdCA9IG07XG4gICAgICAgICAgICAgICAgICAgICAgICBwID0gY1soYSArIChsICsgMjQpKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICB2ID0gY1soYSArIChsICsgMTIpKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCh2IHwgMCkgPT0gKHQgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3ID0gKGEgKyAobCArIDIwKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4ID0gY1t3ID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCh4IHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeSA9IChhICsgKGwgKyAxNikpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHogPSBjW3kgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCh6IHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEEgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCID0gejtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDID0geTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEIgPSB4O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQyA9IHc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHcgPSAoQiArIDIwKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4ID0gY1t3ID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoeCB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBCID0geDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBDID0gdztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHcgPSAoQiArIDE2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB4ID0gY1t3ID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoeCB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQiA9IHg7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQyA9IHc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKEMgPj4+IDAgPCBlID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tDID4+IDJdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEEgPSBCO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3ID0gY1soYSArIChsICsgOCkpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHcgPj4+IDAgPCBlID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHggPSAodyArIDEyKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY1t4ID4+IDJdIHwgMCkgIT0gKHQgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB5ID0gKHYgKyA4KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY1t5ID4+IDJdIHwgMCkgPT0gKHQgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1t4ID4+IDJdID0gdjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbeSA+PiAyXSA9IHc7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBBID0gdjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChwIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHEgPSBuO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIgPSBvO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgdiA9IChhICsgKGwgKyAyOCkpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIG0gPSAoODI4OCArIChjW3YgPj4gMl0gPDwgMikpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKHQgfCAwKSA9PSAoY1ttID4+IDJdIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1ttID4+IDJdID0gQTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChBIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1sxOTk3XSA9IGNbMTk5N10gJiB+KDEgPDwgY1t2ID4+IDJdKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IG47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIgPSBvO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayBMMjc1MztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocCA+Pj4gMCA8IChjWzJlM10gfCAwKSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrID0gKHAgKyAxNikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGNbayA+PiAyXSB8IDApID09ICh0IHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbayA+PiAyXSA9IEE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhwICsgMjApID4+IDJdID0gQTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKEEgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gbjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIgPSBvO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgTDI3NTM7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChBID4+PiAwIDwgKGNbMmUzXSB8IDApID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGNbKEEgKyAyNCkgPj4gMl0gPSBwO1xuICAgICAgICAgICAgICAgICAgICAgICAgdCA9IGNbKGEgKyAobCArIDE2KSkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgodCB8IDApICE9IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHQgPj4+IDAgPCAoY1syZTNdIHwgMCkgPj4+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhBICsgMTYpID4+IDJdID0gdDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKHQgKyAyNCkgPj4gMl0gPSBBO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIHQgPSBjWyhhICsgKGwgKyAyMCkpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgodCB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBxID0gbjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByID0gbztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0ID4+PiAwIDwgKGNbMmUzXSB8IDApID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soQSArIDIwKSA+PiAyXSA9IHQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1sodCArIDI0KSA+PiAyXSA9IEE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcSA9IG47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgciA9IG87XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBxID0gZDtcbiAgICAgICAgICAgICAgICAgICAgICAgIHIgPSBoO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgZCA9IHE7XG4gICAgICAgICAgICAgICAgaWYgKGQgPj4+IDAgPj0gaSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBBID0gKGEgKyAoaCAtIDQpKSB8IDA7XG4gICAgICAgICAgICAgICAgZSA9IGNbQSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgaWYgKCgoZSAmIDEpIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoKGUgJiAyKSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoaiB8IDApID09IChjWzIwMDJdIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBCID0gKChjWzE5OTldIHwgMCkgKyByKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1sxOTk5XSA9IEI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1syMDAyXSA9IHE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1socSArIDQpID4+IDJdID0gQiB8IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChxIHwgMCkgIT0gKGNbMjAwMV0gfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMjAwMV0gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbMTk5OF0gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoaiB8IDApID09IChjWzIwMDFdIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBCID0gKChjWzE5OThdIHwgMCkgKyByKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1sxOTk4XSA9IEI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1syMDAxXSA9IHE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1socSArIDQpID4+IDJdID0gQiB8IDE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soZCArIEIpID4+IDJdID0gQjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBCID0gKChlICYgLTgpICsgcikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgQyA9IGUgPj4+IDM7XG4gICAgICAgICAgICAgICAgICAgICAgICBMMjg1NjogZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlID4+PiAwIDwgMjU2KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUgPSBjWyhhICsgaCkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID0gY1soYSArIChoIHwgNCkpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYiA9ICg4MDI0ICsgKChDIDw8IDEpIDw8IDIpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgodSB8IDApICE9IChiIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodSA+Pj4gMCA8IChjWzJlM10gfCAwKSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGNbKHUgKyAxMikgPj4gMl0gfCAwKSA9PSAoaiB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChnIHwgMCkgPT0gKHUgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1sxOTk2XSA9IGNbMTk5Nl0gJiB+KDEgPDwgQyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKGcgfCAwKSA9PSAoYiB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRCA9IChnICsgOCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZyA+Pj4gMCA8IChjWzJlM10gfCAwKSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmID0gKGcgKyA4KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChjW2YgPj4gMl0gfCAwKSA9PSAoaiB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEQgPSBmO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKHUgKyAxMikgPj4gMl0gPSBnO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW0QgPj4gMl0gPSB1O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGIgPSBpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmID0gY1soYSArIChoICsgMTYpKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQgPSBjWyhhICsgKGggfCA0KSkgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKHQgfCAwKSA9PSAoYiB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcCA9IChhICsgKGggKyAxMikpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2ID0gY1twID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKHYgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG0gPSAoYSArIChoICsgOCkpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgayA9IGNbbSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoayB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEUgPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBGID0gaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEcgPSBtO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRiA9IHY7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEcgPSBwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAoMSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwID0gKEYgKyAyMCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2ID0gY1twID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCh2IHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRiA9IHY7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBHID0gcDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHAgPSAoRiArIDE2KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHYgPSBjW3AgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKHYgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEYgPSB2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgRyA9IHA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKEcgPj4+IDAgPCAoY1syZTNdIHwgMCkgPj4+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW0cgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBFID0gRjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwID0gY1soYSArIGgpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAocCA+Pj4gMCA8IChjWzJlM10gfCAwKSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB2ID0gKHAgKyAxMikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY1t2ID4+IDJdIHwgMCkgIT0gKGIgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtID0gKHQgKyA4KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChjW20gPj4gMl0gfCAwKSA9PSAoYiB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbdiA+PiAyXSA9IHQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbbSA+PiAyXSA9IHA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEUgPSB0O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoZiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQgPSAoYSArIChoICsgMjApKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHUgPSAoODI4OCArIChjW3QgPj4gMl0gPDwgMikpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChiIHwgMCkgPT0gKGNbdSA+PiAyXSB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1t1ID4+IDJdID0gRTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKEUgfCAwKSAhPSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWzE5OTddID0gY1sxOTk3XSAmIH4oMSA8PCBjW3QgPj4gMl0pO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwyODU2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZiA+Pj4gMCA8IChjWzJlM10gfCAwKSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBnID0gKGYgKyAxNikgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoY1tnID4+IDJdIHwgMCkgPT0gKGIgfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjW2cgPj4gMl0gPSBFO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGYgKyAyMCkgPj4gMl0gPSBFO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKEUgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIEwyODU2O1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChFID4+PiAwIDwgKGNbMmUzXSB8IDApID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKEUgKyAyNCkgPj4gMl0gPSBmO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiID0gY1soYSArIChoICsgOCkpID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChiIHwgMCkgIT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChiID4+PiAwIDwgKGNbMmUzXSB8IDApID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soRSArIDE2KSA+PiAyXSA9IGI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKGIgKyAyNCkgPj4gMl0gPSBFO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBiID0gY1soYSArIChoICsgMTIpKSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgoYiB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChiID4+PiAwIDwgKGNbMmUzXSB8IDApID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhcSgpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1soRSArIDIwKSA+PiAyXSA9IGI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhiICsgMjQpID4+IDJdID0gRTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgICAgICAgICBjWyhxICsgNCkgPj4gMl0gPSBCIHwgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbKGQgKyBCKSA+PiAyXSA9IEI7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKHEgfCAwKSAhPSAoY1syMDAxXSB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgSCA9IEI7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBjWzE5OThdID0gQjtcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbQSA+PiAyXSA9IGUgJiAtMjtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbKHEgKyA0KSA+PiAyXSA9IHIgfCAxO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1soZCArIHIpID4+IDJdID0gcjtcbiAgICAgICAgICAgICAgICAgICAgICAgIEggPSByO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoMCk7XG4gICAgICAgICAgICAgICAgciA9IEggPj4+IDM7XG4gICAgICAgICAgICAgICAgaWYgKEggPj4+IDAgPCAyNTYpIHtcbiAgICAgICAgICAgICAgICAgICAgZCA9IHIgPDwgMTtcbiAgICAgICAgICAgICAgICAgICAgZSA9ICg4MDI0ICsgKGQgPDwgMikpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgQSA9IGNbMTk5Nl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBFID0gMSA8PCByO1xuICAgICAgICAgICAgICAgICAgICBkbyB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoKChBICYgRSkgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1sxOTk2XSA9IEEgfCBFO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEkgPSBlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEogPSAoODAyNCArICgoZCArIDIpIDw8IDIpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIgPSAoODAyNCArICgoZCArIDIpIDw8IDIpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaCA9IGNbciA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGggPj4+IDAgPj0gKGNbMmUzXSB8IDApID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEkgPSBoO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBKID0gcjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgICAgICBjW0ogPj4gMl0gPSBxO1xuICAgICAgICAgICAgICAgICAgICBjWyhJICsgMTIpID4+IDJdID0gcTtcbiAgICAgICAgICAgICAgICAgICAgY1socSArIDgpID4+IDJdID0gSTtcbiAgICAgICAgICAgICAgICAgICAgY1socSArIDEyKSA+PiAyXSA9IGU7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgZSA9IHE7XG4gICAgICAgICAgICAgICAgSSA9IEggPj4+IDg7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBpZiAoKEkgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBLID0gMDtcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChIID4+PiAwID4gMTY3NzcyMTUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBLID0gMzE7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBKID0gKCgoSSArIDEwNDgzMjApIHwgMCkgPj4+IDE2KSAmIDg7XG4gICAgICAgICAgICAgICAgICAgICAgICBkID0gSSA8PCBKO1xuICAgICAgICAgICAgICAgICAgICAgICAgRSA9ICgoKGQgKyA1MjAxOTIpIHwgMCkgPj4+IDE2KSAmIDQ7XG4gICAgICAgICAgICAgICAgICAgICAgICBBID0gZCA8PCBFO1xuICAgICAgICAgICAgICAgICAgICAgICAgZCA9ICgoKEEgKyAyNDU3NjApIHwgMCkgPj4+IDE2KSAmIDI7XG4gICAgICAgICAgICAgICAgICAgICAgICByID0gKDE0IC0gKEUgfCBKIHwgZCkgKyAoKEEgPDwgZCkgPj4+IDE1KSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgSyA9ICgoSCA+Pj4gKCgociArIDcpIHwgMCkgPj4+IDApKSAmIDEpIHwgKHIgPDwgMSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IHdoaWxlICgwKTtcbiAgICAgICAgICAgICAgICBJID0gKDgyODggKyAoSyA8PCAyKSkgfCAwO1xuICAgICAgICAgICAgICAgIGNbKHEgKyAyOCkgPj4gMl0gPSBLO1xuICAgICAgICAgICAgICAgIGNbKHEgKyAyMCkgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgIGNbKHEgKyAxNikgPj4gMl0gPSAwO1xuICAgICAgICAgICAgICAgIHIgPSBjWzE5OTddIHwgMDtcbiAgICAgICAgICAgICAgICBkID0gMSA8PCBLO1xuICAgICAgICAgICAgICAgIGRvIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKCgociAmIGQpIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY1sxOTk3XSA9IHIgfCBkO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1tJID4+IDJdID0gZTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbKHEgKyAyNCkgPj4gMl0gPSBJO1xuICAgICAgICAgICAgICAgICAgICAgICAgY1socSArIDEyKSA+PiAyXSA9IHE7XG4gICAgICAgICAgICAgICAgICAgICAgICBjWyhxICsgOCkgPj4gMl0gPSBxO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChLIHwgMCkgPT0gMzEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBMID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgTCA9ICgyNSAtIChLID4+PiAxKSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgQSA9IEggPDwgTDtcbiAgICAgICAgICAgICAgICAgICAgICAgIEogPSBjW0kgPj4gMl0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKChjWyhKICsgNCkgPj4gMl0gJiAtOCkgfCAwKSA9PSAoSCB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBNID0gKEogKyAxNiArICgoQSA+Pj4gMzEpIDw8IDIpKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgRSA9IGNbTSA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChFIHwgMCkgPT0gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBOID0gMjI3MDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQSA9IEEgPDwgMTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgSiA9IEU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChOIHwgMCkgPT0gMjI3MCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChNID4+PiAwIDwgKGNbMmUzXSB8IDApID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1tNID4+IDJdID0gZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY1socSArIDI0KSA+PiAyXSA9IEo7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKHEgKyAxMikgPj4gMl0gPSBxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhxICsgOCkgPj4gMl0gPSBxO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBBID0gKEogKyA4KSB8IDA7XG4gICAgICAgICAgICAgICAgICAgICAgICBCID0gY1tBID4+IDJdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIEUgPSBjWzJlM10gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKEogPj4+IDAgPCBFID4+PiAwKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXEoKTtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChCID4+PiAwIDwgRSA+Pj4gMCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGFxKCk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbKEIgKyAxMikgPj4gMl0gPSBlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNbQSA+PiAyXSA9IGU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY1socSArIDgpID4+IDJdID0gQjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhxICsgMTIpID4+IDJdID0gSjtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjWyhxICsgMjQpID4+IDJdID0gMDtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKDApO1xuICAgICAgICAgICAgICAgIHEgPSAoKGNbMjAwNF0gfCAwKSAtIDEpIHwgMDtcbiAgICAgICAgICAgICAgICBjWzIwMDRdID0gcTtcbiAgICAgICAgICAgICAgICBpZiAoKHEgfCAwKSA9PSAwKSB7XG4gICAgICAgICAgICAgICAgICAgIE8gPSA4NDQwO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgd2hpbGUgKDEpIHtcbiAgICAgICAgICAgICAgICAgICAgcSA9IGNbTyA+PiAyXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGlmICgocSB8IDApID09IDApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgTyA9IChxICsgOCkgfCAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIGNbMjAwNF0gPSAtMTtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjMShiKSB7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGxldCBjID0gMDtcbiAgICAgICAgICAgICAgICBjID0gYjtcbiAgICAgICAgICAgICAgICB3aGlsZSAoYVtjXSB8IDApIHtcbiAgICAgICAgICAgICAgICAgICAgYyA9IChjICsgMSkgfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gKGMgLSBiKSB8IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjMihiLCBjKSB7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGMgPSBjIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZCA9IDA7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBhWyhiICsgZCkgfCAwXSA9IGFbKGMgKyBkKSB8IDBdO1xuICAgICAgICAgICAgICAgICAgICBkID0gKGQgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoYVsoYyArIChkIC0gMSkpIHwgMF0gfCAwKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gYiB8IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjMyhiLCBjKSB7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGMgPSBjIHwgMDtcbiAgICAgICAgICAgICAgICBsZXQgZCA9IDAsXG4gICAgICAgICAgICAgICAgICAgIGUgPSAwO1xuICAgICAgICAgICAgICAgIGQgPSAoYiArIChjMShiKSB8IDApKSB8IDA7XG4gICAgICAgICAgICAgICAgZG8ge1xuICAgICAgICAgICAgICAgICAgICBhWyhkICsgZSkgfCAwXSA9IGFbKGMgKyBlKSB8IDBdO1xuICAgICAgICAgICAgICAgICAgICBlID0gKGUgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgfSB3aGlsZSAoYVsoYyArIChlIC0gMSkpIHwgMF0gfCAwKTtcbiAgICAgICAgICAgICAgICByZXR1cm4gYiB8IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjNChhLCBiLCBjKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBjID0gYyB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBmID0gMCxcbiAgICAgICAgICAgICAgICAgICAgZyA9IDA7XG4gICAgICAgICAgICAgICAgd2hpbGUgKChlIHwgMCkgPCAoYyB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgIGYgPSBkWyhhICsgZSkgfCAwXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGcgPSBkWyhiICsgZSkgfCAwXSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGlmICgoZiB8IDApICE9IChnIHwgMCkpXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gKChmIHwgMCkgPiAoZyB8IDApID8gMSA6IC0xKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGUgPSAoZSArIDEpIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgcmV0dXJuIDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjNShiLCBkLCBlKSB7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGYgPSAwLFxuICAgICAgICAgICAgICAgICAgICBnID0gMCxcbiAgICAgICAgICAgICAgICAgICAgaCA9IDA7XG4gICAgICAgICAgICAgICAgZiA9IChiICsgZSkgfCAwO1xuICAgICAgICAgICAgICAgIGlmICgoZSB8IDApID49IDIwKSB7XG4gICAgICAgICAgICAgICAgICAgIGQgPSBkICYgMjU1O1xuICAgICAgICAgICAgICAgICAgICBlID0gYiAmIDM7XG4gICAgICAgICAgICAgICAgICAgIGcgPSBkIHwgKGQgPDwgOCkgfCAoZCA8PCAxNikgfCAoZCA8PCAyNCk7XG4gICAgICAgICAgICAgICAgICAgIGggPSBmICYgfjM7XG4gICAgICAgICAgICAgICAgICAgIGlmIChlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBlID0gKGIgKyA0IC0gZSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUgKChiIHwgMCkgPCAoZSB8IDApKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYVtiXSA9IGQ7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYiA9IChiICsgMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHdoaWxlICgoYiB8IDApIDwgKGggfCAwKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgY1tiID4+IDJdID0gZztcbiAgICAgICAgICAgICAgICAgICAgICAgIGIgPSAoYiArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB3aGlsZSAoKGIgfCAwKSA8IChmIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgYVtiXSA9IGQ7XG4gICAgICAgICAgICAgICAgICAgIGIgPSAoYiArIDEpIHwgMDtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjNihiLCBkLCBlKSB7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGYgPSAwO1xuICAgICAgICAgICAgICAgIGYgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBpZiAoKGIgJiAzKSA9PSAoZCAmIDMpKSB7XG4gICAgICAgICAgICAgICAgICAgIHdoaWxlIChiICYgMykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChlIHwgMCkgPT0gMCkgcmV0dXJuIGYgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgYVtiXSA9IGFbZF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgYiA9IChiICsgMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgZCA9IChkICsgMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICAgICAgZSA9IChlIC0gMSkgfCAwO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIHdoaWxlICgoZSB8IDApID49IDQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGNbYiA+PiAyXSA9IGNbZCA+PiAyXTtcbiAgICAgICAgICAgICAgICAgICAgICAgIGIgPSAoYiArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGQgPSAoZCArIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgICAgIGUgPSAoZSAtIDQpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB3aGlsZSAoKGUgfCAwKSA+IDApIHtcbiAgICAgICAgICAgICAgICAgICAgYVtiXSA9IGFbZF0gfCAwO1xuICAgICAgICAgICAgICAgICAgICBiID0gKGIgKyAxKSB8IDA7XG4gICAgICAgICAgICAgICAgICAgIGQgPSAoZCArIDEpIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgZSA9IChlIC0gMSkgfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gZiB8IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjNyhiLCBjLCBkKSB7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGMgPSBjIHwgMDtcbiAgICAgICAgICAgICAgICBkID0gZCB8IDA7XG4gICAgICAgICAgICAgICAgbGV0IGUgPSAwLFxuICAgICAgICAgICAgICAgICAgICBmID0gMDtcbiAgICAgICAgICAgICAgICB3aGlsZSAoKGUgfCAwKSA8IChkIHwgMCkpIHtcbiAgICAgICAgICAgICAgICAgICAgYVsoYiArIGUpIHwgMF0gPSBmID8gMCA6IGFbKGMgKyBlKSB8IDBdIHwgMDtcbiAgICAgICAgICAgICAgICAgICAgZiA9IGYgPyAxIDogKGFbKGMgKyBlKSB8IDBdIHwgMCkgPT0gMDtcbiAgICAgICAgICAgICAgICAgICAgZSA9IChlICsgMSkgfCAwO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICByZXR1cm4gYiB8IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjOChhLCBiKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICByZXR1cm4gYVdbYSAmIDddKGIgfCAwKSB8IDA7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBjOShhLCBiKSB7XG4gICAgICAgICAgICAgICAgYSA9IGEgfCAwO1xuICAgICAgICAgICAgICAgIGIgPSBiIHwgMDtcbiAgICAgICAgICAgICAgICBhWFthICYgMV0oYiB8IDApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gZGEoYSwgYiwgYywgZCwgZSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgYyA9IGMgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBlID0gZSB8IDA7XG4gICAgICAgICAgICAgICAgcmV0dXJuIGFZW2EgJiA3XShiIHwgMCwgYyB8IDAsIGQgfCAwLCBlIHwgMCkgfCAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gZGIoYSwgYiwgYywgZCkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgYyA9IGMgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICBhWlthICYgMTVdKGIgfCAwLCBjIHwgMCwgZCB8IDApO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gZGMoYSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBhX1thICYgMV0oKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGRkKGEsIGIsIGMpIHtcbiAgICAgICAgICAgICAgICBhID0gYSB8IDA7XG4gICAgICAgICAgICAgICAgYiA9IGIgfCAwO1xuICAgICAgICAgICAgICAgIGMgPSBjIHwgMDtcbiAgICAgICAgICAgICAgICByZXR1cm4gYSRbYSAmIDFdKGIgfCAwLCBjIHwgMCkgfCAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gZGUoYSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICAkKDApO1xuICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gZGYoYSkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICAkKDEpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gZGcoYSwgYiwgYywgZCkge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgYyA9IGMgfCAwO1xuICAgICAgICAgICAgICAgIGQgPSBkIHwgMDtcbiAgICAgICAgICAgICAgICAkKDIpO1xuICAgICAgICAgICAgICAgIHJldHVybiAwO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gZGgoYSwgYiwgYykge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgYyA9IGMgfCAwO1xuICAgICAgICAgICAgICAgICQoMyk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBmdW5jdGlvbiBkaSgpIHtcbiAgICAgICAgICAgICAgICAkKDQpO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgZnVuY3Rpb24gZGooYSwgYikge1xuICAgICAgICAgICAgICAgIGEgPSBhIHwgMDtcbiAgICAgICAgICAgICAgICBiID0gYiB8IDA7XG4gICAgICAgICAgICAgICAgJCg1KTtcbiAgICAgICAgICAgICAgICByZXR1cm4gMDtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gRU1TQ1JJUFRFTl9FTkRfRlVOQ1NcblxuICAgICAgICAgICAgdmFyIGFXID0gW2RlLCBkZSwgY0wsIGRlLCBjSiwgZGUsIGRlLCBkZV07XG4gICAgICAgICAgICB2YXIgYVggPSBbZGYsIGRmXTtcbiAgICAgICAgICAgIHZhciBhWSA9IFtkZywgZGcsIGNJLCBkZywgY0ssIGRnLCBkZywgZGddO1xuICAgICAgICAgICAgdmFyIGFaID0gW1xuICAgICAgICAgICAgICAgIGRoLFxuICAgICAgICAgICAgICAgIGRoLFxuICAgICAgICAgICAgICAgIGJaLFxuICAgICAgICAgICAgICAgIGRoLFxuICAgICAgICAgICAgICAgIGIkLFxuICAgICAgICAgICAgICAgIGRoLFxuICAgICAgICAgICAgICAgIGJfLFxuICAgICAgICAgICAgICAgIGRoLFxuICAgICAgICAgICAgICAgIGJZLFxuICAgICAgICAgICAgICAgIGRoLFxuICAgICAgICAgICAgICAgIGJYLFxuICAgICAgICAgICAgICAgIGRoLFxuICAgICAgICAgICAgICAgIGRoLFxuICAgICAgICAgICAgICAgIGRoLFxuICAgICAgICAgICAgICAgIGRoLFxuICAgICAgICAgICAgICAgIGRoXG4gICAgICAgICAgICBdO1xuICAgICAgICAgICAgdmFyIGFfID0gW2RpLCBkaV07XG4gICAgICAgICAgICB2YXIgYSQgPSBbZGosIGRqXTtcbiAgICAgICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICAgICAgX3N0cmxlbjogYzEsXG4gICAgICAgICAgICAgICAgX3N0cmNhdDogYzMsXG4gICAgICAgICAgICAgICAgX21pZF9jcmVhdGVfb3B0aW9uczogY1YsXG4gICAgICAgICAgICAgICAgX21pZF9pc3RyZWFtX29wZW5fbWVtOiBjTyxcbiAgICAgICAgICAgICAgICBfbWlkX2lzdHJlYW1fb3Blbl9maWxlOiBjTixcbiAgICAgICAgICAgICAgICBfbWlkX3NvbmdfcmVhZF93YXZlOiBiNixcbiAgICAgICAgICAgICAgICBfbWlkX2V4aXQ6IGNaLFxuICAgICAgICAgICAgICAgIF9taWRfc29uZ19ub3RlX29uOiBiMCxcbiAgICAgICAgICAgICAgICBfc3RybmNweTogYzcsXG4gICAgICAgICAgICAgICAgX21lbXNldDogYzUsXG4gICAgICAgICAgICAgICAgX21lbWNweTogYzYsXG4gICAgICAgICAgICAgICAgX21pZF9zb25nX2dldF9taXNzaW5nX2luc3RydW1lbnQ6IGJ1LFxuICAgICAgICAgICAgICAgIF9taWRfaXN0cmVhbV9jbG9zZTogY1IsXG4gICAgICAgICAgICAgICAgX21pZF9zb25nX2ZyZWU6IGNZLFxuICAgICAgICAgICAgICAgIF9taWRfaW5pdDogY1QsXG4gICAgICAgICAgICAgICAgX21pZF9zb25nX2xvYWQ6IGNYLFxuICAgICAgICAgICAgICAgIF9taWRfc29uZ19zdGFydDogYjMsXG4gICAgICAgICAgICAgICAgX21pZF9zb25nX2dldF9udW1fbWlzc2luZ19pbnN0cnVtZW50czogYnQsXG4gICAgICAgICAgICAgICAgX21lbWNtcDogYzQsXG4gICAgICAgICAgICAgICAgX2ZyZWU6IGMwLFxuICAgICAgICAgICAgICAgIF9tYWxsb2M6IGMkLFxuICAgICAgICAgICAgICAgIF9zdHJjcHk6IGMyLFxuICAgICAgICAgICAgICAgIHJ1blBvc3RTZXRzOiBiZyxcbiAgICAgICAgICAgICAgICBzdGFja0FsbG9jOiBhMCxcbiAgICAgICAgICAgICAgICBzdGFja1NhdmU6IGExLFxuICAgICAgICAgICAgICAgIHN0YWNrUmVzdG9yZTogYTIsXG4gICAgICAgICAgICAgICAgc2V0VGhyZXc6IGEzLFxuICAgICAgICAgICAgICAgIHNldFRlbXBSZXQwOiBhNixcbiAgICAgICAgICAgICAgICBzZXRUZW1wUmV0MTogYTcsXG4gICAgICAgICAgICAgICAgc2V0VGVtcFJldDI6IGE4LFxuICAgICAgICAgICAgICAgIHNldFRlbXBSZXQzOiBhOSxcbiAgICAgICAgICAgICAgICBzZXRUZW1wUmV0NDogYmEsXG4gICAgICAgICAgICAgICAgc2V0VGVtcFJldDU6IGJiLFxuICAgICAgICAgICAgICAgIHNldFRlbXBSZXQ2OiBiYyxcbiAgICAgICAgICAgICAgICBzZXRUZW1wUmV0NzogYmQsXG4gICAgICAgICAgICAgICAgc2V0VGVtcFJldDg6IGJlLFxuICAgICAgICAgICAgICAgIHNldFRlbXBSZXQ5OiBiZixcbiAgICAgICAgICAgICAgICBkeW5DYWxsX2lpOiBjOCxcbiAgICAgICAgICAgICAgICBkeW5DYWxsX3ZpOiBjOSxcbiAgICAgICAgICAgICAgICBkeW5DYWxsX2lpaWlpOiBkYSxcbiAgICAgICAgICAgICAgICBkeW5DYWxsX3ZpaWk6IGRiLFxuICAgICAgICAgICAgICAgIGR5bkNhbGxfdjogZGMsXG4gICAgICAgICAgICAgICAgZHluQ2FsbF9paWk6IGRkXG4gICAgICAgICAgICB9O1xuICAgICAgICB9KShcbiAgICAgICAgICAgIC8vIEVNU0NSSVBURU5fRU5EX0FTTVxuXG4gICAgICAgICAgICB7XG4gICAgICAgICAgICAgICAgTWF0aDogTWF0aCxcbiAgICAgICAgICAgICAgICBJbnQ4QXJyYXk6IEludDhBcnJheSxcbiAgICAgICAgICAgICAgICBJbnQxNkFycmF5OiBJbnQxNkFycmF5LFxuICAgICAgICAgICAgICAgIEludDMyQXJyYXk6IEludDMyQXJyYXksXG4gICAgICAgICAgICAgICAgVWludDhBcnJheTogVWludDhBcnJheSxcbiAgICAgICAgICAgICAgICBVaW50MTZBcnJheTogVWludDE2QXJyYXksXG4gICAgICAgICAgICAgICAgVWludDMyQXJyYXk6IFVpbnQzMkFycmF5LFxuICAgICAgICAgICAgICAgIEZsb2F0MzJBcnJheTogRmxvYXQzMkFycmF5LFxuICAgICAgICAgICAgICAgIEZsb2F0NjRBcnJheTogRmxvYXQ2NEFycmF5XG4gICAgICAgICAgICB9LFxuICAgICAgICAgICAge1xuICAgICAgICAgICAgICAgIGFib3J0OiBhYm9ydCxcbiAgICAgICAgICAgICAgICBhc3NlcnQ6IGFzc2VydCxcbiAgICAgICAgICAgICAgICBhc21QcmludEludDogYXNtUHJpbnRJbnQsXG4gICAgICAgICAgICAgICAgYXNtUHJpbnRGbG9hdDogYXNtUHJpbnRGbG9hdCxcbiAgICAgICAgICAgICAgICBtaW46IE1hdGhfbWluLFxuICAgICAgICAgICAgICAgIGludm9rZV9paTogaW52b2tlX2lpLFxuICAgICAgICAgICAgICAgIGludm9rZV92aTogaW52b2tlX3ZpLFxuICAgICAgICAgICAgICAgIGludm9rZV9paWlpaTogaW52b2tlX2lpaWlpLFxuICAgICAgICAgICAgICAgIGludm9rZV92aWlpOiBpbnZva2VfdmlpaSxcbiAgICAgICAgICAgICAgICBpbnZva2VfdjogaW52b2tlX3YsXG4gICAgICAgICAgICAgICAgaW52b2tlX2lpaTogaW52b2tlX2lpaSxcbiAgICAgICAgICAgICAgICBfc3RybmNtcDogX3N0cm5jbXAsXG4gICAgICAgICAgICAgICAgX2xzZWVrOiBfbHNlZWssXG4gICAgICAgICAgICAgICAgX3N5c2NvbmY6IF9zeXNjb25mLFxuICAgICAgICAgICAgICAgIF9mcmVhZDogX2ZyZWFkLFxuICAgICAgICAgICAgICAgIF9mY2xvc2U6IF9mY2xvc2UsXG4gICAgICAgICAgICAgICAgX3N0cnRva19yOiBfc3RydG9rX3IsXG4gICAgICAgICAgICAgICAgX2Fib3J0OiBfYWJvcnQsXG4gICAgICAgICAgICAgICAgX2ZwcmludGY6IF9mcHJpbnRmLFxuICAgICAgICAgICAgICAgIF9jbG9zZTogX2Nsb3NlLFxuICAgICAgICAgICAgICAgIF9wcmVhZDogX3ByZWFkLFxuICAgICAgICAgICAgICAgIF9mZmx1c2g6IF9mZmx1c2gsXG4gICAgICAgICAgICAgICAgX2ZvcGVuOiBfZm9wZW4sXG4gICAgICAgICAgICAgICAgX29wZW46IF9vcGVuLFxuICAgICAgICAgICAgICAgIF9zdHJ0b2w6IF9zdHJ0b2wsXG4gICAgICAgICAgICAgICAgX3N0cnRvazogX3N0cnRvayxcbiAgICAgICAgICAgICAgICBfX19zZXRFcnJObzogX19fc2V0RXJyTm8sXG4gICAgICAgICAgICAgICAgX19yZWFsbHlOZWdhdGl2ZTogX19yZWFsbHlOZWdhdGl2ZSxcbiAgICAgICAgICAgICAgICBfZnNlZWs6IF9mc2VlayxcbiAgICAgICAgICAgICAgICBfc2VuZDogX3NlbmQsXG4gICAgICAgICAgICAgICAgX3dyaXRlOiBfd3JpdGUsXG4gICAgICAgICAgICAgICAgX3N0cnJjaHI6IF9zdHJyY2hyLFxuICAgICAgICAgICAgICAgIF9zaW46IF9zaW4sXG4gICAgICAgICAgICAgICAgX3ByaW50ZjogX3ByaW50ZixcbiAgICAgICAgICAgICAgICBfc3RyY2hyOiBfc3RyY2hyLFxuICAgICAgICAgICAgICAgIF9yZWFkOiBfcmVhZCxcbiAgICAgICAgICAgICAgICBfdGltZTogX3RpbWUsXG4gICAgICAgICAgICAgICAgX19mb3JtYXRTdHJpbmc6IF9fZm9ybWF0U3RyaW5nLFxuICAgICAgICAgICAgICAgIF9hdG9pOiBfYXRvaSxcbiAgICAgICAgICAgICAgICBfcmVjdjogX3JlY3YsXG4gICAgICAgICAgICAgICAgX3B3cml0ZTogX3B3cml0ZSxcbiAgICAgICAgICAgICAgICBfbGx2bV9wb3dfZjY0OiBfbGx2bV9wb3dfZjY0LFxuICAgICAgICAgICAgICAgIF9mc3luYzogX2ZzeW5jLFxuICAgICAgICAgICAgICAgIF9fX2Vycm5vX2xvY2F0aW9uOiBfX19lcnJub19sb2NhdGlvbixcbiAgICAgICAgICAgICAgICBfaXNzcGFjZTogX2lzc3BhY2UsXG4gICAgICAgICAgICAgICAgX3Nicms6IF9zYnJrLFxuICAgICAgICAgICAgICAgIF9fcGFyc2VJbnQ6IF9fcGFyc2VJbnQsXG4gICAgICAgICAgICAgICAgX2Z3cml0ZTogX2Z3cml0ZSxcbiAgICAgICAgICAgICAgICBfc3RyY21wOiBfc3RyY21wLFxuICAgICAgICAgICAgICAgIFNUQUNLVE9QOiBTVEFDS1RPUCxcbiAgICAgICAgICAgICAgICBTVEFDS19NQVg6IFNUQUNLX01BWCxcbiAgICAgICAgICAgICAgICB0ZW1wRG91YmxlUHRyOiB0ZW1wRG91YmxlUHRyLFxuICAgICAgICAgICAgICAgIEFCT1JUOiBBQk9SVCxcbiAgICAgICAgICAgICAgICBOYU46IE5hTixcbiAgICAgICAgICAgICAgICBJbmZpbml0eTogSW5maW5pdHksXG4gICAgICAgICAgICAgICAgX3N0ZGVycjogX3N0ZGVyclxuICAgICAgICAgICAgfSxcbiAgICAgICAgICAgIGJ1ZmZlclxuICAgICAgICApO1xuICAgICAgICB2YXIgX3N0cmxlbiA9IChNb2R1bGVbJ19zdHJsZW4nXSA9IGFzbVsnX3N0cmxlbiddKTtcbiAgICAgICAgdmFyIF9zdHJjYXQgPSAoTW9kdWxlWydfc3RyY2F0J10gPSBhc21bJ19zdHJjYXQnXSk7XG4gICAgICAgIE1vZHVsZVsnX21pZF9jcmVhdGVfb3B0aW9ucyddID0gYXNtWydfbWlkX2NyZWF0ZV9vcHRpb25zJ107XG4gICAgICAgIE1vZHVsZVsnX21pZF9pc3RyZWFtX29wZW5fbWVtJ10gPSBhc21bJ19taWRfaXN0cmVhbV9vcGVuX21lbSddO1xuICAgICAgICBNb2R1bGVbJ19taWRfaXN0cmVhbV9vcGVuX2ZpbGUnXSA9IGFzbVsnX21pZF9pc3RyZWFtX29wZW5fZmlsZSddO1xuICAgICAgICBNb2R1bGVbJ19taWRfc29uZ19yZWFkX3dhdmUnXSA9IGFzbVsnX21pZF9zb25nX3JlYWRfd2F2ZSddO1xuICAgICAgICBNb2R1bGVbJ19taWRfZXhpdCddID0gYXNtWydfbWlkX2V4aXQnXTtcbiAgICAgICAgTW9kdWxlWydfbWlkX3Nvbmdfbm90ZV9vbiddID0gYXNtWydfbWlkX3Nvbmdfbm90ZV9vbiddO1xuICAgICAgICB2YXIgX3N0cm5jcHkgPSAoTW9kdWxlWydfc3RybmNweSddID0gYXNtWydfc3RybmNweSddKTtcbiAgICAgICAgdmFyIF9tZW1zZXQgPSAoTW9kdWxlWydfbWVtc2V0J10gPSBhc21bJ19tZW1zZXQnXSk7XG4gICAgICAgIHZhciBfbWVtY3B5ID0gKE1vZHVsZVsnX21lbWNweSddID0gYXNtWydfbWVtY3B5J10pO1xuICAgICAgICBNb2R1bGVbJ19taWRfc29uZ19nZXRfbWlzc2luZ19pbnN0cnVtZW50J10gPVxuICAgICAgICAgICAgYXNtWydfbWlkX3NvbmdfZ2V0X21pc3NpbmdfaW5zdHJ1bWVudCddO1xuICAgICAgICBNb2R1bGVbJ19taWRfaXN0cmVhbV9jbG9zZSddID0gYXNtWydfbWlkX2lzdHJlYW1fY2xvc2UnXTtcbiAgICAgICAgTW9kdWxlWydfbWlkX3NvbmdfZnJlZSddID0gYXNtWydfbWlkX3NvbmdfZnJlZSddO1xuICAgICAgICBNb2R1bGVbJ19taWRfaW5pdCddID0gYXNtWydfbWlkX2luaXQnXTtcbiAgICAgICAgTW9kdWxlWydfbWlkX3NvbmdfbG9hZCddID0gYXNtWydfbWlkX3NvbmdfbG9hZCddO1xuICAgICAgICBNb2R1bGVbJ19taWRfc29uZ19zdGFydCddID0gYXNtWydfbWlkX3Nvbmdfc3RhcnQnXTtcbiAgICAgICAgTW9kdWxlWydfbWlkX3NvbmdfZ2V0X251bV9taXNzaW5nX2luc3RydW1lbnRzJ10gPVxuICAgICAgICAgICAgYXNtWydfbWlkX3NvbmdfZ2V0X251bV9taXNzaW5nX2luc3RydW1lbnRzJ107XG4gICAgICAgIHZhciBfbWVtY21wID0gKE1vZHVsZVsnX21lbWNtcCddID0gYXNtWydfbWVtY21wJ10pO1xuICAgICAgICBNb2R1bGVbJ19mcmVlJ10gPSBhc21bJ19mcmVlJ107XG4gICAgICAgIHZhciBfbWFsbG9jID0gKE1vZHVsZS5fbWFsbG9jID0gYXNtWydfbWFsbG9jJ10pO1xuICAgICAgICB2YXIgX3N0cmNweSA9IChNb2R1bGVbJ19zdHJjcHknXSA9IGFzbVsnX3N0cmNweSddKTtcbiAgICAgICAgY29uc3QgcnVuUG9zdFNldHMgPSAoTW9kdWxlWydydW5Qb3N0U2V0cyddID0gYXNtWydydW5Qb3N0U2V0cyddKTtcblxuICAgICAgICBNb2R1bGVbJ2R5bkNhbGxfaWknXSA9IGFzbVsnZHluQ2FsbF9paSddO1xuICAgICAgIC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3NlcnQoXG4gICAgICAgICAgICAgICAgX19BVFBSRVJVTl9fLmxlbmd0aCA9PSAwLFxuICAgICAgICAgICAgICAgICdjYW5ub3QgY2FsbCBtYWluIHdoZW4gcHJlUnVuIGZ1bmN0aW9ucyByZW1haW4gdG8gYmUgY2FsbGVkJ1xuICAgICAgICAgICAgKTtcbiAgICAgICAgICAgIGFyZ3MgPSBhcmdzIHx8IFtdO1xuICAgICAgICAgICAgZW5zdXJlSW5pdFJ1bnRpbWUoKTtcbiAgICAgICAgICAgIGNvbnN0IGFyZ2MgPSBhcmdzLmxlbmd0aCArIDE7XG4gICAgICAgICAgICBmdW5jdGlvbiBwYWQoKSB7XG4gICAgICAgICAgICAgICAgZm9yIChsZXQgaSA9IDA7IGkgPCA0IC0gMTsgaSsrKSB7XG4gICAgICAgICAgICAgICAgICAgIGFyZ3YucHVzaCgwKTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICB2YXIgYXJndiA9IFtcbiAgICAgICAgICAgICAgICBhbGxvY2F0ZShcbiAgICAgICAgICAgICAgICAgICAgaW50QXJyYXlGcm9tU3RyaW5nKCcvYmluL3RoaXMucHJvZ3JhbScpLFxuICAgICAgICAgICAgICAgICAgICAnaTgnLFxuICAgICAgICAgICAgICAgICAgICBBTExPQ19OT1JNQUxcbiAgICAgICAgICAgICAgICApXG4gICAgICAgICAgICBdO1xuICAgICAgICAgICAgcGFkKCk7XG4gICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IGFyZ2MgLSAxOyBpID0gaSArIDEpIHtcbiAgICAgICAgICAgICAgICBhcmd2LnB1c2goXG4gICAgICAgICAgICAgICAgICAgIGFsbG9jYXRlKGludEFycmF5RnJvbVN0cmluZyhhcmdzW2ldKSwgJ2k4JywgQUxMT0NfTk9STUFMKVxuICAgICAgICAgICAgICAgICk7XG4gICAgICAgICAgICAgICAgcGFkKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBhcmd2LnB1c2goMCk7XG4gICAgICAgICAgICBhcmd2ID0gYWxsb2NhdGUoYXJndiwgJ2kzMicsIEFMTE9DX05PUk1BTCk7XG4gICAgICAgICAgICBpbml0aWFsU3RhY2tUb3AgPSBTVEFDS1RPUDtcbiAgICAgICAgICAgIHRyeSB7XG4gICAgICAgICAgICAgICAgY29uc3QgcmV0ID0gTW9kdWxlWydfbWFpbiddKGFyZ2MsIGFyZ3YsIDApO1xuICAgICAgICAgICAgICAgIC8vIGlmIHdlJ3JlIG5vdCBydW5uaW5nIGFuIGV2ZW50ZWQgbWFpbiBsb29wLCBpdCdzIHRpbWUgdG8gZXhpdFxuICAgICAgICAgICAgICAgIGlmICghTW9kdWxlWydub0V4aXRSdW50aW1lJ10pIHtcbiAgICAgICAgICAgICAgICAgICAgZXhpdChyZXQpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0gY2F0Y2ggKGUpIHtcbiAgICAgICAgICAgICAgICBpZiAoZSBpbnN0YW5jZW9mIEV4aXRTdGF0dXMpIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gZXhpdCgpIHRocm93cyB0aGlzIG9uY2UgaXQncyBkb25lIHRvIG1ha2Ugc3VyZSBleGVjdXRpb24gaGFzIGJlZW4gc3RvcHBlZCBjb21wbGV0ZWx5XG4gICAgICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKGUgPT0gJ1NpbXVsYXRlSW5maW5pdGVMb29wJykge1xuICAgICAgICAgICAgICAgICAgICAvLyBydW5uaW5nIGFuIGV2ZW50ZWQgbWFpbiBsb29wLCBkb24ndCBpbW1lZGlhdGVseSBleGl0XG4gICAgICAgICAgICAgICAgICAgIE1vZHVsZVsnbm9FeGl0UnVudGltZSddID0gdHJ1ZTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHRocm93IGU7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9O1xuXG4gICAgICAgIGZ1bmN0aW9uIHJ1bihhcmdzKSB7XG4gICAgICAgICAgICBhcmdzID0gYXJncyB8fCBNb2R1bGVbJ2FyZ3VtZW50cyddO1xuICAgICAgICAgICAgaWYgKHJ1bkRlcGVuZGVuY2llcyA+IDApIHtcbiAgICAgICAgICAgICAgICBjb25zb2xlLndhcm4oXG4gICAgICAgICAgICAgICAgICAgICdydW4oKSBjYWxsZWQsIGJ1dCBkZXBlbmRlbmNpZXMgcmVtYWluLCBzbyBub3QgcnVubmluZydcbiAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIHJldHVybiBGUztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHByZVJ1bigpO1xuICAgICAgICAgICAgaWYgKHJ1bkRlcGVuZGVuY2llcyA+IDApIHtcbiAgICAgICAgICAgICAgICAvLyBhIHByZVJ1biBhZGRlZCBhIGRlcGVuZGVuY3ksIHJ1biB3aWxsIGJlIGNhbGxlZCBsYXRlclxuICAgICAgICAgICAgICAgIHJldHVybiBGUztcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIGZ1bmN0aW9uIGRvUnVuKCkge1xuICAgICAgICAgICAgICAgIGVuc3VyZUluaXRSdW50aW1lKCk7XG4gICAgICAgICAgICAgICAgcHJlTWFpbigpO1xuICAgICAgICAgICAgICAgIGNhbGxlZFJ1biA9IHRydWU7XG4gICAgICAgICAgICAgICAgaWYgKE1vZHVsZVsnX21haW4nXSAmJiBzaG91bGRSdW5Ob3cpIHtcbiAgICAgICAgICAgICAgICAgICAgTW9kdWxlWydjYWxsTWFpbiddKGFyZ3MpO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBwb3N0UnVuKCk7XG4gICAgICAgICAgICB9XG4gICAgICAgICAgICBpZiAoTW9kdWxlWydzZXRTdGF0dXMnXSkge1xuICAgICAgICAgICAgICAgIE1vZHVsZVsnc2V0U3RhdHVzJ10oJ1J1bm5pbmcuLi4nKTtcbiAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICBzZXRUaW1lb3V0KGZ1bmN0aW9uKCkge1xuICAgICAgICAgICAgICAgICAgICAgICAgTW9kdWxlWydzZXRTdGF0dXMnXSgnJyk7XG4gICAgICAgICAgICAgICAgICAgIH0sIDEpO1xuICAgICAgICAgICAgICAgICAgICBpZiAoIUFCT1JUKSBkb1J1bigpO1xuICAgICAgICAgICAgICAgIH0sIDEpO1xuICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICBkb1J1bigpO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gRlM7XG4gICAgICAgIH1cblxuICAgICAgICBNb2R1bGUucnVuID0gcnVuO1xuXG4gICAgICAgIC8qKlxuICAgICAgICAgKiBJbml0aWFsaXplcyB0aGUgbGlicmFyeS5cbiAgICAgICAgICogQGZ1bmN0aW9uIGluaXRcbiAgICAgICAgICogQG1lbWJlcm9mIExpYlRpTWlkaXR5XG4gICAgICAgICAqIEBwYXJhbSB7Ym9vbGVhbn0gW3Rocm93RXJyb3IgPSB0cnVlXSBUaHJvdyBhbiBlcnJvciBpZiBmaWxlL2ZvbGRlciBjcmVhdGlvbiBmYWlsZWQuXG4gICAgICAgICAqIEBpbnN0YW5jZVxuICAgICAgICAgKi9cbiAgICAgICAgTW9kdWxlLmluaXQgPSBmdW5jdGlvbih0aHJvd0Vycm9yID0gdHJ1ZSkge1xuICAgICAgICAgICAgLy8gY3JlYXRlcyBmb2xkZXJzIGZvciBpbnN0cnVtZW50IHBhdGNoZXNcbiAgICAgICAgICAgIE1vZHVsZS5jcmVhdGVQYXRoKCcvJywgTElCVElNSURJVFlfUEFUQ0hfRElSRUNUT1JZLCB0aHJvd0Vycm9yKTtcbiAgICAgICAgICAgIE1vZHVsZS5jcmVhdGVQYXRoKFxuICAgICAgICAgICAgICAgIGAvJHtMSUJUSU1JRElUWV9QQVRDSF9ESVJFQ1RPUll9YCxcbiAgICAgICAgICAgICAgICBMSUJUSU1JRElUWV9QQVRDSF9EUlVNX0RJUkVDVE9SWSxcbiAgICAgICAgICAgICAgICB0aHJvd0Vycm9yXG4gICAgICAgICAgICApO1xuXG4gICAgICAgICAgICAvLyBjcmVhdGVzIGNvbmZpZyBmaWxlXG4gICAgICAgICAgICBNb2R1bGUuY3JlYXRlRGF0YUZpbGUoXG4gICAgICAgICAgICAgICAgJy8nLFxuICAgICAgICAgICAgICAgIExJQlRJTUlESVRZX0NPTkZJR19GSUxFLFxuICAgICAgICAgICAgICAgIExJQlRJTUlESVRZX0NPTkZJR19EQVRBLFxuICAgICAgICAgICAgICAgIHRydWUsXG4gICAgICAgICAgICAgICAgdHJ1ZSxcbiAgICAgICAgICAgICAgICB1bmRlZmluZWQsXG4gICAgICAgICAgICAgICAgdGhyb3dFcnJvclxuICAgICAgICAgICAgKTtcbiAgICAgICAgfTtcblxuICAgICAgICAvLyBzaG91bGRSdW5Ob3cgcmVmZXJzIHRvIGNhbGxpbmcgbWFpbigpLCBub3QgcnVuKCkuXG4gICAgICAgIHZhciBzaG91bGRSdW5Ob3cgPSB0cnVlO1xuXG4gICAgICAgIGlmIChNb2R1bGVbJ25vSW5pdGlhbFJ1biddKSB7XG4gICAgICAgICAgICBzaG91bGRSdW5Ob3cgPSBmYWxzZTtcbiAgICAgICAgfVxuXG4gICAgICAgIE1vZHVsZS5GUyA9IHJ1bigpO1xuXG4gICAgICAgIHRoaXMuTW9kdWxlID0gTW9kdWxlO1xuICAgIH1cbn1cblxuY29uc3QgbGlidGltaWRpdHkgPSBuZXcgTGliVGlNaWRpdHkoKTtcblxuZXhwb3J0IGRlZmF1bHQgbGlidGltaWRpdHkuTW9kdWxlO1xuIiwiZXhwb3J0IGNvbnN0IE1JRElfSU5JVCA9ICdNSURJX0lOSVQnO1xuXG5leHBvcnQgY29uc3QgTUlESV9FUlJP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gY29uc3QgcGxheWVySWQgPSB1dWlkKCk7XG4gICAgICAgICAgICB0aGlzLnBsYXllcklkID0gcGxheWVySWQ7XG4gICAgICAgICAgICB0aGlzLmV2ZW50SGFuZGxlciA9IG5ldyBFdmVudEhhbmRsZXIoe1xuICAgICAgICAgICAgICAgIGV2ZW50TG9nZ2VyLFxuICAgICAgICAgICAgICAgIGxvZ2dpbmcsXG4gICAgICAgICAgICAgICAgcGxheWVySWRcbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgY29uc29sZS5lcnJvcignRmF0YWwgZXJyb3IuIENvdWxkIG5vdCBpbml0aWFsaXplIGV2ZW50IGhhbmRsZXIuJyk7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB0cnkge1xuICAgICAgICAgICAgdGhpcy5ldmVudExvZ2dlciA9IGV2ZW50TG9nZ2VyO1xuICAgICAgICAgICAgdGhpcy5sb2dnaW5nID0gbG9nZ2luZztcbiAgICAgICAgICAgIHRoaXMucGF0Y2hVcmwgPSBwYXRjaFVybDtcbiAgICAgICAgICAgIHRoaXMudm9sdW1lID0gdm9sdW1lO1xuICAgICAgICAgICAgdGhpcy5zdGFydFRpbWUgPSAwO1xuXG4gICAgICAgICAgICBMaWJUaU1pZGl0eS5pbml0KGlzRmlyc3RJbnN0YW5jZSk7XG5cbiAgICAgICAgICAgIHRoaXMuaXNGaXJzdEluc3RhbmNlID0gaXNGaXJzdEluc3RhbmNlO1xuICAgICAgICAgICAgaWYgKGlzRmlyc3RJbnN0YW5jZSkge1xuICAgICAgICAgICAgICAgIGlzRmlyc3RJbnN0YW5jZSA9IGZhbHNlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLmV2ZW50SGFuZGxlci5lbWl0SW5pdCgpO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgdGhpcy5ldmVudEhhbmRsZXIuZW1pdE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Q29udGV4dCkoKTtcbiAgICAgICAgICAgIHRoaXMuc2FtcGxlUmF0ZSA9IHRoaXMuY29udGV4dC5zYW1wbGVSYXRlO1xuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICB0aGlzLmV2ZW50SGFuZGxlci5lbWl0RXJyb3Ioe1xuICAgICAgICAgICAgICAgIG1lc3NhZ2U6IGBDb3VsZCBub3Qgc2V0IEF1ZGlvQ29udGV4dC5gLFxuICAgICAgICAgICAgICAgIGVycm9yXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGlzU291cmNlVmFsaWQoeyBhcnJheUJ1ZmZlciwgdXJsIH0pIHtcbiAgICAgICAgaWYgKCFhcnJheUJ1ZmZlciAmJiAhdXJsKSB7XG4gICAgICAgICAgICB0aGlzLmV2ZW50SGFuZGxlci5lbWl0RXJyb3Ioe1xuICAgICAgICAgICAgICAgIG1lc3NhZ2U6XG4gICAgICAgICAgICAgICAgICAgIFwiVW5rbm93biBzb3VyY2UuIFVSTCBvciBhcnJheSBidWZmZXIgY2FuJ3QgYmUgYm90aCB1bmRlZmluZWQgdG8gc3RhcnQgcGxheWJhY2suXCJcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG5cbiAgICAgICAgaWYgKGFycmF5QnVmZmVyICYmIHVybCkge1xuICAgICAgICAgICAgdGhpcy5ldmVudEhhbmRsZXIuZW1pdEVycm9yKHtcbiAgICAgICAgICAgICAgICBtZXNzYWdlOlxuICAgICAgICAgICAgICAgICAgICAnQW1iaWd1b3VzIHNvdXJjZS4gTUlESSBkYXRhIG11c3Qgb3JpZ2luYXRlIGVpdGhlciBmcm9tIGEgVVJMIG9yIGFuIGFycmF5IGJ1ZmZlciB0byBzdGFydCBwbGF5YmFjay4gTm90IGJvdGguJ1xuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG5cbiAgICBhc3luYyBnZXRTb3VyY2UoeyBhcnJheUJ1ZmZlciwgdXJsIH0pIHtcbiAgICAgICAgaWYgKGFycmF5QnVmZmVyKSB7XG4gICAgICAgICAgICByZXR1cm4gYXJyYXlCdWZmZXI7XG4gICAgICAgIH1cblxuICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29uc3QgcmVzcG9uc2UgPSBhd2FpdCBmZXRjaCh1cmwpO1xuICAgICAgICAgICAgaWYgKHJlc3BvbnNlLnN0YXR1cyAhPT0gMjAwKSB7XG4gICAgICAgICAgICAgICAgdGhpcy5ldmVudEhhbmRsZXIuZW1pdEVycm9yKHtcbiAgICAgICAgICAgICAgICAgICAgbWVzc2FnZTogYENvdWxkIG5vdCByZXRyaWV2ZSBNSURJJHtNaWRpUGxheWVyLmZvcm1hdE1pZGlOYW1lKFxuICAgICAgICAgICAgICAgICAgICAgICAgbmFtZVxuICAgICAgICAgICAgICAgICAgICApfS5gLFxuICAgICAgICAgICAgICAgICAgICBlcnJvcjogYFN0YXR1cyBjb2RlOiAke3Jlc3BvbnNlLnN0YXR1c30uYFxuICAgICAgICAgICAgICAgIH0pO1xuXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICByZXR1cm4gcmVzcG9uc2UuYXJyYXlCdWZmZXIoKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgIHRoaXMuZXZlbnRIYW5kbGVyLmVtaXRFcnJvcih7XG4gICAgICAgICAgICAgICAgbWVzc2FnZTogYENvdWxkIG5vdCByZXRyaWV2ZSBNSURJJHtNaWRpUGxheWVyLmZvcm1hdE1pZGlOYW1lKFxuICAgICAgICAgICAgICAgICAgICBuYW1lXG4gICAgICAgICAgICAgICAgKX0uYCxcbiAgICAgICAgICAgICAgICBlcnJvclxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICByZXR1cm4gbnVsbDtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIGFzeW5jIGxvYWRTb25nKHsgYXJyYXlCdWZmZXIgfSkge1xuICAgICAgICB0aGlzLm1pZGlGaWxlQXJyYXkgPSBuZXcgSW50OEFycmF5KGFycmF5QnVmZmVyKTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgICAgY29uc3Qgb3B0aW9ucyA9IHRoaXMuaGFuZGxlU3RyZWFtKCk7XG4gICAgICAgICAgICBhd2FpdCB0aGlzLmdldEluc3RydW1lbnRQYXRjaGVzKCk7XG5cbiAgICAgICAgICAgIC8vIHdlIG5lZWQgdG8gcmVsb2FkIHRoZSBNSURJIG9uY2UgdGhlIGluc3RydW1lbnQgcGF0Y2hlcyBoYXZlIGJlZW4gbG9hZGVkXG4gICAgICAgICAgICB0aGlzLnN0cmVhbSA9IExpYlRpTWlkaXR5LmNhbGwoXG4gICAgICAgICAgICAgICAgJ21pZF9pc3RyZWFtX29wZW5fbWVtJyxcbiAgICAgICAgICAgICAgICAnbnVtYmVyJyxcbiAgICAgICAgICAgICAgICBbJ251bWJlcicsICdudW1iZXInLCAnbnVtYmVyJ10sXG4gICAgICAgICAgICAgICAgW3RoaXMubWlkaUZpbGVCdWZmZXIsIHRoaXMubWlkaUZpbGVBcnJheS5sZW5ndGgsIGZhbHNlXVxuICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgdGhpcy5zb25nID0gTGliVGlNaWRpdHkuY2FsbChcbiAgICAgICAgICAgICAgICAnbWlkX3NvbmdfbG9hZCcsXG4gICAgICAgICAgICAgICAgJ251bWJlcicsXG4gICAgICAgICAgICAgICAgWydudW1iZXInLCAnbnVtYmVyJ10sXG4gICAgICAgICAgICAgICAgW3RoaXMuc3RyZWFtLCBvcHRpb25zXVxuICAgICAgICAgICAgKTtcblxuICAgICAgICAgICAgTGliVGlNaWRpdHkuY2FsbChcbiAgICAgICAgICAgICAgICAnbWlkX2lzdHJlYW1fY2xvc2UnLFxuICAgICAgICAgICAgICAgICdudW1iZXInLFxuICAgICAgICAgICAgICAgIFsnbnVtYmVyJ10sXG4gICAgICAgICAgICAgICAgW3RoaXMuc3RyZWFtXVxuICAgICAgICAgICAgKTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgIHRoaXMuZXZlbnRIYW5kbGVyLmVtaXRFcnJvcih7XG4gICAgICAgICAgICAgICAgbWVzc2FnZTogJ0NvdWxkIG5vdCBsb2FkIHNvbmcuJyxcbiAgICAgICAgICAgICAgICBlcnJvclxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICByZXR1cm4gZmFsc2U7XG4gICAgICAgIH1cblxuICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICB9XG5cbiAgICBoYW5kbGVTdHJlYW0oKSB7XG4gICAgICAgIHRoaXMubWlkaUZpbGVCdWZmZXIgPSBMaWJUaU1pZGl0eS5fbWFsbG9jKHRoaXMubWlkaUZpbGVBcnJheS5sZW5ndGgpO1xuXG4gICAgICAgIExpYlRpTWlkaXR5LndyaXRlQXJyYXlUb01lbW9yeSh0aGlzLm1pZGlGaWxlQXJyYXksIHRoaXMubWlkaUZpbGVCdWZmZXIpO1xuICAgICAgICBMaWJUaU1pZGl0eS5jYWxsKCdtaWRfaW5pdCcsICdudW1iZXInLCBbXSwgW10pO1xuXG4gICAgICAgIHRoaXMuc3RyZWFtID0gTGliVGlNaWRpdHkuY2FsbChcbiAgICAgICAgICAgICdtaWRfaXN0cmVhbV9vcGVuX21lbScsXG4gICAgICAgICAgICAnbnVtYmVyJyxcbiAgICAgICAgICAgIFsnbnVtYmVyJywgJ251bWJlcicsICdudW1iZXInXSxcbiAgICAgICAgICAgIFt0aGlzLm1pZGlGaWxlQnVmZmVyLCB0aGlzLm1pZGlGaWxlQXJyYXkubGVuZ3RoLCBmYWxzZV1cbiAgICAgICAgKTtcblxuICAgICAgICBjb25zdCBvcHRpb25zID0gTGliVGlNaWRpdHkuY2FsbChcbiAgICAgICAgICAgICdtaWRfY3JlYXRlX29wdGlvbnMnLFxuICAgICAgICAgICAgJ251bWJlcicsXG4gICAgICAgICAgICBbJ251bWJlcicsICdudW1iZXInLCAnbnVtYmVyJywgJ251bWJlciddLFxuICAgICAgICAgICAgW3RoaXMuc2FtcGxlUmF0ZSwgTUlESV9BVURJT19TMTZMU0IsIDEsIE1JRElfQVVESU9fQlVGRkVSX1NJWkUgKiAyXVxuICAgICAgICApO1xuXG4gICAgICAgIHRoaXMuc29uZyA9IExpYlRpTWlkaXR5LmNhbGwoXG4gICAgICAgICAgICAnbWlkX3NvbmdfbG9hZCcsXG4gICAgICAgICAgICAnbnVtYmVyJyxcbiAgICAgICAgICAgIFsnbnVtYmVyJywgJ251bWJlciddLFxuICAgICAgICAgICAgW3RoaXMuc3RyZWFtLCBvcHRpb25zXVxuICAgICAgICApO1xuXG4gICAgICAgIExpYlRpTWlkaXR5LmNhbGwoXG4gICAgICAgICAgICAnbWlkX2lzdHJlYW1fY2xvc2UnLFxuICAgICAgICAgICAgJ251bWJlcicsXG4gICAgICAgICAgICBbJ251bWJlciddLFxuICAgICAgICAgICAgW3RoaXMuc3RyZWFtXVxuICAgICAgICApO1xuXG4gICAgICAgIHJldHVybiBvcHRpb25zO1xuICAgIH1cblxuICAgIGFzeW5jIGdldEluc3RydW1lbnRQYXRjaGVzKCkge1xuICAgICAgICBjb25zdCBtaXNzaW5nUGF0Y2hDb3VudCA9IExpYlRpTWlkaXR5LmNhbGwoXG4gICAgICAgICAgICAnbWlkX3NvbmdfZ2V0X251bV9taXNzaW5nX2luc3RydW1lbnRzJyxcbiAgICAgICAgICAgICdudW1iZXInLFxuICAgICAgICAgICAgWydudW1iZXInXSxcbiAgICAgICAgICAgIFt0aGlzLnNvbmddXG4gICAgICAgICk7XG5cbiAgICAgICAgaWYgKG1pc3NpbmdQYXRjaENvdW50ID4gMCkge1xuICAgICAgICAgICAgdGhpcy5ldmVudEhhbmRsZXIuZW1pdExvYWRQYXRjaCh7XG4gICAgICAgICAgICAgICAgbWVzc2FnZTogYExvYWRpbmcgJHttaXNzaW5nUGF0Y2hDb3VudH0gaW5zdHJ1bWVudCBwYXRjaGVzLi4uYFxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIGZvciAobGV0IGkgPSAwOyBpIDwgbWlzc2luZ1BhdGNoQ291bnQ7IGkrKykge1xuICAgICAgICAgICAgICAgIGNvbnN0IG1pc3NpbmdQYXRjaCA9IExpYlRpTWlkaXR5LmNhbGwoXG4gICAgICAgICAgICAgICAgICAgICdtaWRfc29uZ19nZXRfbWlzc2luZ19pbnN0cnVtZW50JyxcbiAgICAgICAgICAgICAgICAgICAgJ3N0cmluZycsXG4gICAgICAgICAgICAgICAgICAgIFsnbnVtYmVyJywgJ251bWJlciddLFxuICAgICAgICAgICAgICAgICAgICBbdGhpcy5zb25nLCBpXVxuICAgICAgICAgICAgICAgICk7XG5cbiAgICAgICAgICAgICAgICB0cnkge1xuICAgICAgICAgICAgICAgICAgICBhd2FpdCBMaWJUaU1pZGl0eS5sb2FkUGF0Y2hGcm9tVXJsKFxuICAgICAgICAgICAgICAgICAgICAgICAgdGhpcy5wYXRjaFVybCxcbiAgICAgICAgICAgICAgICAgICAgICAgIG1pc3NpbmdQYXRjaFxuICAgICAgICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZXZlbnRIYW5kbGVyLmVtaXRFcnJvcih7XG4gICAgICAgICAgICAgICAgICAgICAgICBtZXNzYWdlOiBgQ291bGQgbm90IHJldHJpZXZlIG1pc3NpbmcgaW5zdHJ1bWVudCBwYXRjaCAke1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1pc3NpbmdQYXRjaCA/IGAnJHttaXNzaW5nUGF0Y2h9J2AgOiBgIyR7aX1gXG4gICAgICAgICAgICAgICAgICAgICAgICB9LmAsXG4gICAgICAgICAgICAgICAgICAgICAgICBlcnJvclxuICAgICAgICAgICAgICAgICAgICB9KTtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cbiAgICAgICAgfVxuICAgIH1cblxuICAgIGluaXRQbGF5YmFjayA9ICgpID0+IHtcbiAgICAgICAgTGliVGlNaWRpdHkuY2FsbCgnbWlkX3Nvbmdfc3RhcnQnLCAndm9pZCcsIFsnbnVtYmVyJ10sIFt0aGlzLnNvbmddKTtcblxuICAgICAgICB0cnkge1xuICAgICAgICAgICAgdGhpcy5jb25uZWN0U291cmNlKCk7XG4gICAgICAgICAgICB0aGlzLndhdmVCdWZmZXIgPSBMaWJUaU1pZGl0eS5fbWFsbG9jKE1JRElfQVVESU9fQlVGRkVSX1NJWkUgKiAyKTtcbiAgICAgICAgICAgIHRoaXMuc3RhcnRUaW1lID0gdGhpcy5jb250ZXh0LmN1cnJlbnRUaW1lO1xuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgdGhpcy5ldmVudEhhbmRsZXIuZW1pdEVycm9yKHtcbiAgICAgICAgICAgICAgICBtZXNzYWdlOiAnQ291bGQgbm90IGluaXRpYWxpemUgcGxheWJhY2suJyxcbiAgICAgICAgICAgICAgICBlcnJvclxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICByZXR1cm47XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLmV2ZW50SGFuZGxlci5lbWl0UGxheSh7IHRpbWU6IDAgfSk7XG4gICAgfTtcblxuICAgIC8vIGNyZWF0ZXMgc2NyaXB0IHByb2Nlc3NvciB3aXRoIGF1dG8gYnVmZmVyIHNpemUgYW5kIGEgc2luZ2xlIG91dHB1dCBjaGFubmVsXG4gICAgY29ubmVjdFNvdXJjZSA9ICgpID0+IHtcbiAgICA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WN0cyB0aGUgZ2FpbiBub2RlIChjb250cm9scyB2b2x1bWUpIHRvIHRoZSBjb250ZXh0J3MgZGVzdGluYXRpb24gKHRoZSBzcGVha2VycylcbiAgICAgICAgdGhpcy5nYWluTm9kZS5jb25uZWN0KHRoaXMuY29udGV4dC5kZXN0aW5hdGlvbik7XG5cbiAgICAgICAgLy8gY29ubmVjdHMgdGhlIHNvdXJjZSB0byB0aGUgZ2FpbiBub2RlXG4gICAgICAgIHRoaXMuc291cmNlLmNvbm5lY3QodGhpcy5nYWluTm9kZSk7XG4gICAgfVxuXG4gICAgaGFuZGxlT3V0cHV0KHsgb3V0cHV0QnVmZmVyIH0pIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGNvbnN0IHRpbWUgPSB0aGlzLmNvbnRleHQuY3VycmVudFRpbWUgLSB0aGlzLnN0YXJ0VGltZTtcblxuICAgICAgICAgICAgdGhpcy5ldmVudEhhbmRsZXIuZW1pdFBsYXkoeyB0aW1lIH0pO1xuXG4gICAgICAgICAgICAvLyBjb2xsZWN0IG5ldyB3YXZlIGRhdGEgZnJvbSBMaWJUaU1pZGl0eSBpbnRvIHdhdmVCdWZmZXJcbiAgICAgICAgICAgIGNvbnN0IHJlYWRXYXZlQnl0ZXMgPSBMaWJUaU1pZGl0eS5jYWxsKFxuICAgICAgICAgICAgICAgICdtaWRfc29uZ19yZWFkX3dhdmUnLFxuICAgICAgICAgICAgICAgICdudW1iZXInLFxuICAgICAgICAgICAgICAgIFsnbnVtYmVyJywgJ251bWJlcicsICdudW1iZXInLCAnbnVtYmVyJ10sXG4gICAgICAgICAgICAgICAgW3RoaXMuc29uZywgdGhpcy53YXZlQnVmZmVyLCBNSURJX0FVRElPX0JVRkZFUl9TSVpFICogMiwgZmFsc2VdXG4gICAgICAgICAgICApO1xuXG4gICAgICAgICAgICBpZiAocmVhZFdhdmVCeXRlcyA9PT0gMCkge1xuICAgICAgICAgICAgICAgIHRoaXMuc3RvcCgpO1xuICAgICAgICAgICAgICAgIHRoaXMuZXZlbnRIYW5kbGVyLmVtaXRFbmQoeyB0aW1lIH0pO1xuICAgICAgICAgICAgICAgIHJldHVybjtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgLy8gbG9vcCB0aHJvdWdoIHRoZSBzYW1wbGVzXG4gICAgICAgICAgICBmb3IgKGxldCBpID0gMDsgaSA8IE1JRElfQVVESU9fQlVGRkVSX1NJWkU7IGkrKykge1xuICAgICAgICAgICAgICAgIGlmIChpIDwgcmVhZFdhdmVCeXRlcykge1xuICAgICAgICAgICAgICAgICAgICAvLyBjb252ZXJ0cyBQQ00gZGF0YSBmcm9tIHNpbnQxNiBpbiBDIHRvIG51bWJlciBpbiBKYXZhU2NyaXB0IChyYW5nZTogLTEuMCAuLiArMS4wKVxuICAgICAgICAgICAgICAgICAgICAvLyB0aGlzIGlzIHdoZXJlIHRoZSBkYXRhIGlzIGNvbnZlcnRlZCB0byB3YXZlZm9ybSBhdWRpbyBzaWduYWxcbiAgICAgICAgICAgICAgICAgICAgb3V0cHV0QnVmZmVyLmdldENoYW5uZWxEYXRhKDApW2ldID1cbiAgICAgICAgICAgICAgICAgICAgICAgIExpYlRpTWlkaXR5LmdldFZhbHVlKHRoaXMud2F2ZUJ1ZmZlciArIDIgKiBpLCAnaTE2JykgL1xuICAgICAgICAgICAgICAgICAgICAgICAgTUFYX0kxNjtcbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBmaWxsIGVuZCBvZiBidWZmZXIgd2l0aCB6ZXJvZXMsIG1heSBoYXBwZW4gYXQgdGhlIGVuZCBvZiBhIHBpZWNlXG4gICAgICAgICAgICAgICAgICAgIG91dHB1dEJ1ZmZlci5nZXRDaGFubmVsRGF0YSgwKVtpXSA9IDA7XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuICAgICAgICB9IGNhdGNoIChlcnJvcikge1xuICAgICAgICAgICAgdGhpcy5ldmVudEhhbmRsZXIuZW1pdEVycm9yKHtcbiAgICAgICAgICAgICAgICBtZXNzYWdlOiAnQ291bGQgbm90IHByb2Nlc3MgYXVkaW8uJyxcbiAgICAgICAgICAgICAgICBlcnJvclxuICAgICAgICAgICAgfSk7XG4gICAgICAgIH1cbiAgICB9XG5cbiAgICAvKipcbiAgICAgKiBQYXVzZXMgcGxheWJhY2sgb2YgTUlESSBpbnB1dC5cbiAgICAgKiBAcGFyYW0ge3VuZGVmaW5lZH1cbiAgICAgKiBAcmV0dXJuIHtib29sZWFufSBXaGV0aGVyIHBsYXliYWNrIHdhcyBzdWNjZXNzZnVsbHkgcGF1c2VkIG9yIG5vdC5cbiAgICAgKiBAZXhhbXBsZVxuICAgICAqIG1pZGlQbGF5ZXIucGF1c2UoKTtcbiAgICAgKi9cbiAgICBwYXVzZSgpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGxldCB0aW1lID0gMDtcbiAgICAgICAgICAgIGlmICh0aGlzLmNvbnRleHQpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNvbnRleHQuc3VzcGVuZCgpO1xuICAgICAgICAgICAgICAgIHRpbWUgPSB0aGlzLmNvbnRleHQuY3VycmVudFRpbWUgLSB0aGlzLnN0YXJ0VGltZTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIHRoaXMuZXZlbnRIYW5kbGVyLmVtaXRQYXVzZSh7IHRpbWUgfSk7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgIHRoaXMuZXZlbnRIYW5kbGVyLmVtaXRFcnJvcih7XG4gICAgICAgICAgICAgICAgbWVzc2FnZTogJ0NvdWxkIG5vdCBwYXVzZSBwbGF5YmFjay4nLFxuICAgICAgICAgICAgICAgIGVycm9yXG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogUmVzdW1lcyBwbGF5YmFjayBvZiBNSURJIGlucHV0LlxuICAgICAqIEBwYXJhbSB7dW5kZWZpbmVkfVxuICAgICAqIEByZXR1cm4ge2Jvb2xlYW59IFdoZXRoZXIgcGxheWJhY2sgd2FzIHN1Y2Nlc3NmdWxseSByZXNzdW1lZCBvciBub3QuXG4gICAgICogQGV4YW1wbGVcbiAgICAgKiBtaWRpUGxheWVyLnJlc3VtZSgpO1xuICAgICAqL1xuICAgIHJlc3VtZSgpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGxldCB0aW1lID0gMDtcbiAgICAgICAgICAgIGlmICh0aGlzLmNvbnRleHQpIHtcbiAgICAgICAgICAgICAgICB0aGlzLmNvbnRleHQucmVzdW1lKCk7XG4gICAgICAgICAgICAgICAgdGltZSA9IHRoaXMuY29udGV4dC5jdXJyZW50VGltZSAtIHRoaXMuc3RhcnRUaW1lO1xuICAgICAgICAgICAgfVxuICAgICAgICAgICAgdGhpcy5ldmVudEhhbmRsZXIuZW1pdFJlc3VtZSh7XG4gICAgICAgICAgICAgICAgdGltZVxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICByZXR1cm4gdHJ1ZTtcbiAgICAgICAgfSBjYXRjaCAoZXJyb3IpIHtcbiAgICAgICAgICAgIHRoaXMuZXZlbnRIYW5kbGVyLmVtaXRFcnJvcih7XG4gICAgICAgICAgICAgICAgbWVzc2FnZTogJ0NvdWxkIG5vdCByZXN1bWUgcGxheWJhY2suJyxcbiAgICAgICAgICAgICAgICBlcnJvclxuICAgICAgICAgICAgfSk7XG5cbiAgICAgICAgICAgIHJldHVybiBmYWxzZTtcbiAgICAgICAgfVxuICAgIH1cblxuICAgIC8qKlxuICAgICAqIFN0b3BzIHBsYXliYWNrIG9mIE1JREkgaW5wdXQuXG4gICAgICogQHBhcmFtIHt1bmRlZmluZWR9XG4gICAgICogQHJldHVybiB7Ym9vbGVhbn0gV2hldGhlciBwbGF5YmFjayB3YXMgc3VjY2Vzc2Z1bGx5IHN0b3BwZWQgb3Igbm90LlxuICAgICAqIEBleGFtcGxlXG4gICAgICogbWlkaVBsYXllci5zdG9wKCk7XG4gICAgICovXG4gICAgc3RvcCgpIHtcbiAgICAgICAgdHJ5IHtcbiAgICAgICAgICAgIGlmICh0aGlzLnNvdXJjZSkge1xuICAgICAgICAgICAgICAgIHRoaXMuY29udGV4dC5jbG9zZSgpO1xuICAgICAgICAgICAgICAgIHRoaXMuZGlzY29ubmVjdFNvdXJjZSgpO1xuICAgICAgICAgICAgICAgIHRoaXMuZnJlZU1lbW9yeSgpO1xuICAgICAgICAgICAgICAgIExpYlRpTWlkaXR5LmNhbGwoJ21pZF9leGl0JywgJ3ZvaWQnLCBbXSwgW10pO1xuICAgICAgICAgICAgICAgIHRoaXMuc29uZyA9IDA7XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIHRoaXMuc3RhcnRUaW1lID0gMDtcblxuICAgICAgICAgICAgdGhpcy5ldmVudEhhbmRsZXIuZW1pdFN0b3AoKTtcblxuICAgICAgICAgICAgcmV0dXJuIHRydWU7XG4gICAgICAgIH0gY2F0Y2ggKGVycm9yKSB7XG4gICAgICAgICAgICB0aGlzLmV2ZW50SGFuZGxlci5lbWl0RXJyb3Ioe1xuICAgICAgICAgICAgICAgIG1lc3NhZ2U6ICdDb3VsZCBub3Qgc3RvcCBwbGF5YmFjay4nLFxuICAgICAgICAgICAgICAgIGVycm9yXG4gICAgICAgICAgICB9KTtcblxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgICB9XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogR2V0cyB0aGUgY3VycmVudCB2b2x1bWUgb2YgdGhlIHBsYXliYWNrLlxuICAgICAqIEBmdW5jdGlvblxuICAgICAqIEBwYXJhbSB7dW5kZWZpbmVkfVxuICAgICAqIEByZXR1cm4ge251bWJlcn0gVGhlIGN1cnJlbnQgdm9sdW1lLlxuICAgICAqIEBleGFtcGxlXG4g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FGQTtBQUtBO0FBQ0E7QUFDQTtBQUVBOzs7Ozs7Ozs7OztBQVFBO0FBQ0E7QUFDQTtBQUVBOzs7Ozs7Ozs7OztBQVFBO0FBQUE7QUFDQTtBQUFBO0FBQ0E7QUFDQTtBQURBO0FBR0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFBQTtBQUNBO0FBQUE7QUFDQTtBQUNBOzs7QUFFQTtBQUNBO0FBQ0E7QUFDQTtBQUVBOzs7Ozs7Ozs7Ozs7Ozs7QUFhQTs7Ozs7Ozs7Ozs7QUFXQTtBQUFBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7QUFDQTtBQUNBO0FBQUE7QUFBQTtBQUFBO0FBQ0E7OztBQWxoQkE7QUFDQTtBQUNBOzs7Ozs7OztBQ2pHQTtBQUVBIiwic291cmNlUm9vdCI6IiJ9\n//# sourceURL=webpack-internal:///11\n")}])},module.exports=I()},function(g,I,A){"use strict";var C=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,e=function(g){var I={};return function(A){return void 0===I[A]&&(I[A]=g(A)),I[A]}}((function(g){return C.test(g)||111===g.charCodeAt(0)&&110===g.charCodeAt(1)&&g.charCodeAt(2)<91}));I.a=e},function(g,I,A){"use strict";function C(g){return Object.prototype.toString.call(g).slice(8,-1)}function e(g){return"Object"===C(g)&&(g.constructor===Object&&Object.getPrototypeOf(g)===Object.prototype)}function i(g){return"Array"===C(g)}function t(g){return"Symbol"===C(g)} +/*! ***************************************************************************** +Copyright (c) Microsoft Corporation. All rights reserved. +Licensed under the Apache License, Version 2.0 (the "License"); you may not use +this file except in compliance with the License. You may obtain a copy of the +License at http://www.apache.org/licenses/LICENSE-2.0 + +THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED +WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, +MERCHANTABLITY OR NON-INFRINGEMENT. + +See the Apache Version 2.0 License for specific language governing permissions +and limitations under the License. +***************************************************************************** */ +function c(){for(var g=0,I=0,A=arguments.length;IF.length&&F.push(g)}function T(g,I,A){return null==g?0:function g(I,A,C,e){var c=typeof I;"undefined"!==c&&"boolean"!==c||(I=null);var n=!1;if(null===I)n=!0;else switch(c){case"string":case"number":n=!0;break;case"object":switch(I.$$typeof){case i:case t:n=!0}}if(n)return C(e,I,""===A?"."+H(I,0):A),1;if(n=0,A=""===A?".":A+":",Array.isArray(I))for(var u=0;u