parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"9xaU":[function(require,module,exports) {
var t=function(e){"use strict";var r=1e7,o=7,n=9007199254740992,i=h(n),u="0123456789abcdefghijklmnopqrstuvwxyz",p="function"==typeof BigInt;function a(t,e,r,o){return void 0===t?a[0]:void 0!==e&&(10!=+e||r)?$(t,e,r,o):Q(t)}function s(t,e){this.value=t,this.sign=e,this.isSmall=!1}function l(t){this.value=t,this.sign=t<0,this.isSmall=!0}function f(t){this.value=t}function v(t){return-n<t&&t<n}function h(t){return t<1e7?[t]:t<1e14?[t%1e7,Math.floor(t/1e7)]:[t%1e7,Math.floor(t/1e7)%1e7,Math.floor(t/1e14)]}function y(t){c(t);var e=t.length;if(e<4&&P(t,i)<0)switch(e){case 0:return 0;case 1:return t[0];case 2:return t[0]+t[1]*r;default:return t[0]+(t[1]+t[2]*r)*r}return t}function c(t){for(var e=t.length;0===t[--e];);t.length=e+1}function g(t){for(var e=new Array(t),r=-1;++r<t;)e[r]=0;return e}function m(t){return t>0?Math.floor(t):Math.ceil(t)}function d(t,e){var o,n,i=t.length,u=e.length,p=new Array(i),a=0,s=r;for(n=0;n<u;n++)a=(o=t[n]+e[n]+a)>=s?1:0,p[n]=o-a*s;for(;n<i;)a=(o=t[n]+a)===s?1:0,p[n++]=o-a*s;return a>0&&p.push(a),p}function w(t,e){return t.length>=e.length?d(t,e):d(e,t)}function b(t,e){var o,n,i=t.length,u=new Array(i),p=r;for(n=0;n<i;n++)o=t[n]-p+e,e=Math.floor(o/p),u[n]=o-e*p,e+=1;for(;e>0;)u[n++]=e%p,e=Math.floor(e/p);return u}function S(t,e){var o,n,i=t.length,u=e.length,p=new Array(i),a=0,s=r;for(o=0;o<u;o++)(n=t[o]-a-e[o])<0?(n+=s,a=1):a=0,p[o]=n;for(o=u;o<i;o++){if(!((n=t[o]-a)<0)){p[o++]=n;break}n+=s,p[o]=n}for(;o<i;o++)p[o]=t[o];return c(p),p}function q(t,e,o){var n,i,u=t.length,p=new Array(u),a=-e,f=r;for(n=0;n<u;n++)i=t[n]+a,a=Math.floor(i/f),i%=f,p[n]=i<0?i+f:i;return"number"==typeof(p=y(p))?(o&&(p=-p),new l(p)):new s(p,o)}function M(t,e){var o,n,i,u,p=t.length,a=e.length,s=g(p+a),l=r;for(i=0;i<p;++i){u=t[i];for(var f=0;f<a;++f)o=u*e[f]+s[i+f],n=Math.floor(o/l),s[i+f]=o-n*l,s[i+f+1]+=n}return c(s),s}function N(t,e){var o,n,i=t.length,u=new Array(i),p=r,a=0;for(n=0;n<i;n++)o=t[n]*e+a,a=Math.floor(o/p),u[n]=o-a*p;for(;a>0;)u[n++]=a%p,a=Math.floor(a/p);return u}function E(t,e){for(var r=[];e-- >0;)r.push(0);return r.concat(t)}function O(t,e,o){return new s(t<r?N(e,t):M(e,h(t)),o)}function B(t){var e,o,n,i,u=t.length,p=g(u+u),a=r;for(n=0;n<u;n++){o=0-(i=t[n])*i;for(var s=n;s<u;s++)e=i*t[s]*2+p[n+s]+o,o=Math.floor(e/a),p[n+s]=e-o*a;p[n+u]=o}return c(p),p}function I(t,e){var o,n,i,u,p=t.length,a=g(p),s=r;for(i=0,o=p-1;o>=0;--o)i=(u=i*s+t[o])-(n=m(u/e))*e,a[o]=0|n;return[a,0|i]}function A(t,e){var o,n=Q(e);if(p)return[new f(t.value/n.value),new f(t.value%n.value)];var i,u=t.value,v=n.value;if(0===v)throw new Error("Cannot divide by zero");if(t.isSmall)return n.isSmall?[new l(m(u/v)),new l(u%v)]:[a[0],t];if(n.isSmall){if(1===v)return[t,a[0]];if(-1==v)return[t.negate(),a[0]];var d=Math.abs(v);if(d<r){i=y((o=I(u,d))[0]);var w=o[1];return t.sign&&(w=-w),"number"==typeof i?(t.sign!==n.sign&&(i=-i),[new l(i),new l(w)]):[new s(i,t.sign!==n.sign),new l(w)]}v=h(d)}var b=P(u,v);if(-1===b)return[a[0],t];if(0===b)return[a[t.sign===n.sign?1:-1],a[0]];i=(o=u.length+v.length<=200?function(t,e){var o,n,i,u,p,a,s,l=t.length,f=e.length,v=r,h=g(e.length),c=e[f-1],m=Math.ceil(v/(2*c)),d=N(t,m),w=N(e,m);for(d.length<=l&&d.push(0),w.push(0),c=w[f-1],n=l-f;n>=0;n--){for(o=v-1,d[n+f]!==c&&(o=Math.floor((d[n+f]*v+d[n+f-1])/c)),i=0,u=0,a=w.length,p=0;p<a;p++)i+=o*w[p],s=Math.floor(i/v),u+=d[n+p]-(i-s*v),i=s,u<0?(d[n+p]=u+v,u=-1):(d[n+p]=u,u=0);for(;0!==u;){for(o-=1,i=0,p=0;p<a;p++)(i+=d[n+p]-v+w[p])<0?(d[n+p]=i+v,i=0):(d[n+p]=i,i=1);u+=i}h[n]=o}return d=I(d,m)[0],[y(h),y(d)]}(u,v):function(t,e){for(var o,n,i,u,p,a=t.length,s=e.length,l=[],f=[],v=r;a;)if(f.unshift(t[--a]),c(f),P(f,e)<0)l.push(0);else{i=f[(n=f.length)-1]*v+f[n-2],u=e[s-1]*v+e[s-2],n>s&&(i=(i+1)*v),o=Math.ceil(i/u);do{if(P(p=N(e,o),f)<=0)break;o--}while(o);l.push(o),f=S(f,p)}return l.reverse(),[y(l),y(f)]}(u,v))[0];var q=t.sign!==n.sign,M=o[1],E=t.sign;return"number"==typeof i?(q&&(i=-i),i=new l(i)):i=new s(i,q),"number"==typeof M?(E&&(M=-M),M=new l(M)):M=new s(M,E),[i,M]}function P(t,e){if(t.length!==e.length)return t.length>e.length?1:-1;for(var r=t.length-1;r>=0;r--)if(t[r]!==e[r])return t[r]>e[r]?1:-1;return 0}function Z(t){var e=t.abs();return!e.isUnit()&&(!!(e.equals(2)||e.equals(3)||e.equals(5))||!(e.isEven()||e.isDivisibleBy(3)||e.isDivisibleBy(5))&&(!!e.lesser(49)||void 0))}function x(e,r){for(var o,n,i,u=e.prev(),p=u,a=0;p.isEven();)p=p.divide(2),a++;t:for(n=0;n<r.length;n++)if(!e.lesser(r[n])&&!(i=t(r[n]).modPow(p,e)).isUnit()&&!i.equals(u)){for(o=a-1;0!=o;o--){if((i=i.square().mod(e)).isUnit())return!1;if(i.equals(u))continue t}return!1}return!0}s.prototype=Object.create(a.prototype),l.prototype=Object.create(a.prototype),f.prototype=Object.create(a.prototype),s.prototype.add=function(t){var e=Q(t);if(this.sign!==e.sign)return this.subtract(e.negate());var r=this.value,o=e.value;return e.isSmall?new s(b(r,Math.abs(o)),this.sign):new s(w(r,o),this.sign)},s.prototype.plus=s.prototype.add,l.prototype.add=function(t){var e=Q(t),r=this.value;if(r<0!==e.sign)return this.subtract(e.negate());var o=e.value;if(e.isSmall){if(v(r+o))return new l(r+o);o=h(Math.abs(o))}return new s(b(o,Math.abs(r)),r<0)},l.prototype.plus=l.prototype.add,f.prototype.add=function(t){return new f(this.value+Q(t).value)},f.prototype.plus=f.prototype.add,s.prototype.subtract=function(t){var e=Q(t);if(this.sign!==e.sign)return this.add(e.negate());var r=this.value,o=e.value;return e.isSmall?q(r,Math.abs(o),this.sign):function(t,e,r){var o;return P(t,e)>=0?o=S(t,e):(o=S(e,t),r=!r),"number"==typeof(o=y(o))?(r&&(o=-o),new l(o)):new s(o,r)}(r,o,this.sign)},s.prototype.minus=s.prototype.subtract,l.prototype.subtract=function(t){var e=Q(t),r=this.value;if(r<0!==e.sign)return this.add(e.negate());var o=e.value;return e.isSmall?new l(r-o):q(o,Math.abs(r),r>=0)},l.prototype.minus=l.prototype.subtract,f.prototype.subtract=function(t){return new f(this.value-Q(t).value)},f.prototype.minus=f.prototype.subtract,s.prototype.negate=function(){return new s(this.value,!this.sign)},l.prototype.negate=function(){var t=this.sign,e=new l(-this.value);return e.sign=!t,e},f.prototype.negate=function(){return new f(-this.value)},s.prototype.abs=function(){return new s(this.value,!1)},l.prototype.abs=function(){return new l(Math.abs(this.value))},f.prototype.abs=function(){return new f(this.value>=0?this.value:-this.value)},s.prototype.multiply=function(t){var e,o,n,i=Q(t),u=this.value,p=i.value,l=this.sign!==i.sign;if(i.isSmall){if(0===p)return a[0];if(1===p)return this;if(-1===p)return this.negate();if((e=Math.abs(p))<r)return new s(N(u,e),l);p=h(e)}return o=u.length,n=p.length,new s(-.012*o-.012*n+15e-6*o*n>0?function t(e,r){var o=Math.max(e.length,r.length);if(o<=30)return M(e,r);o=Math.ceil(o/2);var n=e.slice(o),i=e.slice(0,o),u=r.slice(o),p=r.slice(0,o),a=t(i,p),s=t(n,u),l=t(w(i,n),w(p,u)),f=w(w(a,E(S(S(l,a),s),o)),E(s,2*o));return c(f),f}(u,p):M(u,p),l)},s.prototype.times=s.prototype.multiply,l.prototype._multiplyBySmall=function(t){return v(t.value*this.value)?new l(t.value*this.value):O(Math.abs(t.value),h(Math.abs(this.value)),this.sign!==t.sign)},s.prototype._multiplyBySmall=function(t){return 0===t.value?a[0]:1===t.value?this:-1===t.value?this.negate():O(Math.abs(t.value),this.value,this.sign!==t.sign)},l.prototype.multiply=function(t){return Q(t)._multiplyBySmall(this)},l.prototype.times=l.prototype.multiply,f.prototype.multiply=function(t){return new f(this.value*Q(t).value)},f.prototype.times=f.prototype.multiply,s.prototype.square=function(){return new s(B(this.value),!1)},l.prototype.square=function(){var t=this.value*this.value;return v(t)?new l(t):new s(B(h(Math.abs(this.value))),!1)},f.prototype.square=function(t){return new f(this.value*this.value)},s.prototype.divmod=function(t){var e=A(this,t);return{quotient:e[0],remainder:e[1]}},f.prototype.divmod=l.prototype.divmod=s.prototype.divmod,s.prototype.divide=function(t){return A(this,t)[0]},f.prototype.over=f.prototype.divide=function(t){return new f(this.value/Q(t).value)},l.prototype.over=l.prototype.divide=s.prototype.over=s.prototype.divide,s.prototype.mod=function(t){return A(this,t)[1]},f.prototype.mod=f.prototype.remainder=function(t){return new f(this.value%Q(t).value)},l.prototype.remainder=l.prototype.mod=s.prototype.remainder=s.prototype.mod,s.prototype.pow=function(t){var e,r,o,n=Q(t),i=this.value,u=n.value;if(0===u)return a[1];if(0===i)return a[0];if(1===i)return a[1];if(-1===i)return n.isEven()?a[1]:a[-1];if(n.sign)return a[0];if(!n.isSmall)throw new Error("The exponent "+n.toString()+" is too large.");if(this.isSmall&&v(e=Math.pow(i,u)))return new l(m(e));for(r=this,o=a[1];!0&u&&(o=o.times(r),--u),0!==u;)u/=2,r=r.square();return o},l.prototype.pow=s.prototype.pow,f.prototype.pow=function(t){var e=Q(t),r=this.value,o=e.value,n=BigInt(0),i=BigInt(1),u=BigInt(2);if(o===n)return a[1];if(r===n)return a[0];if(r===i)return a[1];if(r===BigInt(-1))return e.isEven()?a[1]:a[-1];if(e.isNegative())return new f(n);for(var p=this,s=a[1];(o&i)===i&&(s=s.times(p),--o),o!==n;)o/=u,p=p.square();return s},s.prototype.modPow=function(t,e){if(t=Q(t),(e=Q(e)).isZero())throw new Error("Cannot take modPow with modulus 0");for(var r=a[1],o=this.mod(e);t.isPositive();){if(o.isZero())return a[0];t.isOdd()&&(r=r.multiply(o).mod(e)),t=t.divide(2),o=o.square().mod(e)}return r},f.prototype.modPow=l.prototype.modPow=s.prototype.modPow,s.prototype.compareAbs=function(t){var e=Q(t),r=this.value,o=e.value;return e.isSmall?1:P(r,o)},l.prototype.compareAbs=function(t){var e=Q(t),r=Math.abs(this.value),o=e.value;return e.isSmall?r===(o=Math.abs(o))?0:r>o?1:-1:-1},f.prototype.compareAbs=function(t){var e=this.value,r=Q(t).value;return(e=e>=0?e:-e)===(r=r>=0?r:-r)?0:e>r?1:-1},s.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var e=Q(t),r=this.value,o=e.value;return this.sign!==e.sign?e.sign?1:-1:e.isSmall?this.sign?-1:1:P(r,o)*(this.sign?-1:1)},s.prototype.compareTo=s.prototype.compare,l.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var e=Q(t),r=this.value,o=e.value;return e.isSmall?r==o?0:r>o?1:-1:r<0!==e.sign?r<0?-1:1:r<0?1:-1},l.prototype.compareTo=l.prototype.compare,f.prototype.compare=function(t){if(t===1/0)return-1;if(t===-1/0)return 1;var e=this.value,r=Q(t).value;return e===r?0:e>r?1:-1},f.prototype.compareTo=f.prototype.compare,s.prototype.equals=function(t){return 0===this.compare(t)},f.prototype.eq=f.prototype.equals=l.prototype.eq=l.prototype.equals=s.prototype.eq=s.prototype.equals,s.prototype.notEquals=function(t){return 0!==this.compare(t)},f.prototype.neq=f.prototype.notEquals=l.prototype.neq=l.prototype.notEquals=s.prototype.neq=s.prototype.notEquals,s.prototype.greater=function(t){return this.compare(t)>0},f.prototype.gt=f.prototype.greater=l.prototype.gt=l.prototype.greater=s.prototype.gt=s.prototype.greater,s.prototype.lesser=function(t){return this.compare(t)<0},f.prototype.lt=f.prototype.lesser=l.prototype.lt=l.prototype.lesser=s.prototype.lt=s.prototype.lesser,s.prototype.greaterOrEquals=function(t){return this.compare(t)>=0},f.prototype.geq=f.prototype.greaterOrEquals=l.prototype.geq=l.prototype.greaterOrEquals=s.prototype.geq=s.prototype.greaterOrEquals,s.prototype.lesserOrEquals=function(t){return this.compare(t)<=0},f.prototype.leq=f.prototype.lesserOrEquals=l.prototype.leq=l.prototype.lesserOrEquals=s.prototype.leq=s.prototype.lesserOrEquals,s.prototype.isEven=function(){return 0==(1&this.value[0])},l.prototype.isEven=function(){return 0==(1&this.value)},f.prototype.isEven=function(){return(this.value&BigInt(1))===BigInt(0)},s.prototype.isOdd=function(){return 1==(1&this.value[0])},l.prototype.isOdd=function(){return 1==(1&this.value)},f.prototype.isOdd=function(){return(this.value&BigInt(1))===BigInt(1)},s.prototype.isPositive=function(){return!this.sign},l.prototype.isPositive=function(){return this.value>0},f.prototype.isPositive=l.prototype.isPositive,s.prototype.isNegative=function(){return this.sign},l.prototype.isNegative=function(){return this.value<0},f.prototype.isNegative=l.prototype.isNegative,s.prototype.isUnit=function(){return!1},l.prototype.isUnit=function(){return 1===Math.abs(this.value)},f.prototype.isUnit=function(){return this.abs().value===BigInt(1)},s.prototype.isZero=function(){return!1},l.prototype.isZero=function(){return 0===this.value},f.prototype.isZero=function(){return this.value===BigInt(0)},s.prototype.isDivisibleBy=function(t){var e=Q(t);return!e.isZero()&&(!!e.isUnit()||(0===e.compareAbs(2)?this.isEven():this.mod(e).isZero()))},f.prototype.isDivisibleBy=l.prototype.isDivisibleBy=s.prototype.isDivisibleBy,s.prototype.isPrime=function(e){var r=Z(this);if(void 0!==r)return r;var o=this.abs(),n=o.bitLength();if(n<=64)return x(o,[2,3,5,7,11,13,17,19,23,29,31,37]);for(var i=Math.log(2)*n.toJSNumber(),u=Math.ceil(!0===e?2*Math.pow(i,2):i),p=[],a=0;a<u;a++)p.push(t(a+2));return x(o,p)},f.prototype.isPrime=l.prototype.isPrime=s.prototype.isPrime,s.prototype.isProbablePrime=function(e){var r=Z(this);if(void 0!==r)return r;for(var o=this.abs(),n=void 0===e?5:e,i=[],u=0;u<n;u++)i.push(t.randBetween(2,o.minus(2)));return x(o,i)},f.prototype.isProbablePrime=l.prototype.isProbablePrime=s.prototype.isProbablePrime,s.prototype.modInv=function(e){for(var r,o,n,i=t.zero,u=t.one,p=Q(e),a=this.abs();!a.isZero();)r=p.divide(a),o=i,n=p,i=u,p=a,u=o.subtract(r.multiply(u)),a=n.subtract(r.multiply(a));if(!p.isUnit())throw new Error(this.toString()+" and "+e.toString()+" are not co-prime");return-1===i.compare(0)&&(i=i.add(e)),this.isNegative()?i.negate():i},f.prototype.modInv=l.prototype.modInv=s.prototype.modInv,s.prototype.next=function(){var t=this.value;return this.sign?q(t,1,this.sign):new s(b(t,1),this.sign)},l.prototype.next=function(){var t=this.value;return t+1<n?new l(t+1):new s(i,!1)},f.prototype.next=function(){return new f(this.value+BigInt(1))},s.prototype.prev=function(){var t=this.value;return this.sign?new s(b(t,1),!0):q(t,1,this.sign)},l.prototype.prev=function(){var t=this.value;return t-1>-n?new l(t-1):new s(i,!0)},f.prototype.prev=function(){return new f(this.value-BigInt(1))};for(var J=[1];2*J[J.length-1]<=r;)J.push(2*J[J.length-1]);var L=J.length,U=J[L-1];function T(t){return Math.abs(t)<=r}function j(e,r,o){r=Q(r);for(var n=e.isNegative(),i=r.isNegative(),u=n?e.not():e,p=i?r.not():r,a=0,s=0,l=null,f=null,v=[];!u.isZero()||!p.isZero();)a=(l=A(u,U))[1].toJSNumber(),n&&(a=U-1-a),s=(f=A(p,U))[1].toJSNumber(),i&&(s=U-1-s),u=l[0],p=f[0],v.push(o(a,s));for(var h=0!==o(n?1:0,i?1:0)?t(-1):t(0),y=v.length-1;y>=0;y-=1)h=h.multiply(U).add(t(v[y]));return h}s.prototype.shiftLeft=function(t){var e=Q(t).toJSNumber();if(!T(e))throw new Error(String(e)+" is too large for shifting.");if(e<0)return this.shiftRight(-e);var r=this;if(r.isZero())return r;for(;e>=L;)r=r.multiply(U),e-=L-1;return r.multiply(J[e])},f.prototype.shiftLeft=l.prototype.shiftLeft=s.prototype.shiftLeft,s.prototype.shiftRight=function(t){var e,r=Q(t).toJSNumber();if(!T(r))throw new Error(String(r)+" is too large for shifting.");if(r<0)return this.shiftLeft(-r);for(var o=this;r>=L;){if(o.isZero()||o.isNegative()&&o.isUnit())return o;o=(e=A(o,U))[1].isNegative()?e[0].prev():e[0],r-=L-1}return(e=A(o,J[r]))[1].isNegative()?e[0].prev():e[0]},f.prototype.shiftRight=l.prototype.shiftRight=s.prototype.shiftRight,s.prototype.not=function(){return this.negate().prev()},f.prototype.not=l.prototype.not=s.prototype.not,s.prototype.and=function(t){return j(this,t,function(t,e){return t&e})},f.prototype.and=l.prototype.and=s.prototype.and,s.prototype.or=function(t){return j(this,t,function(t,e){return t|e})},f.prototype.or=l.prototype.or=s.prototype.or,s.prototype.xor=function(t){return j(this,t,function(t,e){return t^e})},f.prototype.xor=l.prototype.xor=s.prototype.xor;var C=1<<30,D=(r&-r)*(r&-r)|C;function z(t){var e=t.value,o="number"==typeof e?e|C:"bigint"==typeof e?e|BigInt(C):e[0]+e[1]*r|D;return o&-o}function R(t,e){return t=Q(t),e=Q(e),t.greater(e)?t:e}function k(t,e){return t=Q(t),e=Q(e),t.lesser(e)?t:e}function _(t,e){if(t=Q(t).abs(),e=Q(e).abs(),t.equals(e))return t;if(t.isZero())return e;if(e.isZero())return t;for(var r,o,n=a[1];t.isEven()&&e.isEven();)r=k(z(t),z(e)),t=t.divide(r),e=e.divide(r),n=n.multiply(r);for(;t.isEven();)t=t.divide(z(t));do{for(;e.isEven();)e=e.divide(z(e));t.greater(e)&&(o=e,e=t,t=o),e=e.subtract(t)}while(!e.isZero());return n.isUnit()?t:t.multiply(n)}s.prototype.bitLength=function(){var e=this;return e.compareTo(t(0))<0&&(e=e.negate().subtract(t(1))),0===e.compareTo(t(0))?t(0):t(function e(r,o){if(o.compareTo(r)<=0){var n=e(r,o.square(o)),i=n.p,u=n.e,p=i.multiply(o);return p.compareTo(r)<=0?{p:p,e:2*u+1}:{p:i,e:2*u}}return{p:t(1),e:0}}(e,t(2)).e).add(t(1))},f.prototype.bitLength=l.prototype.bitLength=s.prototype.bitLength;var $=function(t,e,r,o){r=r||u,t=String(t),o||(t=t.toLowerCase(),r=r.toLowerCase());var n,i=t.length,p=Math.abs(e),a={};for(n=0;n<r.length;n++)a[r[n]]=n;for(n=0;n<i;n++){if("-"!==(f=t[n])&&(f in a&&a[f]>=p)){if("1"===f&&1===p)continue;throw new Error(f+" is not a valid digit in base "+e+".")}}e=Q(e);var s=[],l="-"===t[0];for(n=l?1:0;n<t.length;n++){var f;if((f=t[n])in a)s.push(Q(a[f]));else{if("<"!==f)throw new Error(f+" is not a valid character");var v=n;do{n++}while(">"!==t[n]&&n<t.length);s.push(Q(t.slice(v+1,n)))}}return F(s,e,l)};function F(t,e,r){var o,n=a[0],i=a[1];for(o=t.length-1;o>=0;o--)n=n.add(t[o].times(i)),i=i.times(e);return r?n.negate():n}function G(e,r){if((r=t(r)).isZero()){if(e.isZero())return{value:[0],isNegative:!1};throw new Error("Cannot convert nonzero numbers to base 0.")}if(r.equals(-1)){if(e.isZero())return{value:[0],isNegative:!1};if(e.isNegative())return{value:[].concat.apply([],Array.apply(null,Array(-e.toJSNumber())).map(Array.prototype.valueOf,[1,0])),isNegative:!1};var o=Array.apply(null,Array(e.toJSNumber()-1)).map(Array.prototype.valueOf,[0,1]);return o.unshift([1]),{value:[].concat.apply([],o),isNegative:!1}}var n=!1;if(e.isNegative()&&r.isPositive()&&(n=!0,e=e.abs()),r.isUnit())return e.isZero()?{value:[0],isNegative:!1}:{value:Array.apply(null,Array(e.toJSNumber())).map(Number.prototype.valueOf,1),isNegative:n};for(var i,u=[],p=e;p.isNegative()||p.compareAbs(r)>=0;){i=p.divmod(r),p=i.quotient;var a=i.remainder;a.isNegative()&&(a=r.minus(a).abs(),p=p.next()),u.push(a.toJSNumber())}return u.push(p.toJSNumber()),{value:u.reverse(),isNegative:n}}function H(t,e,r){var o=G(t,e);return(o.isNegative?"-":"")+o.value.map(function(t){return function(t,e){return t<(e=e||u).length?e[t]:"<"+t+">"}(t,r)}).join("")}function K(t){if(v(+t)){var e=+t;if(e===m(e))return p?new f(BigInt(e)):new l(e);throw new Error("Invalid integer: "+t)}var r="-"===t[0];r&&(t=t.slice(1));var n=t.split(/e/i);if(n.length>2)throw new Error("Invalid integer: "+n.join("e"));if(2===n.length){var i=n[1];if("+"===i[0]&&(i=i.slice(1)),(i=+i)!==m(i)||!v(i))throw new Error("Invalid integer: "+i+" is not a valid exponent.");var u=n[0],a=u.indexOf(".");if(a>=0&&(i-=u.length-a-1,u=u.slice(0,a)+u.slice(a+1)),i<0)throw new Error("Cannot include negative exponent part for integers");t=u+=new Array(i+1).join("0")}if(!/^([0-9][0-9]*)$/.test(t))throw new Error("Invalid integer: "+t);if(p)return new f(BigInt(r?"-"+t:t));for(var h=[],y=t.length,g=o,d=y-g;y>0;)h.push(+t.slice(d,y)),(d-=g)<0&&(d=0),y-=g;return c(h),new s(h,r)}function Q(t){return"number"==typeof t?function(t){if(p)return new f(BigInt(t));if(v(t)){if(t!==m(t))throw new Error(t+" is not an integer.");return new l(t)}return K(t.toString())}(t):"string"==typeof t?K(t):"bigint"==typeof t?new f(t):t}s.prototype.toArray=function(t){return G(this,t)},l.prototype.toArray=function(t){return G(this,t)},f.prototype.toArray=function(t){return G(this,t)},s.prototype.toString=function(t,e){if(void 0===t&&(t=10),10!==t)return H(this,t,e);for(var r,o=this.value,n=o.length,i=String(o[--n]);--n>=0;)r=String(o[n]),i+="0000000".slice(r.length)+r;return(this.sign?"-":"")+i},l.prototype.toString=function(t,e){return void 0===t&&(t=10),10!=t?H(this,t,e):String(this.value)},f.prototype.toString=l.prototype.toString,f.prototype.toJSON=s.prototype.toJSON=l.prototype.toJSON=function(){return this.toString()},s.prototype.valueOf=function(){return parseInt(this.toString(),10)},s.prototype.toJSNumber=s.prototype.valueOf,l.prototype.valueOf=function(){return this.value},l.prototype.toJSNumber=l.prototype.valueOf,f.prototype.valueOf=f.prototype.toJSNumber=function(){return parseInt(this.toString(),10)};for(var V=0;V<1e3;V++)a[V]=Q(V),V>0&&(a[-V]=Q(-V));return a.one=a[1],a.zero=a[0],a.minusOne=a[-1],a.max=R,a.min=k,a.gcd=_,a.lcm=function(t,e){return t=Q(t).abs(),e=Q(e).abs(),t.divide(_(t,e)).multiply(e)},a.isInstance=function(t){return t instanceof s||t instanceof l||t instanceof f},a.randBetween=function(t,e){var o=k(t=Q(t),e=Q(e)),n=R(t,e).subtract(o).add(1);if(n.isSmall)return o.add(Math.floor(Math.random()*n));for(var i=G(n,r).value,u=[],p=!0,s=0;s<i.length;s++){var l=p?i[s]:r,f=m(Math.random()*l);u.push(f),f<l&&(p=!1)}return o.add(a.fromArray(u,r,!1))},a.fromArray=function(t,e,r){return F(t.map(Q),Q(e||10),r)},a}();"undefined"!=typeof module&&module.hasOwnProperty("exports")&&(module.exports=t),"function"==typeof define&&define.amd&&define("big-integer",[],function(){return t});
},{}],"Focm":[function(require,module,exports) {
var n={};!function(e){"use strict";(n["Control.Apply"]=n["Control.Apply"]||{}).arrayApply=function(n){return function(e){for(var t=n.length,u=e.length,a=new Array(t*u),r=0,i=0;i<t;i++)for(var o=n[i],l=0;l<u;l++)a[r++]=o(e[l]);return a}}}(),function(n){"use strict";n["Control.Semigroupoid"]=n["Control.Semigroupoid"]||{};var e=n["Control.Semigroupoid"],t=function(n){this.compose=n},u=new t(function(n){return function(e){return function(t){return n(e(t))}}});e.compose=function(n){return n.compose},e.Semigroupoid=t,e.semigroupoidFn=u}(n),function(n){"use strict";n["Control.Category"]=n["Control.Category"]||{};var e=n["Control.Category"],t=n["Control.Semigroupoid"],u=function(n,e){this.Semigroupoid0=n,this.identity=e},a=new u(function(){return t.semigroupoidFn},function(n){return n});e.Category=u,e.identity=function(n){return n.identity},e.categoryFn=a}(n),function(n){"use strict";n["Data.Function"]=n["Data.Function"]||{};var e=n["Data.Function"];e.flip=function(n){return function(e){return function(t){return n(t)(e)}}},e.const=function(n){return function(e){return n}}}(n),function(e){"use strict";(n["Data.Functor"]=n["Data.Functor"]||{}).arrayMap=function(n){return function(e){for(var t=e.length,u=new Array(t),a=0;a<t;a++)u[a]=n(e[a]);return u}}}(),function(e){"use strict";(n["Data.Unit"]=n["Data.Unit"]||{}).unit={}}(),function(n){"use strict";n["Data.Unit"]=n["Data.Unit"]||{};var e=n["Data.Unit"],t=n["Data.Unit"];e.unit=t.unit}(n),function(n){"use strict";n["Data.Functor"]=n["Data.Functor"]||{};var e=n["Data.Functor"],t=n["Data.Functor"],u=n["Data.Function"],a=n["Data.Unit"],r=function(n){this.map=n},i=function(n){return n.map},o=new r(t.arrayMap);e.Functor=r,e.map=i,e.void=function(n){return i(n)(u.const(a.unit))},e.functorArray=o}(n),function(n){"use strict";n["Control.Apply"]=n["Control.Apply"]||{};var e=n["Control.Apply"],t=n["Control.Apply"],u=n["Control.Category"],a=n["Data.Function"],r=n["Data.Functor"],i=function(n,e){this.Functor0=n,this.apply=e},o=new i(function(){return r.functorArray},t.arrayApply),l=function(n){return n.apply};e.Apply=i,e.apply=l,e.applySecond=function(n){return function(e){return function(t){return l(n)(r.map(n.Functor0())(a.const(u.identity(u.categoryFn)))(e))(t)}}},e.applyArray=o}(n),function(n){"use strict";n["Control.Applicative"]=n["Control.Applicative"]||{};var e=n["Control.Applicative"],t=n["Control.Apply"],u=function(n){return n.pure};e.Applicative=function(n,e){this.Apply0=n,this.pure=e},e.pure=u,e.liftA1=function(n){return function(e){return function(a){return t.apply(n.Apply0())(u(n)(e))(a)}}}}(n),function(e){"use strict";(n["Control.Bind"]=n["Control.Bind"]||{}).arrayBind=function(n){return function(e){for(var t=[],u=0,a=n.length;u<a;u++)Array.prototype.push.apply(t,e(n[u]));return t}}}(),function(n){"use strict";n["Control.Bind"]=n["Control.Bind"]||{};var e=n["Control.Bind"],t=n["Control.Bind"],u=n["Control.Apply"],a=n["Data.Function"],r=function(n,e){this.Apply0=n,this.bind=e},i=new r(function(){return u.applyArray},t.arrayBind),o=function(n){return n.bind},l=function(n){return a.flip(o(n))};e.Bind=r,e.bind=o,e.bindFlipped=l,e.composeKleisliFlipped=function(n){return function(e){return function(t){return function(u){return l(n)(e)(t(u))}}}},e.bindArray=i}(n),function(n){"use strict";n.map_=function(n){return function(e){return function(){return n(e())}}},n.foreach=function(n){return function(e){return function(){for(var t=0,u=n.length;t<u;t++)e(n[t])()}}},n["modify'"]=function(n){return function(e){return function(){var t=n(e.value);return e.value=t.state,t.value}}},n.write=function(n){return function(e){return function(){return e.value=n}}}}(n["Control.Monad.ST.Internal"]=n["Control.Monad.ST.Internal"]||{}),function(n){"use strict";n["Control.Monad.ST.Internal"]=n["Control.Monad.ST.Internal"]||{};var e=n["Control.Monad.ST.Internal"],t=n["Control.Monad.ST.Internal"],u=new n["Data.Functor"].Functor(t.map_);e.modify=function(n){return t["modify'"](function(e){var t=n(e);return{state:t,value:t}})},e.functorST=u,e.foreach=t.foreach,e.write=t.write}(n),function(n){"use strict";n.length=function(n){return n.length},n.indexImpl=function(n){return function(e){return function(t){return function(u){return u<0||u>=t.length?e:n(t[u])}}}},n.slice=function(n){return function(e){return function(t){return t.slice(n,e)}}},n.take=function(n){return function(e){return n<1?[]:e.slice(0,n)}},n.drop=function(n){return function(e){return n<1?e:e.slice(n)}}}(n["Data.Array"]=n["Data.Array"]||{}),function(n){"use strict";n["Data.Maybe"]=n["Data.Maybe"]||{};var e=n["Data.Maybe"],t=function(){function n(){}return n.value=new n,n}(),u=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}();e.Nothing=t,e.Just=u,e.maybe=function(n){return function(e){return function(a){if(a instanceof t)return n;if(a instanceof u)return e(a.value0);throw new Error("Failed pattern match at Data.Maybe (line 217, column 1 - line 217, column 51): "+[n.constructor.name,e.constructor.name,a.constructor.name])}}},e.fromJust=function(n){return function(n){if(n instanceof u)return n.value0;throw new Error("Failed pattern match at Data.Maybe (line 268, column 1 - line 268, column 46): "+[n.constructor.name])}}}(n),function(n){"use strict";n["Data.Array"]=n["Data.Array"]||{};var e=n["Data.Array"],t=n["Data.Array"],u=n["Control.Bind"],a=n["Data.Function"],r=n["Data.Maybe"],i=function(n){return[n]},o=t.indexImpl(r.Just.create)(r.Nothing.value),l=a.flip(u.bind(u.bindArray));e.singleton=i,e.head=function(n){return o(n)(0)},e.index=o,e.concatMap=l,e.mapMaybe=function(n){return l(function(e){return r.maybe([])(i)(n(e))})},e.take=t.take,e.drop=t.drop}(n),function(n){var e=require("big-integer");n.fromInt=function(n){return e(n)},n.toBase=function(n){return function(e){return e.toString(n)}},n.biAdd=function(n){return function(e){return n.add(e)}},n.biMul=function(n){return function(e){return n.multiply(e)}}}(n["Data.BigInt"]=n["Data.BigInt"]||{}),function(n){"use strict";n.intAdd=function(n){return function(e){return n+e|0}},n.intMul=function(n){return function(e){return n*e|0}}}(n["Data.Semiring"]=n["Data.Semiring"]||{}),function(n){"use strict";n["Data.Semiring"]=n["Data.Semiring"]||{};var e=n["Data.Semiring"],t=n["Data.Semiring"],u=function(n,e,t,u){this.add=n,this.mul=e,this.one=t,this.zero=u},a=new u(t.intAdd,t.intMul,1,0);e.Semiring=u,e.add=function(n){return n.add},e.zero=function(n){return n.zero},e.mul=function(n){return n.mul},e.one=function(n){return n.one},e.semiringInt=a}(n),function(n){"use strict";n["Data.BigInt"]=n["Data.BigInt"]||{};var e=n["Data.BigInt"],t=n["Data.BigInt"],u=n["Data.Semiring"],a=t.toBase(10),r=new u.Semiring(t.biAdd,t.biMul,t.fromInt(1),t.fromInt(0));e.toString=a,e.semiringBigInt=r,e.fromInt=t.fromInt}(n),function(n){"use strict";n["Data.Either"]=n["Data.Either"]||{};var e=n["Data.Either"],t=n["Control.Applicative"],u=n["Control.Apply"],a=n["Control.Bind"],r=n["Data.Functor"],i=n["Data.Maybe"],o=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),l=function(){function n(n){this.value0=n}return n.create=function(e){return new n(e)},n}(),f=new r.Functor(function(n){return function(e){if(e instanceof o)return new o(e.value0);if(e instanceof l)return new l(n(e.value0));throw new Error("Failed pattern match at Data.Either (line 38, column 8 - line 38, column 52): "+[e.constructor.name])}}),c=function(n){return function(e){return function(t){if(t instanceof o)return n(t.value0);if(t instanceof l)return e(t.value0);throw new Error("Failed pattern match at Data.Either (line 238, column 1 - line 238, column 64): "+[n.constructor.name,e.constructor.name,t.constructor.name])}}},v=new u.Apply(function(){return f},function(n){return function(e){if(n instanceof o)return new o(n.value0);if(n instanceof l)return r.map(f)(n.value0)(e);throw new Error("Failed pattern match at Data.Either (line 82, column 1 - line 82, column 41): "+[n.constructor.name,e.constructor.name])}}),s=new a.Bind(function(){return v},c(function(n){return function(e){return new o(n)}})(function(n){return function(e){return e(n)}})),p=new t.Applicative(function(){return v},l.create);e.Left=o,e.Right=l,e.either=c,e.note=function(n){return i.maybe(new o(n))(l.create)},e.functorEither=f,e.applyEither=v,e.applicativeEither=p,e.bindEither=s}(n),function(e){"use strict";(n["Data.Int"]=n["Data.Int"]||{}).fromStringAsImpl=function(n){return function(e){return function(t){var u;u=t<11?"[0-"+(t-1).toString()+"]":11===t?"[0-9a]":"[0-9a-"+String.fromCharCode(86+t)+"]";var a=new RegExp("^[\\+\\-]?"+u+"+$","i");return function(u){if(a.test(u)){var r=parseInt(u,t);return(0|r)===r?n(r):e}return e}}}}}(),function(n){"use strict";n["Data.Int"]=n["Data.Int"]||{};var e=n["Data.Int"],t=n["Data.Int"],u=n["Data.Maybe"],a=t.fromStringAsImpl(u.Just.create)(u.Nothing.value),r=a(10);e.fromString=r,e.fromStringAs=a}(n),function(n){"use strict";n["Data.List.Types"]=n["Data.List.Types"]||{};var e=n["Data.List.Types"],t=function(){function n(){}return n.value=new n,n}(),u=function(){function n(n,e){this.value0=n,this.value1=e}return n.create=function(e){return function(t){return new n(e,t)}},n}();e.Nil=t,e.Cons=u}(n),function(e){"use strict";(n["Data.Eq"]=n["Data.Eq"]||{}).refEq=function(n){return function(e){return n===e}}}(),function(n){"use strict";n["Data.Eq"]=n["Data.Eq"]||{};var e=n["Data.Eq"],t=function(n){this.eq=n},u=new t(n["Data.Eq"].refEq);e.Eq=t,e.eq=function(n){return n.eq},e.eqInt=u}(n),function(e){"use strict";(n["Data.Ord.Unsafe"]=n["Data.Ord.Unsafe"]||{}).unsafeCompareImpl=function(n){return function(e){return function(t){return function(u){return function(a){return u<a?n:u===a?e:t}}}}}}(),function(n){"use strict";n["Data.Ordering"]=n["Data.Ordering"]||{};var e=n["Data.Ordering"],t=function(){function n(){}return n.value=new n,n}(),u=function(){function n(){}return n.value=new n,n}(),a=function(){function n(){}return n.value=new n,n}();e.LT=t,e.GT=u,e.EQ=a}(n),function(n){"use strict";n["Data.Ord.Unsafe"]=n["Data.Ord.Unsafe"]||{};var e=n["Data.Ord.Unsafe"],t=n["Data.Ord.Unsafe"],u=n["Data.Ordering"],a=t.unsafeCompareImpl(u.LT.value)(u.EQ.value)(u.GT.value);e.unsafeCompare=a}(n),function(n){"use strict";n["Data.Ord"]=n["Data.Ord"]||{};var e=n["Data.Ord"],t=n["Data.Eq"],u=n["Data.Ord.Unsafe"],a=n["Data.Ordering"],r=function(n,e){this.Eq0=n,this.compare=e},i=new r(function(){return t.eqInt},u.unsafeCompare),o=function(n){return n.compare};e.Ord=r,e.compare=o,e.min=function(n){return function(e){return function(t){var u=o(n)(e)(t);if(u instanceof a.LT)return e;if(u instanceof a.EQ)return e;if(u instanceof a.GT)return t;throw new Error("Failed pattern match at Data.Ord (line 119, column 3 - line 122, column 12): "+[u.constructor.name])}}},e.ordInt=i}(n),function(n){"use strict";n["Data.Tuple"]=n["Data.Tuple"]||{};var e=n["Data.Tuple"],t=function(){function n(n,e){this.value0=n,this.value1=e}return n.create=function(e){return function(t){return new n(e,t)}},n}();e.Tuple=t,e.snd=function(n){return n.value1}}(n),function(n){"use strict";n["Data.Map.Internal"]=n["Data.Map.Internal"]||{};var e,t=n["Data.Map.Internal"],u=n["Data.List.Types"],a=n["Data.Maybe"],r=n["Data.Ord"],i=n["Data.Ordering"],o=n["Data.Tuple"],l=function(){function n(){}return n.value=new n,n}(),f=function(){function n(n,e,t,u){this.value0=n,this.value1=e,this.value2=t,this.value3=u}return n.create=function(e){return function(t){return function(u){return function(a){return new n(e,t,u,a)}}}},n}(),c=function(){function n(n,e,t,u,a,r,i){this.value0=n,this.value1=e,this.value2=t,this.value3=u,this.value4=a,this.value5=r,this.value6=i}return n.create=function(e){return function(t){return function(u){return function(a){return function(r){return function(i){return function(o){return new n(e,t,u,a,r,i,o)}}}}}}},n}(),v=function(){function n(n,e,t){this.value0=n,this.value1=e,this.value2=t}return n.create=function(e){return function(t){return function(u){return new n(e,t,u)}}},n}(),s=function(){function n(n,e,t){this.value0=n,this.value1=e,this.value2=t}return n.create=function(e){return function(t){return function(u){return new n(e,t,u)}}},n}(),p=function(){function n(n,e,t,u,a,r){this.value0=n,this.value1=e,this.value2=t,this.value3=u,this.value4=a,this.value5=r}return n.create=function(e){return function(t){return function(u){return function(a){return function(r){return function(i){return new n(e,t,u,a,r,i)}}}}}},n}(),d=function(){function n(n,e,t,u,a,r){this.value0=n,this.value1=e,this.value2=t,this.value3=u,this.value4=a,this.value5=r}return n.create=function(e){return function(t){return function(u){return function(a){return function(r){return function(i){return new n(e,t,u,a,r,i)}}}}}},n}(),w=function(){function n(n,e,t,u,a,r){this.value0=n,this.value1=e,this.value2=t,this.value3=u,this.value4=a,this.value5=r}return n.create=function(e){return function(t){return function(u){return function(a){return function(r){return function(i){return new n(e,t,u,a,r,i)}}}}}},n}(),m=function(){function n(n,e,t,u){this.value0=n,this.value1=e,this.value2=t,this.value3=u}return n.create=function(e){return function(t){return function(u){return function(a){return new n(e,t,u,a)}}}},n}(),h=function(n){return function(e){var t=r.compare(n);return function(n){var u,r=!1;function o(u){if(u instanceof l)return r=!0,a.Nothing.value;if(u instanceof f){var o=t(e)(u.value1);return o instanceof i.EQ?(r=!0,new a.Just(u.value2)):o instanceof i.LT?void(n=u.value0):void(n=u.value3)}if(u instanceof c){var v=t(e)(u.value1);if(v instanceof i.EQ)return r=!0,new a.Just(u.value2);var s=t(e)(u.value4);return s instanceof i.EQ?(r=!0,new a.Just(u.value5)):v instanceof i.LT?void(n=u.value0):s instanceof i.GT?void(n=u.value6):void(n=u.value3)}throw new Error("Failed pattern match at Data.Map.Internal (line 200, column 5 - line 200, column 22): "+[u.constructor.name])}for(;!r;)u=o(n);return u}}},D=function(n){return function(e){return function(t){var a,r=n,i=e,o=!1;function l(n,e,a){if(e instanceof u.Nil)return o=!0,a;if(e instanceof u.Cons){if(e.value0 instanceof v)return r=n,i=e.value1,void(t=new f(a,e.value0.value0,e.value0.value1,e.value0.value2));if(e.value0 instanceof s)return r=n,i=e.value1,void(t=new f(e.value0.value0,e.value0.value1,e.value0.value2,a));if(e.value0 instanceof p)return r=n,i=e.value1,void(t=new c(a,e.value0.value0,e.value0.value1,e.value0.value2,e.value0.value3,e.value0.value4,e.value0.value5));if(e.value0 instanceof d)return r=n,i=e.value1,void(t=new c(e.value0.value0,e.value0.value1,e.value0.value2,a,e.value0.value3,e.value0.value4,e.value0.value5));if(e.value0 instanceof w)return r=n,i=e.value1,void(t=new c(e.value0.value0,e.value0.value1,e.value0.value2,e.value0.value3,e.value0.value4,e.value0.value5,a));throw new Error("Failed pattern match at Data.Map.Internal (line 418, column 3 - line 423, column 88): "+[e.value0.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 415, column 1 - line 415, column 80): "+[e.constructor.name,a.constructor.name])}for(;!o;)a=l(r,i,t);return a}}},g=function(n){return function(e){return function(t){var a,o=function(e){return function(t){var a,r=e,i=!1;function o(e,a){if(e instanceof u.Nil)return i=!0,new f(a.value0,a.value1,a.value2,a.value3);if(e instanceof u.Cons){if(e.value0 instanceof v)return i=!0,D(n)(e.value1)(new c(a.value0,a.value1,a.value2,a.value3,e.value0.value0,e.value0.value1,e.value0.value2));if(e.value0 instanceof s)return i=!0,D(n)(e.value1)(new c(e.value0.value0,e.value0.value1,e.value0.value2,a.value0,a.value1,a.value2,a.value3));if(e.value0 instanceof p)return r=e.value1,void(t=new m(new f(a.value0,a.value1,a.value2,a.value3),e.value0.value0,e.value0.value1,new f(e.value0.value2,e.value0.value3,e.value0.value4,e.value0.value5)));if(e.value0 instanceof d)return r=e.value1,void(t=new m(new f(e.value0.value0,e.value0.value1,e.value0.value2,a.value0),a.value1,a.value2,new f(a.value3,e.value0.value3,e.value0.value4,e.value0.value5)));if(e.value0 instanceof w)return r=e.value1,void(t=new m(new f(e.value0.value0,e.value0.value1,e.value0.value2,e.value0.value3),e.value0.value4,e.value0.value5,new f(a.value0,a.value1,a.value2,a.value3)));throw new Error("Failed pattern match at Data.Map.Internal (line 454, column 5 - line 459, column 108): "+[e.value0.constructor.name,a.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 451, column 3 - line 451, column 56): "+[e.constructor.name,a.constructor.name])}for(;!i;)a=o(r,t);return a}},h=r.compare(n);return a=u.Nil.value,function(r){var g,E=a,y=!1;function C(a,g){if(g instanceof l)return y=!0,o(a)(new m(l.value,e,t,l.value));if(g instanceof f){var C=h(e)(g.value1);return C instanceof i.EQ?(y=!0,D(n)(a)(new f(g.value0,e,t,g.value3))):C instanceof i.LT?(E=new u.Cons(new v(g.value1,g.value2,g.value3),a),void(r=g.value0)):(E=new u.Cons(new s(g.value0,g.value1,g.value2),a),void(r=g.value3))}if(g instanceof c){var A=h(e)(g.value1);if(A instanceof i.EQ)return y=!0,D(n)(a)(new c(g.value0,e,t,g.value3,g.value4,g.value5,g.value6));var _=h(e)(g.value4);return _ instanceof i.EQ?(y=!0,D(n)(a)(new c(g.value0,g.value1,g.value2,g.value3,e,t,g.value6))):A instanceof i.LT?(E=new u.Cons(new p(g.value1,g.value2,g.value3,g.value4,g.value5,g.value6),a),void(r=g.value0)):A instanceof i.GT&&_ instanceof i.LT?(E=new u.Cons(new d(g.value0,g.value1,g.value2,g.value4,g.value5,g.value6),a),void(r=g.value3)):(E=new u.Cons(new w(g.value0,g.value1,g.value2,g.value3,g.value4,g.value5),a),void(r=g.value6))}throw new Error("Failed pattern match at Data.Map.Internal (line 434, column 3 - line 434, column 55): "+[a.constructor.name,g.constructor.name])}for(;!y;)g=C(E,r);return g}}}},E=function(n){return function(e){var t,m=function(e){return function(t){var a,r=e,i=!1;function o(e,a){if(e instanceof u.Nil)return i=!0,a;if(e instanceof u.Cons){if(e.value0 instanceof v&&e.value0.value2 instanceof l&&a instanceof l)return i=!0,D(n)(e.value1)(new f(l.value,e.value0.value0,e.value0.value1,l.value));if(e.value0 instanceof s&&e.value0.value0 instanceof l&&a instanceof l)return i=!0,D(n)(e.value1)(new f(l.value,e.value0.value1,e.value0.value2,l.value));if(e.value0 instanceof v&&e.value0.value2 instanceof f)return r=e.value1,void(t=new c(a,e.value0.value0,e.value0.value1,e.value0.value2.value0,e.value0.value2.value1,e.value0.value2.value2,e.value0.value2.value3));if(e.value0 instanceof s&&e.value0.value0 instanceof f)return r=e.value1,void(t=new c(e.value0.value0.value0,e.value0.value0.value1,e.value0.value0.value2,e.value0.value0.value3,e.value0.value1,e.value0.value2,a));if(e.value0 instanceof v&&e.value0.value2 instanceof c)return i=!0,D(n)(e.value1)(new f(new f(a,e.value0.value0,e.value0.value1,e.value0.value2.value0),e.value0.value2.value1,e.value0.value2.value2,new f(e.value0.value2.value3,e.value0.value2.value4,e.value0.value2.value5,e.value0.value2.value6)));if(e.value0 instanceof s&&e.value0.value0 instanceof c)return i=!0,D(n)(e.value1)(new f(new f(e.value0.value0.value0,e.value0.value0.value1,e.value0.value0.value2,e.value0.value0.value3),e.value0.value0.value4,e.value0.value0.value5,new f(e.value0.value0.value6,e.value0.value1,e.value0.value2,a)));if(e.value0 instanceof p&&e.value0.value2 instanceof l&&e.value0.value5 instanceof l&&a instanceof l)return i=!0,D(n)(e.value1)(new c(l.value,e.value0.value0,e.value0.value1,l.value,e.value0.value3,e.value0.value4,l.value));if(e.value0 instanceof d&&e.value0.value0 instanceof l&&e.value0.value5 instanceof l&&a instanceof l)return i=!0,D(n)(e.value1)(new c(l.value,e.value0.value1,e.value0.value2,l.value,e.value0.value3,e.value0.value4,l.value));if(e.value0 instanceof w&&e.value0.value0 instanceof l&&e.value0.value3 instanceof l&&a instanceof l)return i=!0,D(n)(e.value1)(new c(l.value,e.value0.value1,e.value0.value2,l.value,e.value0.value4,e.value0.value5,l.value));if(e.value0 instanceof p&&e.value0.value2 instanceof f)return i=!0,D(n)(e.value1)(new f(new c(a,e.value0.value0,e.value0.value1,e.value0.value2.value0,e.value0.value2.value1,e.value0.value2.value2,e.value0.value2.value3),e.value0.value3,e.value0.value4,e.value0.value5));if(e.value0 instanceof d&&e.value0.value0 instanceof f)return i=!0,D(n)(e.value1)(new f(new c(e.value0.value0.value0,e.value0.value0.value1,e.value0.value0.value2,e.value0.value0.value3,e.value0.value1,e.value0.value2,a),e.value0.value3,e.value0.value4,e.value0.value5));if(e.value0 instanceof d&&e.value0.value5 instanceof f)return i=!0,D(n)(e.value1)(new f(e.value0.value0,e.value0.value1,e.value0.value2,new c(a,e.value0.value3,e.value0.value4,e.value0.value5.value0,e.value0.value5.value1,e.value0.value5.value2,e.value0.value5.value3)));if(e.value0 instanceof w&&e.value0.value3 instanceof f)return i=!0,D(n)(e.value1)(new f(e.value0.value0,e.value0.value1,e.value0.value2,new c(e.value0.value3.value0,e.value0.value3.value1,e.value0.value3.value2,e.value0.value3.value3,e.value0.value4,e.value0.value5,a)));if(e.value0 instanceof p&&e.value0.value2 instanceof c)return i=!0,D(n)(e.value1)(new c(new f(a,e.value0.value0,e.value0.value1,e.value0.value2.value0),e.value0.value2.value1,e.value0.value2.value2,new f(e.value0.value2.value3,e.value0.value2.value4,e.value0.value2.value5,e.value0.value2.value6),e.value0.value3,e.value0.value4,e.value0.value5));if(e.value0 instanceof d&&e.value0.value0 instanceof c)return i=!0,D(n)(e.value1)(new c(new f(e.value0.value0.value0,e.value0.value0.value1,e.value0.value0.value2,e.value0.value0.value3),e.value0.value0.value4,e.value0.value0.value5,new f(e.value0.value0.value6,e.value0.value1,e.value0.value2,a),e.value0.value3,e.value0.value4,e.value0.value5));if(e.value0 instanceof d&&e.value0.value5 instanceof c)return i=!0,D(n)(e.value1)(new c(e.value0.value0,e.value0.value1,e.value0.value2,new f(a,e.value0.value3,e.value0.value4,e.value0.value5.value0),e.value0.value5.value1,e.value0.value5.value2,new f(e.value0.value5.value3,e.value0.value5.value4,e.value0.value5.value5,e.value0.value5.value6)));if(e.value0 instanceof w&&e.value0.value3 instanceof c)return i=!0,D(n)(e.value1)(new c(e.value0.value0,e.value0.value1,e.value0.value2,new f(e.value0.value3.value0,e.value0.value3.value1,e.value0.value3.value2,e.value0.value3.value3),e.value0.value3.value4,e.value0.value3.value5,new f(e.value0.value3.value6,e.value0.value4,e.value0.value5,a)));throw new Error("Failed pattern match at Data.Map.Internal (line 511, column 9 - line 528, column 136): "+[e.value0.constructor.name,a.constructor.name])}throw new Error("Failed pattern match at Data.Map.Internal (line 508, column 5 - line 528, column 136): "+[e.constructor.name])}for(;!i;)a=o(r,t);return a}},h=function(n){return function(e){var t,a=n,r=!1;function i(n,t){if(t instanceof f&&t.value0 instanceof l&&t.value3 instanceof l)return r=!0,m(n)(l.value);if(t instanceof f)return a=new u.Cons(new s(t.value0,t.value1,t.value2),n),void(e=t.value3);if(t instanceof c&&t.value0 instanceof l&&t.value3 instanceof l&&t.value6 instanceof l)return r=!0,m(new u.Cons(new s(l.value,t.value1,t.value2),n))(l.value);if(t instanceof c)return a=new u.Cons(new w(t.value0,t.value1,t.value2,t.value3,t.value4,t.value5),n),void(e=t.value6);throw new Error("Failed pattern match at Data.Map.Internal (line 540, column 5 - line 544, column 107): "+[t.constructor.name])}for(;!r;)t=i(a,e);return t}},g=function(n){var e,t=!1;function u(e){if(e instanceof f&&e.value3 instanceof l)return t=!0,{key:e.value1,value:e.value2};if(e instanceof f)n=e.value3;else{if(e instanceof c&&e.value6 instanceof l)return t=!0,{key:e.value4,value:e.value5};if(!(e instanceof c))throw new Error("Failed pattern match at Data.Map.Internal (line 531, column 33 - line 535, column 45): "+[e.constructor.name]);n=e.value6}}for(;!t;)e=u(n);return e},E=r.compare(n);return t=u.Nil.value,function(r){var y,C=t,A=!1;function _(t,y){if(y instanceof l)return A=!0,a.Nothing.value;if(y instanceof f){var _=E(e)(y.value1);if(y.value3 instanceof l&&_ instanceof i.EQ)return A=!0,new a.Just(new o.Tuple(y.value2,m(t)(l.value)));if(_ instanceof i.EQ){var S=g(y.value0);return A=!0,new a.Just(new o.Tuple(y.value2,h(new u.Cons(new v(S.key,S.value,y.value3),t))(y.value0)))}return _ instanceof i.LT?(C=new u.Cons(new v(y.value1,y.value2,y.value3),t),void(r=y.value0)):(C=new u.Cons(new s(y.value0,y.value1,y.value2),t),void(r=y.value3))}if(y instanceof c){var b=y.value0 instanceof l&&y.value3 instanceof l&&y.value6 instanceof l,F=(_=E(e)(y.value4),E(e)(y.value1));return b&&F instanceof i.EQ?(A=!0,new a.Just(new o.Tuple(y.value2,D(n)(t)(new f(l.value,y.value4,y.value5,l.value))))):b&&_ instanceof i.EQ?(A=!0,new a.Just(new o.Tuple(y.value5,D(n)(t)(new f(l.value,y.value1,y.value2,l.value))))):F instanceof i.EQ?(S=g(y.value0),A=!0,new a.Just(new o.Tuple(y.value2,h(new u.Cons(new p(S.key,S.value,y.value3,y.value4,y.value5,y.value6),t))(y.value0)))):_ instanceof i.EQ?(S=g(y.value3),A=!0,new a.Just(new o.Tuple(y.value5,h(new u.Cons(new d(y.value0,y.value1,y.value2,S.key,S.value,y.value6),t))(y.value3)))):F instanceof i.LT?(C=new u.Cons(new p(y.value1,y.value2,y.value3,y.value4,y.value5,y.value6),t),void(r=y.value0)):F instanceof i.GT&&_ instanceof i.LT?(C=new u.Cons(new d(y.value0,y.value1,y.value2,y.value4,y.value5,y.value6),t),void(r=y.value3)):(C=new u.Cons(new w(y.value0,y.value1,y.value2,y.value3,y.value4,y.value5),t),void(r=y.value6))}throw new Error("Failed pattern match at Data.Map.Internal (line 481, column 34 - line 504, column 80): "+[y.constructor.name])}for(;!A;)y=_(C,r);return y}}},y=(e=a.Nothing.value,function(n){var t,u=e,r=!1;function i(e,t){if(t instanceof l)return r=!0,e;if(t instanceof f)return u=new a.Just({key:t.value1,value:t.value2}),void(n=t.value3);if(t instanceof c)return u=new a.Just({key:t.value4,value:t.value5}),void(n=t.value6);throw new Error("Failed pattern match at Data.Map.Internal (line 289, column 5 - line 289, column 22): "+[e.constructor.name,t.constructor.name])}for(;!r;)t=i(u,n);return t}),C=l.value,A=function(n){return function(e){return function(t){return a.maybe(t)(o.snd)(E(n)(e)(t))}}};t.empty=C,t.insert=g,t.lookup=h,t.findMax=y,t.delete=A,t.pop=E,t.alter=function(n){return function(e){return function(t){return function(u){var r=e(h(n)(t)(u));if(r instanceof a.Nothing)return A(n)(t)(u);if(r instanceof a.Just)return g(n)(t)(r.value0)(u);throw new Error("Failed pattern match at Data.Map.Internal (line 549, column 15 - line 551, column 25): "+[r.constructor.name])}}}}}(n),function(n){"use strict";n["Data.Monoid"]=n["Data.Monoid"]||{};var e=n["Data.Monoid"];e.Monoid=function(n,e){this.Semigroup0=n,this.mempty=e},e.mempty=function(n){return n.mempty}}(n),function(n){"use strict";n.split=function(n){return function(e){return e.split(n)}},n.trim=function(n){return n.trim()}}(n["Data.String.Common"]=n["Data.String.Common"]||{}),function(n){"use strict";n["Data.String.Common"]=n["Data.String.Common"]||{};var e=n["Data.String.Common"],t=n["Data.String.Common"];e.split=t.split,e.trim=t.trim}(n),function(n){"use strict";n.pureE=function(n){return function(){return n}},n.bindE=function(n){return function(e){return function(){return e(n())()}}}}(n.Effect=n.Effect||{}),function(n){"use strict";n["Control.Monad"]=n["Control.Monad"]||{};var e=n["Control.Monad"],t=n["Control.Applicative"],u=n["Control.Bind"];e.Monad=function(n,e){this.Applicative0=n,this.Bind1=e},e.ap=function(n){return function(e){return function(a){return u.bind(n.Bind1())(e)(function(e){return u.bind(n.Bind1())(a)(function(u){return t.pure(n.Applicative0())(e(u))})})}}}}(n),function(n){"use strict";n.Effect=n.Effect||{};var e=n.Effect,t=n.Effect,u=n["Control.Applicative"],a=n["Control.Apply"],r=n["Control.Bind"],i=n["Control.Monad"],o=n["Data.Functor"],l=new i.Monad(function(){return v},function(){return f}),f=new r.Bind(function(){return c},t.bindE),c=new a.Apply(function(){return s},i.ap(l)),v=new u.Applicative(function(){return c},t.pureE),s=new o.Functor(u.liftA1(v));e.functorEffect=s,e.applyEffect=c,e.applicativeEffect=v,e.bindEffect=f,e.monadEffect=l}(n),function(n){"use strict";var e=function(){var n={},e="Pure",t="Throw",u="Catch",a="Sync",r="Async",i="Bind",o="Bracket",l="Fork",f="Sequential",c="Map",v="Apply",s="Alt",p="Cons",d="Resume",w="Release",m="Finalizer",h="Finalized",D="Forked";function g(n,e,t,u){this.tag=n,this._1=e,this._2=t,this._3=u}function E(n){var e=function(e,t,u){return new g(n,e,t,u)};return e.tag=n,e}function y(n){return new g(e,void 0)}function C(n){try{n()}catch(e){setTimeout(function(){throw e},0)}}function A(n,e,t){try{return e(t())}catch(u){return n(u)}}function _(n,e,t){try{return e(t)()}catch(u){return t(n(u))(),y}}var S=function(){var n=1024,e=0,t=0,u=new Array(n),a=!1;function r(){var r;for(a=!0;0!==e;)e--,r=u[t],u[t]=void 0,t=(t+1)%n,r();a=!1}return{isDraining:function(){return a},enqueue:function(i){var o;e===n&&(o=a,r(),a=o),u[(t+e)%n]=i,e++,a||r()}}}();var b=0,F=1,I=2,M=3,k=4,T=5,B=6;function P(n,c,v){var s=0,D=b,E=v,y=null,L=null,U=null,q=null,R=null,O=0,x=0,J=null,Q=!0;function W(v){for(var x,z,G;;)switch(x=null,z=null,G=null,D){case I:D=F,E=U(E),null===q?U=null:(U=q._1,q=q._2);break;case M:n.isLeft(E)?(D=T,y=E,E=null):null===U?D=T:(D=I,E=n.fromRight(E));break;case F:switch(E.tag){case i:U&&(q=new g(p,U,q)),U=E._2,D=F,E=E._1;break;case e:null===U?(D=T,E=n.right(E._1)):(D=I,E=E._1);break;case a:D=M,E=A(n.left,n.right,E._1);break;case r:return D=k,void(E=_(n.left,E._1,function(n){return function(){s===v&&(s++,S.enqueue(function(){s===v+1&&(D=M,E=n,W(s))}))}}));case t:D=T,y=n.left(E._1),E=null;break;case u:R=new g(p,E,null===U?R:new g(p,new g(d,U,q),R,L),L),U=null,q=null,D=F,E=E._1;break;case o:O++,R=new g(p,E,null===U?R:new g(p,new g(d,U,q),R,L),L),U=null,q=null,D=F,E=E._1;break;case l:D=M,x=P(n,c,E._2),c&&c.register(x),E._1&&x.run(),E=n.right(x);break;case f:D=F,E=N(n,c,E._1)}break;case T:if(U=null,q=null,null===R)D=B,E=L||y||E;else switch(x=R._3,G=R._1,R=R._2,G.tag){case u:L&&L!==x?D=T:y&&(D=F,E=G._2(n.fromLeft(y)),y=null);break;case d:L&&L!==x||y?D=T:(U=G._1,q=G._2,D=I,E=n.fromRight(E));break;case o:O--,null===y&&(z=n.fromRight(E),R=new g(p,new g(w,G._2,z),R,x),(L===x||O>0)&&(D=F,E=G._3(z)));break;case w:O++,R=new g(p,new g(h,E,y),R,L),D=F,E=L&&L!==x?G._1.killed(n.fromLeft(L))(G._2):y?G._1.failed(n.fromLeft(y))(G._2):G._1.completed(n.fromRight(E))(G._2),y=null;break;case m:O++,R=new g(p,new g(h,E,y),R,L),D=F,E=G._1;break;case h:O--,D=T,E=G._1,y=G._2}break;case B:for(var K in J)J.hasOwnProperty(K)&&(Q=Q&&J[K].rethrow,C(J[K].handler(E)));return J=null,void(L&&y?setTimeout(function(){throw n.fromLeft(y)},0):n.isLeft(E)&&Q&&setTimeout(function(){if(Q)throw n.fromLeft(E)},0));case b:D=F;break;case k:return}}function z(n){return function(){if(D===B)return Q=Q&&n.rethrow,n.handler(E)(),function(){};var e=x++;return(J=J||{})[e]=n,function(){null!==J&&delete J[e]}}}return{kill:function(e,t){return function(){if(D===B)return t(n.right(void 0))(),function(){};var u=z({rethrow:!1,handler:function(){return t(n.right(void 0))}})();switch(D){case b:L=n.left(e),D=B,E=L,W(s);break;case k:null===L&&(L=n.left(e)),0===O&&(D===k&&(R=new g(p,new g(m,E(e)),R,L)),D=T,E=null,y=null,W(++s));break;default:null===L&&(L=n.left(e)),0===O&&(D=T,E=null,y=null)}return u}},join:function(n){return function(){var e=z({rethrow:!1,handler:n})();return D===b&&W(s),e}},onComplete:z,isSuspended:function(){return D===b},run:function(){D===b&&(S.isDraining()?W(s):S.enqueue(function(){W(s)}))}}}function L(e,t,u,a){var i=0,o={},l=0,f={},d=new Error("[ParAff] Early exit"),w=null,m=n;function h(t,u,a){var r,i,l=u,f=null,d=null,w=0,m={};n:for(;;)switch(r=null,l.tag){case D:if(l._3===n&&(r=o[l._1],m[w++]=r.kill(t,function(n){return function(){0===--w&&a(n)()}})),null===f)break n;l=f._2,null===d?f=null:(f=d._1,d=d._2);break;case c:l=l._2;break;case v:case s:f&&(d=new g(p,f,d)),f=l,l=l._1}if(0===w)a(e.right(void 0))();else for(i=0,r=w;i<r;i++)m[i]=m[i]();return m}function E(t){return function(u){return function(){delete o[t._1],t._3=u,function t(u,r,i){var o,p,m,D,g,E;for(e.isLeft(u)?(o=u,p=null):(p=u,o=null);;){if(m=null,D=null,g=null,E=null,null!==w)return;if(null===r)return void a(o||p)();if(r._3!==n)return;switch(r.tag){case c:null===o?(r._3=e.right(r._1(e.fromRight(p))),p=r._3):r._3=o;break;case v:if(m=r._1._3,D=r._2._3,o){if(r._3=o,g=!0,E=l++,f[E]=h(d,o===m?r._2:r._1,function(){return function(){delete f[E],g?g=!1:null===i?t(o,null,null):t(o,i._1,i._2)}}),g)return void(g=!1)}else{if(m===n||D===n)return;p=e.right(e.fromRight(m)(e.fromRight(D))),r._3=p}break;case s:if(m=r._1._3,D=r._2._3,m===n&&e.isLeft(D)||D===n&&e.isLeft(m))return;if(m!==n&&e.isLeft(m)&&D!==n&&e.isLeft(D))o=p===m?D:m,p=null,r._3=o;else if(r._3=p,g=!0,E=l++,f[E]=h(d,p===m?r._2:r._1,function(){return function(){delete f[E],g?g=!1:null===i?t(p,null,null):t(p,i._1,i._2)}}),g)return void(g=!1)}null===i?r=null:(r=i._1,i=i._2)}}(u,t._2._1,t._2._2)}}}return function(){var a,r,l=F,f=u,d=null,w=null;n:for(;;)switch(a=null,r=null,l){case F:switch(f.tag){case c:d&&(w=new g(p,d,w)),d=new g(c,f._1,n,n),f=f._2;break;case v:d&&(w=new g(p,d,w)),d=new g(v,n,f._2,n),f=f._1;break;case s:d&&(w=new g(p,d,w)),d=new g(s,n,f._2,n),f=f._1;break;default:r=i++,l=T,a=f,f=new g(D,r,new g(p,d,w),n),(a=P(e,t,a)).onComplete({rethrow:!1,handler:E(f)})(),o[r]=a,t&&t.register(a)}break;case T:if(null===d)break n;d._1===n?(d._1=f,l=F,f=d._2,d._2=n):(d._2=f,f=d,null===w?d=null:(d=w._1,w=w._2))}for(m=f,r=0;r<i;r++)o[r].run()}(),function(n){return new g(r,function(t){return function(){return function(n,t){var u;for(var a in w=e.left(n),f)if(f.hasOwnProperty(a))for(a in u=f[a])u.hasOwnProperty(a)&&u[a]();f=null;var i=h(n,m,t);return function(n){return new g(r,function(n){return function(){for(var n in i)i.hasOwnProperty(n)&&i[n]();return y}})}}(n,t)}})}}function N(n,e,t){return new g(r,function(u){return function(){return L(n,e,t,u)}})}return g.EMPTY=n,g.Pure=E(e),g.Throw=E(t),g.Catch=E(u),g.Sync=E(a),g.Async=E(r),g.Bind=E(i),g.Bracket=E(o),g.Fork=E(l),g.Seq=E(f),g.ParMap=E(c),g.ParApply=E(v),g.ParAlt=E(s),g.Fiber=P,g.Supervisor=function(n){var e={},t=0,u=0;return{register:function(n){var a=t++;n.onComplete({rethrow:!0,handler:function(n){return function(){u--,delete e[a]}}}),e[a]=n,u++},isEmpty:function(){return 0===u},killAll:function(r,i){return function(){var o=0,l={};function f(t){l[t]=e[t].kill(r,function(e){return function(){delete l[t],o--,n.isLeft(e)&&n.fromLeft(e)&&setTimeout(function(){throw n.fromLeft(e)},0),0===o&&i()}})()}for(var c in e)e.hasOwnProperty(c)&&(o++,f(c));return e={},t=0,u=0,function(n){return new g(a,function(){for(var n in l)l.hasOwnProperty(n)&&l[n]()})}}}}},g.Scheduler=S,g.nonCanceler=y,g}();n._pure=e.Pure,n._map=function(n){return function(t){return t.tag===e.Pure.tag?e.Pure(n(t._1)):e.Bind(t,function(t){return e.Pure(n(t))})}},n._bind=function(n){return function(t){return e.Bind(n,t)}},n._liftEffect=e.Sync,n._parAffMap=function(n){return function(t){return e.ParMap(n,t)}},n._parAffApply=function(n){return function(t){return e.ParApply(n,t)}},n.makeAff=e.Async,n._makeFiber=function(n,t){return function(){return e.Fiber(n,null,t)}},n._sequential=e.Seq}(n["Effect.Aff"]=n["Effect.Aff"]||{}),function(n){"use strict";n["Control.Parallel.Class"]=n["Control.Parallel.Class"]||{};var e=n["Control.Parallel.Class"];e.parallel=function(n){return n.parallel},e.sequential=function(n){return n.sequential},e.Parallel=function(n,e,t,u){this.Applicative1=n,this.Monad0=e,this.parallel=t,this.sequential=u}}(n),function(n){"use strict";n.foldrArray=function(n){return function(e){return function(t){for(var u=e,a=t.length-1;a>=0;a--)u=n(t[a])(u);return u}}},n.foldlArray=function(n){return function(e){return function(t){for(var u=e,a=t.length,r=0;r<a;r++)u=n(u)(t[r]);return u}}}}(n["Data.Foldable"]=n["Data.Foldable"]||{}),function(n){"use strict";n["Data.Semigroup"]=n["Data.Semigroup"]||{};var e=n["Data.Semigroup"];e.Semigroup=function(n){this.append=n},e.append=function(n){return n.append}}(n),function(n){"use strict";n["Data.Foldable"]=n["Data.Foldable"]||{};var e=n["Data.Foldable"],t=n["Data.Foldable"],u=n["Control.Applicative"],a=n["Control.Apply"],r=n["Data.Monoid"],i=n["Data.Semigroup"],o=n["Data.Unit"],l=function(n,e,t){this.foldMap=n,this.foldl=e,this.foldr=t},f=function(n){return n.foldr},c=function(n){return function(e){return function(t){return f(n)(function(n){return function(u){return i.append(e.Semigroup0())(t(n))(u)}})(r.mempty(e))}}},v=new l(function(n){return c(v)(n)},t.foldlArray,t.foldrArray);e.Foldable=l,e.foldr=f,e.foldl=function(n){return n.foldl},e.foldMap=function(n){return n.foldMap},e.foldMapDefaultR=c,e.traverse_=function(n){return function(e){return function(t){return f(e)(function(e){return a.applySecond(n.Apply0())(t(e))})(u.pure(n)(o.unit))}}},e.foldableArray=v}(n),function(n){"use strict";n["Control.Parallel"]=n["Control.Parallel"]||{};var e=n["Control.Parallel"],t=n["Control.Category"],u=n["Control.Parallel.Class"],a=n["Data.Foldable"],r=function(n){return function(e){return function(t){return function(r){return u.sequential(n)(a.traverse_(n.Applicative1())(e)(function(e){return u.parallel(n)(t(e))})(r))}}}};e.parTraverse_=r,e.parSequence_=function(n){return function(e){return r(n)(e)(t.identity(t.categoryFn))}}}(n),function(n){"use strict";n["Effect.Class"]=n["Effect.Class"]||{};var e=n["Effect.Class"];e.liftEffect=function(n){return n.liftEffect},e.MonadEffect=function(n,e){this.Monad0=n,this.liftEffect=e}}(n),function(e){"use strict";(n["Partial.Unsafe"]=n["Partial.Unsafe"]||{}).unsafePartial=function(n){return n()}}(),function(e){"use strict";(n["Partial"]=n["Partial"]||{}).crashWith=function(){return function(n){throw new Error(n)}}}(),function(n){"use strict";n.Partial=n.Partial||{};var e=n.Partial,t=n.Partial;e.crashWith=t.crashWith}(n),function(n){"use strict";n["Partial.Unsafe"]=n["Partial.Unsafe"]||{};var e=n["Partial.Unsafe"],t=n["Partial.Unsafe"],u=n.Partial;e.unsafeCrashWith=function(n){return t.unsafePartial(function(e){return u.crashWith(e)(n)})}}(n),function(e){"use strict";(n["Unsafe.Coerce"]=n["Unsafe.Coerce"]||{}).unsafeCoerce=function(n){return n}}(),function(n){"use strict";n["Unsafe.Coerce"]=n["Unsafe.Coerce"]||{};var e=n["Unsafe.Coerce"],t=n["Unsafe.Coerce"];e.unsafeCoerce=t.unsafeCoerce}(n),function(n){"use strict";n["Effect.Aff"]=n["Effect.Aff"]||{};var e=n["Effect.Aff"],t=n["Effect.Aff"],u=n["Control.Applicative"],a=n["Control.Apply"],r=n["Control.Bind"],i=n["Control.Monad"],o=n["Control.Parallel"],l=n["Control.Parallel.Class"],f=n["Data.Either"],c=n["Data.Foldable"],v=n["Data.Function"],s=n["Data.Functor"],p=n["Data.Monoid"],d=n["Data.Semigroup"],w=n["Data.Unit"],m=n.Effect,h=n["Effect.Class"],D=n["Partial.Unsafe"],g=n["Unsafe.Coerce"],E=new s.Functor(t._parAffMap),y=new s.Functor(t._map),C={isLeft:function(n){if(n instanceof f.Left)return!0;if(n instanceof f.Right)return!1;throw new Error("Failed pattern match at Effect.Aff (line 390, column 12 - line 392, column 20): "+[n.constructor.name])},fromLeft:function(n){if(n instanceof f.Left)return n.value0;if(n instanceof f.Right)return D.unsafeCrashWith("unsafeFromLeft: Right");throw new Error("Failed pattern match at Effect.Aff (line 395, column 20 - line 399, column 3): "+[n.constructor.name])},fromRight:function(n){if(n instanceof f.Right)return n.value0;if(n instanceof f.Left)return D.unsafeCrashWith("unsafeFromRight: Left");throw new Error("Failed pattern match at Effect.Aff (line 400, column 21 - line 402, column 31): "+[n.constructor.name])},left:f.Left.create,right:f.Right.create},A=function(n){return function(){var e=function(n){return t._makeFiber(C,n)}(n)();return e.run(),e}},_=new a.Apply(function(){return E},t._parAffApply),S=new i.Monad(function(){return I},function(){return b}),b=new r.Bind(function(){return F},t._bind),F=new a.Apply(function(){return y},i.ap(S)),I=new u.Applicative(function(){return F},t._pure),M=new h.MonadEffect(function(){return S},t._liftEffect),k=new l.Parallel(function(){return T},function(){return S},g.unsafeCoerce,t._sequential),T=new u.Applicative(function(){return _},function(n){return l.parallel(k)(u.pure(I)(n))}),B=new d.Semigroup(function(n){return function(e){return function(t){return o.parSequence_(k)(c.foldableArray)([n(t),e(t)])}}}),P=v.const(u.pure(I)(w.unit)),L=new p.Monoid(function(){return B},P);e.launchAff=A,e.launchAff_=function(n){return s.void(m.functorEffect)(A(n))},e.nonCanceler=P,e.functorAff=y,e.applyAff=F,e.applicativeAff=I,e.bindAff=b,e.monadAff=S,e.monadEffectAff=M,e.functorParAff=E,e.applyParAff=_,e.applicativeParAff=T,e.parallelAff=k,e.semigroupCanceler=B,e.monoidCanceler=L,e.makeAff=t.makeAff}(n),function(n){"use strict";n.new=function(n){return function(){return{value:n}}},n.read=function(n){return function(){return n.value}},n.write=function(n){return function(e){return function(){return e.value=n,{}}}}}(n["Effect.Ref"]=n["Effect.Ref"]||{}),function(n){"use strict";n["Effect.Ref"]=n["Effect.Ref"]||{};var e=n["Effect.Ref"],t=n["Effect.Ref"];e.new=t.new,e.read=t.read,e.write=t.write}(n),function(n){"use strict";n["Data.Show"]=n["Data.Show"]||{};var e=n["Data.Show"];e.Show=function(n){this.show=n},e.show=function(n){return n.show}}(n),function(n){"use strict";n["Node.Encoding"]=n["Node.Encoding"]||{};var e=n["Node.Encoding"],t=n["Data.Show"],u=function(){function n(){}return n.value=new n,n}(),a=function(){function n(){}return n.value=new n,n}(),r=function(){function n(){}return n.value=new n,n}(),i=function(){function n(){}return n.value=new n,n}(),o=function(){function n(){}return n.value=new n,n}(),l=function(){function n(){}return n.value=new n,n}(),f=function(){function n(){}return n.value=new n,n}(),c=function(){function n(){}return n.value=new n,n}(),v=new t.Show(function(n){if(n instanceof u)return"ASCII";if(n instanceof a)return"UTF8";if(n instanceof r)return"UTF16LE";if(n instanceof i)return"UCS2";if(n instanceof o)return"Base64";if(n instanceof l)return"Latin1";if(n instanceof f)return"Binary";if(n instanceof c)return"Hex";throw new Error("Failed pattern match at Node.Encoding (line 19, column 1 - line 19, column 39): "+[n.constructor.name])});e.ASCII=u,e.UTF8=a,e.UTF16LE=r,e.UCS2=i,e.Base64=o,e.Latin1=l,e.Binary=f,e.Hex=c,e.encodingToNode=function(n){if(n instanceof u)return"ascii";if(n instanceof a)return"utf8";if(n instanceof r)return"utf16le";if(n instanceof i)return"ucs2";if(n instanceof o)return"base64";if(n instanceof l)return"latin1";if(n instanceof f)return"binary";if(n instanceof c)return"hex";throw new Error("Failed pattern match at Node.Encoding (line 31, column 1 - line 31, column 37): "+[n.constructor.name])},e.showEncoding=v}(n),function(e){"use strict";(n["Node.Process"]=n["Node.Process"]||{}).process=process}(),function(n){"use strict";n["Node.Process"]=n["Node.Process"]||{};var e=n["Node.Process"],t=n["Node.Process"],u=t.process.stdout,a=t.process.stdin;e.stdin=a,e.stdout=u}(n),function(n){"use strict";n.readChunkImpl=function(n){return function(e){return function(t){if(t instanceof Buffer)return e(t);if("string"==typeof t)return n(t);throw new Error("Node.Stream.readChunkImpl: Unrecognised chunk type; expected String or Buffer, got: "+t)}}},n.onDataEitherImpl=function(n){return function(e){return function(t){return function(){e.on("data",function(e){t(n(e))()})}}}},n.onEnd=function(n){return function(e){return function(){n.on("end",e)}}},n.write=function(n){return function(e){return function(t){return function(){return n.write(e,null,t)}}}},n.writeStringImpl=function(n){return function(e){return function(t){return function(u){return function(){return n.write(t,e,u)}}}}}}(n["Node.Stream"]=n["Node.Stream"]||{}),function(n){"use strict";n.error=function(n){return new Error(n)},n.throwException=function(n){return function(){throw n}}}(n["Effect.Exception"]=n["Effect.Exception"]||{}),function(n){"use strict";n["Effect.Exception"]=n["Effect.Exception"]||{};var e=n["Effect.Exception"],t=n["Effect.Exception"];e.throw=function(n){return t.throwException(t.error(n))}}(n),function(e){"use strict";(n["Node.Buffer"]=n["Node.Buffer"]||{}).toStringImpl=function(n){return function(e){return function(){return e.toString(n)}}}}(),function(n){"use strict";n["Node.Buffer"]=n["Node.Buffer"]||{};var e=n["Node.Buffer"],t=n["Node.Buffer"],u=n["Node.Encoding"];e.toString=function(n){return t.toStringImpl(u.encodingToNode(n))}}(n),function(n){"use strict";n["Node.Stream"]=n["Node.Stream"]||{};var e=n["Node.Stream"],t=n["Node.Stream"],u=n["Control.Applicative"],a=n["Control.Bind"],r=n["Data.Either"],i=n["Data.Show"],o=n.Effect,l=n["Effect.Exception"],f=n["Node.Buffer"],c=n["Node.Encoding"],v=t.readChunkImpl(r.Left.create)(r.Right.create),s=function(n){return function(e){return t.onDataEitherImpl(v)(n)(e)}},p=function(n){return function(e){return s(n)(a.composeKleisliFlipped(o.bindEffect)(e)(function(n){if(n instanceof r.Left)return l.throw("Stream encoding should not be set");if(n instanceof r.Right)return u.pure(o.applicativeEffect)(n.value0);throw new Error("Failed pattern match at Node.Stream (line 94, column 5 - line 98, column 17): "+[n.constructor.name])}))}};e.onData=p,e.onDataString=function(n){return function(e){return function(t){return p(n)(a.composeKleisliFlipped(o.bindEffect)(t)(f.toString(e)))}}},e.onDataEither=s,e.writeString=function(n){return function(e){return t.writeStringImpl(n)(i.show(c.showEncoding)(e))}},e.onEnd=t.onEnd}(n),function(n){"use strict";n.ABC127D=n.ABC127D||{};var e=n.ABC127D,t=n["Control.Applicative"],u=n["Control.Bind"],a=n["Control.Category"],r=n["Control.Monad.ST.Internal"],i=n["Data.Array"],o=n["Data.BigInt"],l=n["Data.Either"],f=n["Data.Functor"],c=n["Data.Int"],v=n["Data.Map.Internal"],s=n["Data.Maybe"],p=n["Data.Monoid"],d=n["Data.Ord"],w=n["Data.Semiring"],m=n["Data.String.Common"],h=n["Data.Tuple"],D=n["Data.Unit"],g=n.Effect,E=n["Effect.Aff"],y=n["Effect.Class"],C=n["Effect.Ref"],A=n["Node.Encoding"],_=n["Node.Process"],S=n["Node.Stream"],b=n["Partial.Unsafe"],F=function(n){return m.split(" ")(n)},I=E.makeAff(function(n){return function(){var e=C.new("")();return S.onDataString(_.stdin)(A.UTF8.value)(function(n){return function(){var t=C.read(e)();return C.write(t+n)(e)()}})(),S.onEnd(_.stdin)(function(){var u=C.read(e)();return n(t.pure(l.applicativeEither)(u))()})(),p.mempty(E.monoidCanceler)}}),M=function(n){var e=i.mapMaybe(c.fromString)(F(n));return 2===e.length?new s.Just(new h.Tuple(e[0],e[1])):s.Nothing.value},k=function(n){return l.either(function(n){return b.unsafeCrashWith(n)})(a.identity(a.categoryFn))((e=n,p=m.split("\n")(m.trim(e)),u.bind(l.bindEither)(l.note("nmLine")(i.head(i.take(1)(p))))(function(n){return u.bind(l.bindEither)(l.note("asLine")(i.head(i.drop(1)(i.take(2)(p)))))(function(e){var a=i.drop(2)(p);return u.bind(l.bindEither)(l.note("n m ")(M(n)))(function(n){var u,p=i.mapMaybe(c.fromString)(F(e)),m=i.mapMaybe(M)(a);return t.pure(l.applicativeEither)(o.toString((u=n.value0,function(n){return function(n){return function(e){return function(){var t={value:v.empty};r.foreach(n)(function(n){return function(){var e=v.alter(d.ordInt)(function(n){return s.Just.create(s.maybe(1)(w.add(w.semiringInt)(1))(n))})(n)(t.value);return f.void(r.functorST)(r.write(e)(t))()}})(),r.foreach(e)(function(n){return function(){var e=v.alter(d.ordInt)(function(e){return s.Just.create(s.maybe(n.value0)(function(e){return d.min(d.ordInt)(u)(n.value0+e|0)})(e))})(n.value1)(t.value);return f.void(r.functorST)(r.write(e)(t))()}})();var a={value:0},i={value:w.zero(o.semiringBigInt)};return function(){for(;n=void 0,e=void 0,l=void 0,c=void 0,p=void 0,m=void 0,n=s.fromJust()(v.findMax(t.value)),e=o.fromInt(d.min(d.ordInt)(u-a.value|0)(n.value)),l=v.delete(d.ordInt)(n.key)(t.value),c=o.fromInt(n.key),p=a.value+n.value|0,m=p<u,f.void(r.functorST)(r.write(p)(a))(),f.void(r.functorST)(r.write(l)(t))(),f.void(r.functorST)(r.modify(w.add(o.semiringBigInt)(w.mul(o.semiringBigInt)(c)(e)))(i))(),m;)D.unit;var n,e,l,c,p,m}(),i.value}()}}})(n.value1)(p)(m))+"\n")})})})));var e,p},T=E.launchAff_(u.bind(E.bindAff)(I)(function(n){return u.bind(E.bindAff)(t.pure(E.applicativeAff)(k(n)))(function(n){return y.liftEffect(E.monadEffectAff)((e=n,f.void(g.functorEffect)(S.writeString(_.stdout)(A.UTF8.value)(e)(t.pure(g.applicativeEffect)(D.unit)))));var e})}));e.main=T,e.solve=k}(n),n.ABC127D.main();
},{"big-integer":"9xaU"}]},{},["Focm"], null)