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}({"Focm":[function(require,module,exports) {
var n={};!function(t){"use strict";(n["Control.Apply"]=n["Control.Apply"]||{}).arrayApply=function(n){return function(t){for(var r=n.length,e=t.length,i=new Array(r*e),u=0,o=0;o<r;o++)for(var a=n[o],c=0;c<e;c++)i[u++]=a(t[c]);return i}}}(),function(n){"use strict";n["Control.Semigroupoid"]=n["Control.Semigroupoid"]||{};var t=n["Control.Semigroupoid"],r=function(n){this.compose=n},e=new r(function(n){return function(t){return function(r){return n(t(r))}}});t.compose=function(n){return n.compose},t.Semigroupoid=r,t.semigroupoidFn=e}(n),function(n){"use strict";n["Control.Category"]=n["Control.Category"]||{};var t=n["Control.Category"],r=n["Control.Semigroupoid"],e=function(n,t){this.Semigroupoid0=n,this.identity=t},i=new e(function(){return r.semigroupoidFn},function(n){return n});t.Category=e,t.identity=function(n){return n.identity},t.categoryFn=i}(n),function(n){"use strict";n["Data.Function"]=n["Data.Function"]||{};var t=n["Data.Function"];t.flip=function(n){return function(t){return function(r){return n(r)(t)}}},t.const=function(n){return function(t){return n}}}(n),function(t){"use strict";(n["Data.Functor"]=n["Data.Functor"]||{}).arrayMap=function(n){return function(t){for(var r=t.length,e=new Array(r),i=0;i<r;i++)e[i]=n(t[i]);return e}}}(),function(t){"use strict";(n["Data.Unit"]=n["Data.Unit"]||{}).unit={}}(),function(n){"use strict";n["Data.Unit"]=n["Data.Unit"]||{};var t=n["Data.Unit"],r=n["Data.Unit"];t.unit=r.unit}(n),function(n){"use strict";n["Data.Functor"]=n["Data.Functor"]||{};var t=n["Data.Functor"],r=n["Data.Functor"],e=n["Data.Function"],i=n["Data.Unit"],u=function(n){this.map=n},o=function(n){return n.map},a=new u(r.arrayMap);t.Functor=u,t.map=o,t.void=function(n){return o(n)(e.const(i.unit))},t.functorArray=a}(n),function(n){"use strict";n["Control.Apply"]=n["Control.Apply"]||{};var t=n["Control.Apply"],r=n["Control.Apply"],e=n["Control.Category"],i=n["Data.Function"],u=n["Data.Functor"],o=function(n,t){this.Functor0=n,this.apply=t},a=new o(function(){return u.functorArray},r.arrayApply),c=function(n){return n.apply};t.Apply=o,t.apply=c,t.applySecond=function(n){return function(t){return function(r){return c(n)(u.map(n.Functor0())(i.const(e.identity(e.categoryFn)))(t))(r)}}},t.applyArray=a}(n),function(n){"use strict";n["Control.Applicative"]=n["Control.Applicative"]||{};var t=n["Control.Applicative"],r=n["Control.Apply"],e=function(n){return n.pure};t.Applicative=function(n,t){this.Apply0=n,this.pure=t},t.pure=e,t.liftA1=function(n){return function(t){return function(i){return r.apply(n.Apply0())(e(n)(t))(i)}}}}(n),function(t){"use strict";(n["Control.Bind"]=n["Control.Bind"]||{}).arrayBind=function(n){return function(t){for(var r=[],e=0,i=n.length;e<i;e++)Array.prototype.push.apply(r,t(n[e]));return r}}}(),function(n){"use strict";n["Control.Bind"]=n["Control.Bind"]||{};var t=n["Control.Bind"],r=n["Control.Bind"],e=n["Control.Apply"],i=n["Data.Function"],u=function(n,t){this.Apply0=n,this.bind=t},o=new u(function(){return e.applyArray},r.arrayBind),a=function(n){return n.bind},c=function(n){return i.flip(a(n))};t.Bind=u,t.bind=a,t.bindFlipped=c,t.composeKleisliFlipped=function(n){return function(t){return function(r){return function(e){return c(n)(t)(r(e))}}}},t.bindArray=o}(n),function(n){"use strict";n.map_=function(n){return function(t){return function(){return n(t())}}},n.pure_=function(n){return function(){return n}},n.bind_=function(n){return function(t){return function(){return t(n())()}}},n.for=function(n){return function(t){return function(r){return function(){for(var e=n;e<t;e++)r(e)()}}}},n.read=function(n){return function(){return n.value}},n["modify'"]=function(n){return function(t){return function(){var r=n(t.value);return t.value=r.state,r.value}}}}(n["Control.Monad.ST.Internal"]=n["Control.Monad.ST.Internal"]||{}),function(n){"use strict";n["Control.Monad"]=n["Control.Monad"]||{};var t=n["Control.Monad"],r=n["Control.Applicative"],e=n["Control.Bind"];t.Monad=function(n,t){this.Applicative0=n,this.Bind1=t},t.ap=function(n){return function(t){return function(i){return e.bind(n.Bind1())(t)(function(t){return e.bind(n.Bind1())(i)(function(e){return r.pure(n.Applicative0())(t(e))})})}}}}(n),function(n){"use strict";n["Control.Monad.ST.Internal"]=n["Control.Monad.ST.Internal"]||{};var t=n["Control.Monad.ST.Internal"],r=n["Control.Monad.ST.Internal"],e=n["Control.Applicative"],i=n["Control.Apply"],u=n["Control.Bind"],o=n["Control.Monad"],a=new n["Data.Functor"].Functor(r.map_),c=new o.Monad(function(){return s},function(){return f}),f=new u.Bind(function(){return l},r.bind_),l=new i.Apply(function(){return a},o.ap(c)),s=new e.Applicative(function(){return l},r.pure_);t.modify=function(n){return r["modify'"](function(t){var r=n(t);return{state:r,value:r}})},t.functorST=a,t.applyST=l,t.applicativeST=s,t.bindST=f,t.monadST=c,t.for=r.for,t.read=r.read}(n),function(n){"use strict";n["Data.Maybe"]=n["Data.Maybe"]||{};var t=n["Data.Maybe"],r=function(){function n(){}return n.value=new n,n}(),e=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}();t.Nothing=r,t.Just=e,t.maybe=function(n){return function(t){return function(i){if(i instanceof r)return n;if(i instanceof e)return t(i.value0);throw new Error("Failed pattern match at Data.Maybe (line 217, column 1 - line 217, column 51): "+[n.constructor.name,t.constructor.name,i.constructor.name])}}},t.fromJust=function(n){return function(n){if(n instanceof e)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 t=n["Data.Array"],r=n["Control.Bind"],e=n["Data.Function"],i=n["Data.Maybe"],u=function(n){return[n]},o=e.flip(r.bind(r.bindArray));t.singleton=u,t.concatMap=o,t.mapMaybe=function(n){return o(function(t){return i.maybe([])(u)(n(t))})}}(n),function(n){"use strict";n["Data.Either"]=n["Data.Either"]||{};var t=n["Data.Either"],r=n["Control.Applicative"],e=n["Control.Apply"],i=n["Control.Bind"],u=n["Data.Functor"],o=n["Data.Maybe"],a=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}(),c=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}(),f=new u.Functor(function(n){return function(t){if(t instanceof a)return new a(t.value0);if(t instanceof c)return new c(n(t.value0));throw new Error("Failed pattern match at Data.Either (line 38, column 8 - line 38, column 52): "+[t.constructor.name])}}),l=function(n){return function(t){return function(r){if(r instanceof a)return n(r.value0);if(r instanceof c)return t(r.value0);throw new Error("Failed pattern match at Data.Either (line 238, column 1 - line 238, column 64): "+[n.constructor.name,t.constructor.name,r.constructor.name])}}},s=new e.Apply(function(){return f},function(n){return function(t){if(n instanceof a)return new a(n.value0);if(n instanceof c)return u.map(f)(n.value0)(t);throw new Error("Failed pattern match at Data.Either (line 82, column 1 - line 82, column 41): "+[n.constructor.name,t.constructor.name])}}),m=new i.Bind(function(){return s},l(function(n){return function(t){return new a(n)}})(function(n){return function(t){return t(n)}})),d=new r.Applicative(function(){return s},c.create);t.Left=a,t.Right=c,t.either=l,t.note=function(n){return o.maybe(new a(n))(c.create)},t.functorEither=f,t.applyEither=s,t.applicativeEither=d,t.bindEither=m}(n),function(n){"use strict";n.intDegree=function(n){return Math.min(Math.abs(n),2147483647)},n.intDiv=function(n){return function(t){return 0===t?0:t>0?Math.floor(n/t):-Math.floor(n/-t)}},n.intMod=function(n){return function(t){if(0===t)return 0;var r=Math.abs(t);return(n%r+r)%r}}}(n["Data.EuclideanRing"]=n["Data.EuclideanRing"]||{}),function(t){"use strict";(n["Data.Ring"]=n["Data.Ring"]||{}).intSub=function(n){return function(t){return n-t|0}}}(),function(n){"use strict";n.intAdd=function(n){return function(t){return n+t|0}},n.intMul=function(n){return function(t){return n*t|0}}}(n["Data.Semiring"]=n["Data.Semiring"]||{}),function(n){"use strict";n["Data.Semiring"]=n["Data.Semiring"]||{};var t=n["Data.Semiring"],r=n["Data.Semiring"],e=function(n,t,r,e){this.add=n,this.mul=t,this.one=r,this.zero=e},i=new e(r.intAdd,r.intMul,1,0);t.Semiring=e,t.add=function(n){return n.add},t.zero=function(n){return n.zero},t.mul=function(n){return n.mul},t.one=function(n){return n.one},t.semiringInt=i}(n),function(n){"use strict";n["Data.Ring"]=n["Data.Ring"]||{};var t=n["Data.Ring"],r=n["Data.Ring"],e=n["Data.Semiring"],i=function(n,t){this.Semiring0=n,this.sub=t},u=function(n){return n.sub},o=new i(function(){return e.semiringInt},r.intSub);t.Ring=i,t.sub=u,t.negate=function(n){return function(t){return u(n)(e.zero(n.Semiring0()))(t)}},t.ringInt=o}(n),function(n){"use strict";n["Data.CommutativeRing"]=n["Data.CommutativeRing"]||{};var t=n["Data.CommutativeRing"],r=n["Data.Ring"],e=function(n){this.Ring0=n},i=new e(function(){return r.ringInt});t.CommutativeRing=e,t.commutativeRingInt=i}(n),function(t){"use strict";(n["Data.Eq"]=n["Data.Eq"]||{}).refEq=function(n){return function(t){return n===t}}}(),function(n){"use strict";n["Data.Eq"]=n["Data.Eq"]||{};var t=n["Data.Eq"],r=function(n){this.eq=n},e=new r(n["Data.Eq"].refEq);t.Eq=r,t.eq=function(n){return n.eq},t.eqInt=e}(n),function(n){"use strict";n["Data.EuclideanRing"]=n["Data.EuclideanRing"]||{};var t=n["Data.EuclideanRing"],r=n["Data.EuclideanRing"],e=n["Data.CommutativeRing"],i=n["Data.Eq"],u=n["Data.Semiring"],o=function(n,t,r,e){this.CommutativeRing0=n,this.degree=t,this.div=r,this.mod=e},a=function(n){return n.mod},c=new o(function(){return e.commutativeRingInt},r.intDegree,r.intDiv,r.intMod);t.EuclideanRing=o,t.degree=function(n){return n.degree},t.div=function(n){return n.div},t.mod=a,t.gcd=function(n){return function(t){return function(r){return function(e){var o,c=n,f=t,l=r,s=!1;function m(n,t,r,o){if(i.eq(n)(o)(u.zero(t.CommutativeRing0().Ring0().Semiring0())))return s=!0,r;c=n,f=t,l=o,e=a(t)(r)(o)}for(;!s;)o=m(c,f,l,e);return o}}}},t.euclideanRingInt=c}(n),function(n){"use strict";n.fromNumberImpl=function(n){return function(t){return function(r){return(0|r)===r?n(r):t}}},n.toNumber=function(n){return n},n.fromStringAsImpl=function(n){return function(t){return function(r){var e;e=r<11?"[0-"+(r-1).toString()+"]":11===r?"[0-9a]":"[0-9a-"+String.fromCharCode(86+r)+"]";var i=new RegExp("^[\\+\\-]?"+e+"+$","i");return function(e){if(i.test(e)){var u=parseInt(e,r);return(0|u)===u?n(u):t}return t}}}}}(n["Data.Int"]=n["Data.Int"]||{}),function(n){"use strict";n["Data.Int"]=n["Data.Int"]||{};var t=n["Data.Int"],r=n["Data.Int"],e=n["Data.Maybe"],i=r.fromStringAsImpl(e.Just.create)(e.Nothing.value),u=i(10),o=r.fromNumberImpl(e.Just.create)(e.Nothing.value);t.fromNumber=o,t.fromString=u,t.fromStringAs=i,t.toNumber=r.toNumber}(n),function(n){"use strict";n["Data.Monoid"]=n["Data.Monoid"]||{};var t=n["Data.Monoid"];t.Monoid=function(n,t){this.Semigroup0=n,this.mempty=t},t.mempty=function(n){return n.mempty}}(n),function(t){"use strict";(n["Data.Ord.Unsafe"]=n["Data.Ord.Unsafe"]||{}).unsafeCompareImpl=function(n){return function(t){return function(r){return function(e){return function(i){return e<i?n:e===i?t:r}}}}}}(),function(n){"use strict";n["Data.Ordering"]=n["Data.Ordering"]||{};var t=n["Data.Ordering"],r=function(){function n(){}return n.value=new n,n}(),e=function(){function n(){}return n.value=new n,n}(),i=function(){function n(){}return n.value=new n,n}();t.LT=r,t.GT=e,t.EQ=i}(n),function(n){"use strict";n["Data.Ord.Unsafe"]=n["Data.Ord.Unsafe"]||{};var t=n["Data.Ord.Unsafe"],r=n["Data.Ord.Unsafe"],e=n["Data.Ordering"],i=r.unsafeCompareImpl(e.LT.value)(e.EQ.value)(e.GT.value);t.unsafeCompare=i}(n),function(n){"use strict";n["Data.Ord"]=n["Data.Ord"]||{};var t=n["Data.Ord"],r=n["Data.Eq"],e=n["Data.Ord.Unsafe"],i=n["Data.Ordering"],u=n["Data.Ring"],o=n["Data.Semiring"],a=function(n,t){this.Eq0=n,this.compare=t},c=new a(function(){return r.eqInt},e.unsafeCompare),f=function(n){return n.compare},l=function(n){return function(t){return function(r){return!(f(n)(t)(r)instanceof i.LT)}}};t.Ord=a,t.compare=f,t.lessThan=function(n){return function(t){return function(r){return f(n)(t)(r)instanceof i.LT}}},t.greaterThan=function(n){return function(t){return function(r){return f(n)(t)(r)instanceof i.GT}}},t.greaterThanOrEq=l,t.abs=function(n){return function(t){return function(r){return l(n)(r)(o.zero(t.Semiring0()))?r:u.negate(t)(r)}}},t.signum=function(n){return function(t){return function(r){return l(n)(r)(o.zero(t.Semiring0()))?o.one(t.Semiring0()):u.negate(t)(o.one(t.Semiring0()))}}},t.ordInt=c}(n),function(n){"use strict";n["Data.Ratio"]=n["Data.Ratio"]||{};var t=n["Data.Ratio"],r=n["Data.Eq"],e=n["Data.EuclideanRing"],i=n["Data.Ord"],u=n["Data.Ordering"],o=n["Data.Ring"],a=n["Data.Semiring"],c=function(){function n(n,t){this.value0=n,this.value1=t}return n.create=function(t){return function(r){return new n(t,r)}},n}(),f=function(n){return function(t){return function(r){return function(u){var o=e.gcd(n.Eq0())(t)(r)(u),f=e.div(t)(u)(o);return new c(a.mul(t.CommutativeRing0().Ring0().Semiring0())(e.div(t)(r)(o))(i.signum(n)(t.CommutativeRing0().Ring0())(f)),i.abs(n)(t.CommutativeRing0().Ring0())(f))}}}},l=function(n){return function(t){return new a.Semiring(function(r){return function(e){return f(n)(t)(a.add(t.CommutativeRing0().Ring0().Semiring0())(a.mul(t.CommutativeRing0().Ring0().Semiring0())(r.value0)(e.value1))(a.mul(t.CommutativeRing0().Ring0().Semiring0())(r.value1)(e.value0)))(a.mul(t.CommutativeRing0().Ring0().Semiring0())(r.value1)(e.value1))}},function(r){return function(e){return f(n)(t)(a.mul(t.CommutativeRing0().Ring0().Semiring0())(r.value0)(e.value0))(a.mul(t.CommutativeRing0().Ring0().Semiring0())(r.value1)(e.value1))}},new c(a.one(t.CommutativeRing0().Ring0().Semiring0()),a.one(t.CommutativeRing0().Ring0().Semiring0())),new c(a.zero(t.CommutativeRing0().Ring0().Semiring0()),a.one(t.CommutativeRing0().Ring0().Semiring0())))}},s=function(n){return function(t){return new o.Ring(function(){return l(n)(t)},function(r){return function(e){return f(n)(t)(o.sub(t.CommutativeRing0().Ring0())(a.mul(t.CommutativeRing0().Ring0().Semiring0())(r.value0)(e.value1))(a.mul(t.CommutativeRing0().Ring0().Semiring0())(r.value1)(e.value0)))(a.mul(t.CommutativeRing0().Ring0().Semiring0())(r.value1)(e.value1))}})}},m=function(n){return new r.Eq(function(t){return function(e){return r.eq(n)(t.value0)(e.value0)&&r.eq(n)(t.value1)(e.value1)}})};t.reduce=f,t.numerator=function(n){return n.value0},t.denominator=function(n){return n.value1},t.eqRatio=m,t.ordRatio=function(n){return function(t){return new i.Ord(function(){return m(n.Eq0())},function(e){return function(c){var f=o.sub(s(n)(t))(e)(c);if(r.eq(n.Eq0())(f.value0)(a.zero(t.CommutativeRing0().Ring0().Semiring0())))return u.EQ.value;var l=i.greaterThan(n)(f.value1)(a.zero(t.CommutativeRing0().Ring0().Semiring0())),m=i.greaterThan(n)(f.value0)(a.zero(t.CommutativeRing0().Ring0().Semiring0()));return m&&l?u.GT.value:m||l?u.LT.value:u.GT.value}})}},t.semiringRatio=l,t.ringRatio=s}(n),function(n){"use strict";n["Data.Rational"]=n["Data.Rational"]||{};var t=n["Data.Rational"],r=n["Data.EuclideanRing"],e=n["Data.Int"],i=n["Data.Ord"],u=n["Data.Ratio"];t.toNumber=function(n){return e.toNumber(u.numerator(n))/e.toNumber(u.denominator(n))},t.fromInt=function(n){return u.reduce(i.ordInt)(r.euclideanRingInt)(n)(1)}}(n),function(t){"use strict";(n["Data.Show"]=n["Data.Show"]||{}).showNumberImpl=function(n){var t=n.toString();return isNaN(t+".0")?t:t+".0"}}(),function(n){"use strict";n["Data.Show"]=n["Data.Show"]||{};var t=n["Data.Show"],r=function(n){this.show=n},e=new r(n["Data.Show"].showNumberImpl);t.Show=r,t.show=function(n){return n.show},t.showNumber=e}(n),function(n){"use strict";n.split=function(n){return function(t){return t.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 t=n["Data.String.Common"],r=n["Data.String.Common"];t.split=r.split,t.trim=r.trim}(n),function(n){"use strict";n["Data.Tuple"]=n["Data.Tuple"]||{};var t=n["Data.Tuple"],r=function(){function n(n,t){this.value0=n,this.value1=t}return n.create=function(t){return function(r){return new n(t,r)}},n}();t.Tuple=r}(n),function(n){"use strict";n.pureE=function(n){return function(){return n}},n.bindE=function(n){return function(t){return function(){return t(n())()}}}}(n.Effect=n.Effect||{}),function(n){"use strict";n.Effect=n.Effect||{};var t=n.Effect,r=n.Effect,e=n["Control.Applicative"],i=n["Control.Apply"],u=n["Control.Bind"],o=n["Control.Monad"],a=n["Data.Functor"],c=new o.Monad(function(){return s},function(){return f}),f=new u.Bind(function(){return l},r.bindE),l=new i.Apply(function(){return m},o.ap(c)),s=new e.Applicative(function(){return l},r.pureE),m=new a.Functor(e.liftA1(s));t.functorEffect=m,t.applyEffect=l,t.applicativeEffect=s,t.bindEffect=f,t.monadEffect=c}(n),function(n){"use strict";var t=function(){var n={},t="Pure",r="Throw",e="Catch",i="Sync",u="Async",o="Bind",a="Bracket",c="Fork",f="Sequential",l="Map",s="Apply",m="Alt",d="Cons",p="Resume",g="Release",v="Finalizer",h="Finalized",w="Forked";function D(n,t,r,e){this.tag=n,this._1=t,this._2=r,this._3=e}function C(n){var t=function(t,r,e){return new D(n,t,r,e)};return t.tag=n,t}function E(n){return new D(t,void 0)}function S(n){try{n()}catch(t){setTimeout(function(){throw t},0)}}function y(n,t,r){try{return t(r())}catch(e){return n(e)}}function A(n,t,r){try{return t(r)()}catch(e){return r(n(e))(),E}}var R=function(){var n=1024,t=0,r=0,e=new Array(n),i=!1;function u(){var u;for(i=!0;0!==t;)t--,u=e[r],e[r]=void 0,r=(r+1)%n,u();i=!1}return{isDraining:function(){return i},enqueue:function(o){var a;t===n&&(a=i,u(),i=a),e[(r+t)%n]=o,t++,i||u()}}}();var _=0,b=1,F=2,M=3,I=4,N=5,P=6;function T(n,l,s){var m=0,w=_,C=s,E=null,k=null,q=null,U=null,L=null,O=0,x=0,z=null,W=!0;function J(s){for(var x,G,K;;)switch(x=null,G=null,K=null,w){case F:w=b,C=q(C),null===U?q=null:(q=U._1,U=U._2);break;case M:n.isLeft(C)?(w=N,E=C,C=null):null===q?w=N:(w=F,C=n.fromRight(C));break;case b:switch(C.tag){case o:q&&(U=new D(d,q,U)),q=C._2,w=b,C=C._1;break;case t:null===q?(w=N,C=n.right(C._1)):(w=F,C=C._1);break;case i:w=M,C=y(n.left,n.right,C._1);break;case u:return w=I,void(C=A(n.left,C._1,function(n){return function(){m===s&&(m++,R.enqueue(function(){m===s+1&&(w=M,C=n,J(m))}))}}));case r:w=N,E=n.left(C._1),C=null;break;case e:L=new D(d,C,null===q?L:new D(d,new D(p,q,U),L,k),k),q=null,U=null,w=b,C=C._1;break;case a:O++,L=new D(d,C,null===q?L:new D(d,new D(p,q,U),L,k),k),q=null,U=null,w=b,C=C._1;break;case c:w=M,x=T(n,l,C._2),l&&l.register(x),C._1&&x.run(),C=n.right(x);break;case f:w=b,C=B(n,l,C._1)}break;case N:if(q=null,U=null,null===L)w=P,C=k||E||C;else switch(x=L._3,K=L._1,L=L._2,K.tag){case e:k&&k!==x?w=N:E&&(w=b,C=K._2(n.fromLeft(E)),E=null);break;case p:k&&k!==x||E?w=N:(q=K._1,U=K._2,w=F,C=n.fromRight(C));break;case a:O--,null===E&&(G=n.fromRight(C),L=new D(d,new D(g,K._2,G),L,x),(k===x||O>0)&&(w=b,C=K._3(G)));break;case g:O++,L=new D(d,new D(h,C,E),L,k),w=b,C=k&&k!==x?K._1.killed(n.fromLeft(k))(K._2):E?K._1.failed(n.fromLeft(E))(K._2):K._1.completed(n.fromRight(C))(K._2),E=null;break;case v:O++,L=new D(d,new D(h,C,E),L,k),w=b,C=K._1;break;case h:O--,w=N,C=K._1,E=K._2}break;case P:for(var Q in z)z.hasOwnProperty(Q)&&(W=W&&z[Q].rethrow,S(z[Q].handler(C)));return z=null,void(k&&E?setTimeout(function(){throw n.fromLeft(E)},0):n.isLeft(C)&&W&&setTimeout(function(){if(W)throw n.fromLeft(C)},0));case _:w=b;break;case I:return}}function G(n){return function(){if(w===P)return W=W&&n.rethrow,n.handler(C)(),function(){};var t=x++;return(z=z||{})[t]=n,function(){null!==z&&delete z[t]}}}return{kill:function(t,r){return function(){if(w===P)return r(n.right(void 0))(),function(){};var e=G({rethrow:!1,handler:function(){return r(n.right(void 0))}})();switch(w){case _:k=n.left(t),w=P,C=k,J(m);break;case I:null===k&&(k=n.left(t)),0===O&&(w===I&&(L=new D(d,new D(v,C(t)),L,k)),w=N,C=null,E=null,J(++m));break;default:null===k&&(k=n.left(t)),0===O&&(w=N,C=null,E=null)}return e}},join:function(n){return function(){var t=G({rethrow:!1,handler:n})();return w===_&&J(m),t}},onComplete:G,isSuspended:function(){return w===_},run:function(){w===_&&(R.isDraining()?J(m):R.enqueue(function(){J(m)}))}}}function k(t,r,e,i){var o=0,a={},c=0,f={},p=new Error("[ParAff] Early exit"),g=null,v=n;function h(r,e,i){var u,o,c=e,f=null,p=null,g=0,v={};n:for(;;)switch(u=null,c.tag){case w:if(c._3===n&&(u=a[c._1],v[g++]=u.kill(r,function(n){return function(){0===--g&&i(n)()}})),null===f)break n;c=f._2,null===p?f=null:(f=p._1,p=p._2);break;case l:c=c._2;break;case s:case m:f&&(p=new D(d,f,p)),f=c,c=c._1}if(0===g)i(t.right(void 0))();else for(o=0,u=g;o<u;o++)v[o]=v[o]();return v}function C(r){return function(e){return function(){delete a[r._1],r._3=e,function r(e,u,o){var a,d,v,w,D,C;for(t.isLeft(e)?(a=e,d=null):(d=e,a=null);;){if(v=null,w=null,D=null,C=null,null!==g)return;if(null===u)return void i(a||d)();if(u._3!==n)return;switch(u.tag){case l:null===a?(u._3=t.right(u._1(t.fromRight(d))),d=u._3):u._3=a;break;case s:if(v=u._1._3,w=u._2._3,a){if(u._3=a,D=!0,C=c++,f[C]=h(p,a===v?u._2:u._1,function(){return function(){delete f[C],D?D=!1:null===o?r(a,null,null):r(a,o._1,o._2)}}),D)return void(D=!1)}else{if(v===n||w===n)return;d=t.right(t.fromRight(v)(t.fromRight(w))),u._3=d}break;case m:if(v=u._1._3,w=u._2._3,v===n&&t.isLeft(w)||w===n&&t.isLeft(v))return;if(v!==n&&t.isLeft(v)&&w!==n&&t.isLeft(w))a=d===v?w:v,d=null,u._3=a;else if(u._3=d,D=!0,C=c++,f[C]=h(p,d===v?u._2:u._1,function(){return function(){delete f[C],D?D=!1:null===o?r(d,null,null):r(d,o._1,o._2)}}),D)return void(D=!1)}null===o?u=null:(u=o._1,o=o._2)}}(e,r._2._1,r._2._2)}}}return function(){var i,u,c=b,f=e,p=null,g=null;n:for(;;)switch(i=null,u=null,c){case b:switch(f.tag){case l:p&&(g=new D(d,p,g)),p=new D(l,f._1,n,n),f=f._2;break;case s:p&&(g=new D(d,p,g)),p=new D(s,n,f._2,n),f=f._1;break;case m:p&&(g=new D(d,p,g)),p=new D(m,n,f._2,n),f=f._1;break;default:u=o++,c=N,i=f,f=new D(w,u,new D(d,p,g),n),(i=T(t,r,i)).onComplete({rethrow:!1,handler:C(f)})(),a[u]=i,r&&r.register(i)}break;case N:if(null===p)break n;p._1===n?(p._1=f,c=b,f=p._2,p._2=n):(p._2=f,f=p,null===g?p=null:(p=g._1,g=g._2))}for(v=f,u=0;u<o;u++)a[u].run()}(),function(n){return new D(u,function(r){return function(){return function(n,r){var e;for(var i in g=t.left(n),f)if(f.hasOwnProperty(i))for(i in e=f[i])e.hasOwnProperty(i)&&e[i]();f=null;var o=h(n,v,r);return function(n){return new D(u,function(n){return function(){for(var n in o)o.hasOwnProperty(n)&&o[n]();return E}})}}(n,r)}})}}function B(n,t,r){return new D(u,function(e){return function(){return k(n,t,r,e)}})}return D.EMPTY=n,D.Pure=C(t),D.Throw=C(r),D.Catch=C(e),D.Sync=C(i),D.Async=C(u),D.Bind=C(o),D.Bracket=C(a),D.Fork=C(c),D.Seq=C(f),D.ParMap=C(l),D.ParApply=C(s),D.ParAlt=C(m),D.Fiber=T,D.Supervisor=function(n){var t={},r=0,e=0;return{register:function(n){var i=r++;n.onComplete({rethrow:!0,handler:function(n){return function(){e--,delete t[i]}}}),t[i]=n,e++},isEmpty:function(){return 0===e},killAll:function(u,o){return function(){var a=0,c={};function f(r){c[r]=t[r].kill(u,function(t){return function(){delete c[r],a--,n.isLeft(t)&&n.fromLeft(t)&&setTimeout(function(){throw n.fromLeft(t)},0),0===a&&o()}})()}for(var l in t)t.hasOwnProperty(l)&&(a++,f(l));return t={},r=0,e=0,function(n){return new D(i,function(){for(var n in c)c.hasOwnProperty(n)&&c[n]()})}}}}},D.Scheduler=R,D.nonCanceler=E,D}();n._pure=t.Pure,n._map=function(n){return function(r){return r.tag===t.Pure.tag?t.Pure(n(r._1)):t.Bind(r,function(r){return t.Pure(n(r))})}},n._bind=function(n){return function(r){return t.Bind(n,r)}},n._liftEffect=t.Sync,n._parAffMap=function(n){return function(r){return t.ParMap(n,r)}},n._parAffApply=function(n){return function(r){return t.ParApply(n,r)}},n.makeAff=t.Async,n._makeFiber=function(n,r){return function(){return t.Fiber(n,null,r)}},n._sequential=t.Seq}(n["Effect.Aff"]=n["Effect.Aff"]||{}),function(n){"use strict";n["Control.Parallel.Class"]=n["Control.Parallel.Class"]||{};var t=n["Control.Parallel.Class"];t.parallel=function(n){return n.parallel},t.sequential=function(n){return n.sequential},t.Parallel=function(n,t,r,e){this.Applicative1=n,this.Monad0=t,this.parallel=r,this.sequential=e}}(n),function(n){"use strict";n.foldrArray=function(n){return function(t){return function(r){for(var e=t,i=r.length-1;i>=0;i--)e=n(r[i])(e);return e}}},n.foldlArray=function(n){return function(t){return function(r){for(var e=t,i=r.length,u=0;u<i;u++)e=n(e)(r[u]);return e}}}}(n["Data.Foldable"]=n["Data.Foldable"]||{}),function(n){"use strict";n["Data.Semigroup"]=n["Data.Semigroup"]||{};var t=n["Data.Semigroup"];t.Semigroup=function(n){this.append=n},t.append=function(n){return n.append}}(n),function(n){"use strict";n["Data.Foldable"]=n["Data.Foldable"]||{};var t=n["Data.Foldable"],r=n["Data.Foldable"],e=n["Control.Applicative"],i=n["Control.Apply"],u=n["Data.Monoid"],o=n["Data.Semigroup"],a=n["Data.Unit"],c=function(n,t,r){this.foldMap=n,this.foldl=t,this.foldr=r},f=function(n){return n.foldr},l=function(n){return function(t){return function(r){return f(n)(function(n){return function(e){return o.append(t.Semigroup0())(r(n))(e)}})(u.mempty(t))}}},s=new c(function(n){return l(s)(n)},r.foldlArray,r.foldrArray);t.Foldable=c,t.foldr=f,t.foldl=function(n){return n.foldl},t.foldMap=function(n){return n.foldMap},t.foldMapDefaultR=l,t.traverse_=function(n){return function(t){return function(r){return f(t)(function(t){return i.applySecond(n.Apply0())(r(t))})(e.pure(n)(a.unit))}}},t.foldableArray=s}(n),function(n){"use strict";n["Control.Parallel"]=n["Control.Parallel"]||{};var t=n["Control.Parallel"],r=n["Control.Category"],e=n["Control.Parallel.Class"],i=n["Data.Foldable"],u=function(n){return function(t){return function(r){return function(u){return e.sequential(n)(i.traverse_(n.Applicative1())(t)(function(t){return e.parallel(n)(r(t))})(u))}}}};t.parTraverse_=u,t.parSequence_=function(n){return function(t){return u(n)(t)(r.identity(r.categoryFn))}}}(n),function(n){"use strict";n["Effect.Class"]=n["Effect.Class"]||{};var t=n["Effect.Class"];t.liftEffect=function(n){return n.liftEffect},t.MonadEffect=function(n,t){this.Monad0=n,this.liftEffect=t}}(n),function(t){"use strict";(n["Partial.Unsafe"]=n["Partial.Unsafe"]||{}).unsafePartial=function(n){return n()}}(),function(t){"use strict";(n["Partial"]=n["Partial"]||{}).crashWith=function(){return function(n){throw new Error(n)}}}(),function(n){"use strict";n.Partial=n.Partial||{};var t=n.Partial,r=n.Partial;t.crashWith=r.crashWith}(n),function(n){"use strict";n["Partial.Unsafe"]=n["Partial.Unsafe"]||{};var t=n["Partial.Unsafe"],r=n["Partial.Unsafe"],e=n.Partial;t.unsafeCrashWith=function(n){return r.unsafePartial(function(t){return e.crashWith(t)(n)})}}(n),function(t){"use strict";(n["Unsafe.Coerce"]=n["Unsafe.Coerce"]||{}).unsafeCoerce=function(n){return n}}(),function(n){"use strict";n["Unsafe.Coerce"]=n["Unsafe.Coerce"]||{};var t=n["Unsafe.Coerce"],r=n["Unsafe.Coerce"];t.unsafeCoerce=r.unsafeCoerce}(n),function(n){"use strict";n["Effect.Aff"]=n["Effect.Aff"]||{};var t=n["Effect.Aff"],r=n["Effect.Aff"],e=n["Control.Applicative"],i=n["Control.Apply"],u=n["Control.Bind"],o=n["Control.Monad"],a=n["Control.Parallel"],c=n["Control.Parallel.Class"],f=n["Data.Either"],l=n["Data.Foldable"],s=n["Data.Function"],m=n["Data.Functor"],d=n["Data.Monoid"],p=n["Data.Semigroup"],g=n["Data.Unit"],v=n.Effect,h=n["Effect.Class"],w=n["Partial.Unsafe"],D=n["Unsafe.Coerce"],C=new m.Functor(r._parAffMap),E=new m.Functor(r._map),S={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 w.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 w.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},y=function(n){return function(){var t=function(n){return r._makeFiber(S,n)}(n)();return t.run(),t}},A=new i.Apply(function(){return C},r._parAffApply),R=new o.Monad(function(){return F},function(){return _}),_=new u.Bind(function(){return b},r._bind),b=new i.Apply(function(){return E},o.ap(R)),F=new e.Applicative(function(){return b},r._pure),M=new h.MonadEffect(function(){return R},r._liftEffect),I=new c.Parallel(function(){return N},function(){return R},D.unsafeCoerce,r._sequential),N=new e.Applicative(function(){return A},function(n){return c.parallel(I)(e.pure(F)(n))}),P=new p.Semigroup(function(n){return function(t){return function(r){return a.parSequence_(I)(l.foldableArray)([n(r),t(r)])}}}),T=s.const(e.pure(F)(g.unit)),k=new d.Monoid(function(){return P},T);t.launchAff=y,t.launchAff_=function(n){return m.void(v.functorEffect)(y(n))},t.nonCanceler=T,t.functorAff=E,t.applyAff=b,t.applicativeAff=F,t.bindAff=_,t.monadAff=R,t.monadEffectAff=M,t.functorParAff=C,t.applyParAff=A,t.applicativeParAff=N,t.parallelAff=I,t.semigroupCanceler=P,t.monoidCanceler=k,t.makeAff=r.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(t){return function(){return t.value=n,{}}}}}(n["Effect.Ref"]=n["Effect.Ref"]||{}),function(n){"use strict";n["Effect.Ref"]=n["Effect.Ref"]||{};var t=n["Effect.Ref"],r=n["Effect.Ref"];t.new=r.new,t.read=r.read,t.write=r.write}(n),function(n){"use strict";n.ceil=Math.ceil,n.log=Math.log,n.ln2=Math.LN2}(n.Math=n.Math||{}),function(n){"use strict";n.Math=n.Math||{};var t=n.Math,r=n.Math;t.ceil=r.ceil,t.log=r.log,t.ln2=r.ln2}(n),function(n){"use strict";n["Node.Encoding"]=n["Node.Encoding"]||{};var t=n["Node.Encoding"],r=n["Data.Show"],e=function(){function n(){}return n.value=new n,n}(),i=function(){function n(){}return n.value=new n,n}(),u=function(){function n(){}return n.value=new n,n}(),o=function(){function n(){}return n.value=new n,n}(),a=function(){function n(){}return n.value=new n,n}(),c=function(){function n(){}return n.value=new n,n}(),f=function(){function n(){}return n.value=new n,n}(),l=function(){function n(){}return n.value=new n,n}(),s=new r.Show(function(n){if(n instanceof e)return"ASCII";if(n instanceof i)return"UTF8";if(n instanceof u)return"UTF16LE";if(n instanceof o)return"UCS2";if(n instanceof a)return"Base64";if(n instanceof c)return"Latin1";if(n instanceof f)return"Binary";if(n instanceof l)return"Hex";throw new Error("Failed pattern match at Node.Encoding (line 19, column 1 - line 19, column 39): "+[n.constructor.name])});t.ASCII=e,t.UTF8=i,t.UTF16LE=u,t.UCS2=o,t.Base64=a,t.Latin1=c,t.Binary=f,t.Hex=l,t.encodingToNode=function(n){if(n instanceof e)return"ascii";if(n instanceof i)return"utf8";if(n instanceof u)return"utf16le";if(n instanceof o)return"ucs2";if(n instanceof a)return"base64";if(n instanceof c)return"latin1";if(n instanceof f)return"binary";if(n instanceof l)return"hex";throw new Error("Failed pattern match at Node.Encoding (line 31, column 1 - line 31, column 37): "+[n.constructor.name])},t.showEncoding=s}(n),function(t){"use strict";(n["Node.Process"]=n["Node.Process"]||{}).process=process}(),function(n){"use strict";n["Node.Process"]=n["Node.Process"]||{};var t=n["Node.Process"],r=n["Node.Process"],e=r.process.stdout,i=r.process.stdin;t.stdin=i,t.stdout=e}(n),function(n){"use strict";n.readChunkImpl=function(n){return function(t){return function(r){if(r instanceof Buffer)return t(r);if("string"==typeof r)return n(r);throw new Error("Node.Stream.readChunkImpl: Unrecognised chunk type; expected String or Buffer, got: "+r)}}},n.onDataEitherImpl=function(n){return function(t){return function(r){return function(){t.on("data",function(t){r(n(t))()})}}}},n.onEnd=function(n){return function(t){return function(){n.on("end",t)}}},n.write=function(n){return function(t){return function(r){return function(){return n.write(t,null,r)}}}},n.writeStringImpl=function(n){return function(t){return function(r){return function(e){return function(){return n.write(r,t,e)}}}}}}(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 t=n["Effect.Exception"],r=n["Effect.Exception"];t.throw=function(n){return r.throwException(r.error(n))}}(n),function(t){"use strict";(n["Node.Buffer"]=n["Node.Buffer"]||{}).toStringImpl=function(n){return function(t){return function(){return t.toString(n)}}}}(),function(n){"use strict";n["Node.Buffer"]=n["Node.Buffer"]||{};var t=n["Node.Buffer"],r=n["Node.Buffer"],e=n["Node.Encoding"];t.toString=function(n){return r.toStringImpl(e.encodingToNode(n))}}(n),function(n){"use strict";n["Node.Stream"]=n["Node.Stream"]||{};var t=n["Node.Stream"],r=n["Node.Stream"],e=n["Control.Applicative"],i=n["Control.Bind"],u=n["Data.Either"],o=n["Data.Show"],a=n.Effect,c=n["Effect.Exception"],f=n["Node.Buffer"],l=n["Node.Encoding"],s=r.readChunkImpl(u.Left.create)(u.Right.create),m=function(n){return function(t){return r.onDataEitherImpl(s)(n)(t)}},d=function(n){return function(t){return m(n)(i.composeKleisliFlipped(a.bindEffect)(t)(function(n){if(n instanceof u.Left)return c.throw("Stream encoding should not be set");if(n instanceof u.Right)return e.pure(a.applicativeEffect)(n.value0);throw new Error("Failed pattern match at Node.Stream (line 94, column 5 - line 98, column 17): "+[n.constructor.name])}))}};t.onData=d,t.onDataString=function(n){return function(t){return function(r){return d(n)(i.composeKleisliFlipped(a.bindEffect)(r)(f.toString(t)))}}},t.onDataEither=m,t.writeString=function(n){return function(t){return r.writeStringImpl(n)(o.show(l.showEncoding)(t))}},t.onEnd=r.onEnd}(n),function(n){"use strict";n.ABC126C=n.ABC126C||{};var t=n.ABC126C,r=n["Control.Applicative"],e=n["Control.Bind"],i=n["Control.Category"],u=n["Control.Monad.ST.Internal"],o=n["Data.Array"],a=n["Data.Either"],c=n["Data.EuclideanRing"],f=n["Data.Functor"],l=n["Data.Int"],s=n["Data.Maybe"],m=n["Data.Monoid"],d=n["Data.Ord"],p=n["Data.Ratio"],g=n["Data.Rational"],v=n["Data.Semiring"],h=n["Data.Show"],w=n["Data.String.Common"],D=n["Data.Tuple"],C=n["Data.Unit"],E=n.Effect,S=n["Effect.Aff"],y=n["Effect.Class"],A=n["Effect.Ref"],R=n.Math,_=n["Node.Encoding"],b=n["Node.Process"],F=n["Node.Stream"],M=n["Partial.Unsafe"],I=S.makeAff(function(n){return function(){var t=A.new("")();return F.onDataString(b.stdin)(_.UTF8.value)(function(n){return function(){var r=A.read(t)();return A.write(r+n)(t)()}})(),F.onEnd(b.stdin)(function(){var e=A.read(t)();return n(r.pure(a.applicativeEither)(e))()})(),m.mempty(S.monoidCanceler)}}),N=function(n){var t=o.mapMaybe(l.fromString)(function(n){return w.split(" ")(n)}(n));return 2===t.length?new s.Just(new D.Tuple(t[0],t[1])):s.Nothing.value},P=function(n){return function(t){return function(){l.toNumber(n);var e=l.toNumber(t),i=s.fromJust()(l.fromNumber(R.ceil(R.log(e)/R.ln2)));return function(){var e={value:g.fromInt(0)};return u.for(1)(n+1|0)(function(o){var a=function(n){return function(t){return r={value:0},function(){for(;d.lessThan(p.ordRatio(d.ordInt)(c.euclideanRingInt))(g.fromInt(1<<r.value))(t);)f.void(u.functorST)(u.modify(v.add(v.semiringInt)(1))(r))()}(),r.value>n?0:r.value;var r}}(i)(p.reduce(d.ordInt)(c.euclideanRingInt)(t)(o));return 0===a?r.pure(u.applicativeST)(C.unit):f.void(u.functorST)(u.modify(v.add(p.semiringRatio(d.ordInt)(c.euclideanRingInt))(p.reduce(d.ordInt)(c.euclideanRingInt)(1)((1<<a)*n|0)))(e))})(),f.map(u.functorST)(g.toNumber)(u.read(e))()}}()()}},T=function(n){return a.either(function(n){return M.unsafeCrashWith(n)})(i.identity(i.categoryFn))(e.bind(a.bindEither)(a.note("n k")(N(w.trim(n))))(function(n){return r.pure(a.applicativeEither)(h.show(h.showNumber)(P(n.value0)(n.value1))+"\n")}))},k=S.launchAff_(e.bind(S.bindAff)(I)(function(n){return e.bind(S.bindAff)(r.pure(S.applicativeAff)(T(n)))(function(n){return y.liftEffect(S.monadEffectAff)((t=n,f.void(E.functorEffect)(F.writeString(b.stdout)(_.UTF8.value)(t)(r.pure(E.applicativeEffect)(C.unit)))));var t})}));t.main=k,t.solve=T}(n),n.ABC126C.main();
},{}]},{},["Focm"], null)