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,a=t.length,e=new Array(r*a),o=0,i=0;i<r;i++)for(var u=n[i],c=0;c<a;c++)e[o++]=u(t[c]);return e}}}(),function(t){"use strict";(n["Data.Boolean"]=n["Data.Boolean"]||{}).otherwise=!0}(),function(t){"use strict";(n["Data.Eq"]=n["Data.Eq"]||{}).refEq=function(n){return function(t){return n===t}}}(),function(n){"use strict";n.boolConj=function(n){return function(t){return n&&t}},n.boolDisj=function(n){return function(t){return n||t}},n.boolNot=function(n){return!n}}(n["Data.HeytingAlgebra"]=n["Data.HeytingAlgebra"]||{}),function(t){"use strict";(n["Data.Unit"]=n["Data.Unit"]||{}).unit={}}(),function(t){"use strict";(n["Data.Show"]=n["Data.Show"]||{}).showIntImpl=function(n){return n.toString()}}(),function(t){"use strict";var r=n["Data.Show"],a=(n["Data.Symbol"],n["Record.Unsafe"],n["Type.Data.RowList"],function(n){this.show=n}),e=new a(r.showIntImpl);t.Show=a,t.show=function(n){return n.show},t.showInt=e}(n["Data.Show"]=n["Data.Show"]||{}),function(t){"use strict";var r=n["Data.Unit"];n["Data.Show"];t.unit=r.unit}(n["Data.Unit"]=n["Data.Unit"]||{}),function(t){"use strict";var r=n["Data.HeytingAlgebra"],a=(n["Data.Symbol"],n["Data.Unit"],n["Record.Unsafe"],n["Type.Data.Row"],n["Type.Data.RowList"],function(n,t,r,a,e,o){this.conj=n,this.disj=t,this.ff=r,this.implies=a,this.not=e,this.tt=o}),e=function(n){return n.not},o=function(n){return n.disj},i=new a(r.boolConj,r.boolDisj,!1,function(n){return function(t){return o(i)(e(i)(n))(t)}},r.boolNot,!0);t.HeytingAlgebra=a,t.tt=function(n){return n.tt},t.ff=function(n){return n.ff},t.implies=function(n){return n.implies},t.conj=function(n){return n.conj},t.disj=o,t.not=e,t.heytingAlgebraBoolean=i}(n["Data.HeytingAlgebra"]=n["Data.HeytingAlgebra"]||{}),function(t){"use strict";var r=n["Data.Eq"],a=(n["Data.HeytingAlgebra"],n["Data.Symbol"],n["Data.Unit"],n["Data.Void"],n["Record.Unsafe"],n["Type.Data.RowList"],function(n){this.eq=n}),e=new a(r.refEq),o=new a(r.refEq),i=new a(r.refEq);t.Eq=a,t.eq=function(n){return n.eq},t.eqBoolean=i,t.eqInt=o,t.eqString=e}(n["Data.Eq"]=n["Data.Eq"]||{}),function(t){"use strict";(n["Data.Ord.Unsafe"]=n["Data.Ord.Unsafe"]||{}).unsafeCompareImpl=function(n){return function(t){return function(r){return function(a){return function(e){return a<e?n:a===e?t:r}}}}}}(),function(t){"use strict";n["Data.Eq"],n["Data.Semigroup"],n["Data.Show"];var r=function(){function n(){}return n.value=new n,n}(),a=function(){function n(){}return n.value=new n,n}(),e=function(){function n(){}return n.value=new n,n}();t.LT=r,t.GT=a,t.EQ=e}(n["Data.Ordering"]=n["Data.Ordering"]||{}),function(t){"use strict";var r=n["Data.Ord.Unsafe"],a=n["Data.Ordering"],e=r.unsafeCompareImpl(a.LT.value)(a.EQ.value)(a.GT.value);t.unsafeCompare=e}(n["Data.Ord.Unsafe"]=n["Data.Ord.Unsafe"]||{}),function(t){"use strict";n["Data.Ord"];var r=n["Data.Eq"],a=n["Data.Ord.Unsafe"],e=n["Data.Ordering"],o=(n["Data.Ring"],n["Data.Semiring"],n["Data.Symbol"],n["Data.Unit"],n["Data.Void"],n["Record.Unsafe"],n["Type.Data.RowList"],function(n,t){this.Eq0=n,this.compare=t}),i=new o(function(){return r.eqInt},a.unsafeCompare),u=function(n){return n.compare};t.Ord=o,t.compare=u,t.min=function(n){return function(t){return function(r){var a=u(n)(t)(r);if(a instanceof e.LT)return t;if(a instanceof e.EQ)return t;if(a instanceof e.GT)return r;throw new Error("Failed pattern match at Data.Ord (line 119, column 3 - line 122, column 12): "+[a.constructor.name])}}},t.max=function(n){return function(t){return function(r){var a=u(n)(t)(r);if(a instanceof e.LT)return r;if(a instanceof e.EQ)return t;if(a instanceof e.GT)return t;throw new Error("Failed pattern match at Data.Ord (line 128, column 3 - line 131, column 12): "+[a.constructor.name])}}},t.ordInt=i}(n["Data.Ord"]=n["Data.Ord"]||{}),function(t){"use strict";n["Control.Category"],n["Data.Boolean"],n["Data.Ord"],n["Data.Ring"];t.flip=function(n){return function(t){return function(r){return n(r)(t)}}},t.const=function(n){return function(t){return n}}}(n["Data.Function"]=n["Data.Function"]||{}),function(t){"use strict";(n["Data.Functor"]=n["Data.Functor"]||{}).arrayMap=function(n){return function(t){for(var r=t.length,a=new Array(r),e=0;e<r;e++)a[e]=n(t[e]);return a}}}(),function(t){"use strict";var r=n["Data.Functor"],a=(n["Control.Semigroupoid"],n["Data.Function"]),e=n["Data.Unit"],o=function(n){this.map=n},i=function(n){return n.map},u=new o(r.arrayMap);t.Functor=o,t.map=i,t.void=function(n){return i(n)(a.const(e.unit))},t.functorArray=u}(n["Data.Functor"]=n["Data.Functor"]||{}),function(t){"use strict";var r=n["Control.Apply"],a=(n["Control.Category"],n["Data.Function"],n["Data.Functor"]),e=function(n,t){this.Functor0=n,this.apply=t},o=new e(function(){return a.functorArray},r.arrayApply);t.Apply=e,t.apply=function(n){return n.apply},t.applyArray=o}(n["Control.Apply"]=n["Control.Apply"]||{}),function(t){"use strict";n["Control.Apply"],n["Data.Functor"],n["Data.Unit"];t.Applicative=function(n,t){this.Apply0=n,this.pure=t},t.pure=function(n){return n.pure}}(n["Control.Applicative"]=n["Control.Applicative"]||{}),function(t){"use strict";(n["Control.Bind"]=n["Control.Bind"]||{}).arrayBind=function(n){return function(t){for(var r=[],a=0,e=n.length;a<e;a++)Array.prototype.push.apply(r,t(n[a]));return r}}}(),function(t){"use strict";var r=n["Control.Bind"],a=(n["Control.Applicative"],n["Control.Apply"]),e=(n["Control.Category"],n["Data.Function"],n["Data.Functor"],n["Data.Unit"],function(n,t){this.Apply0=n,this.bind=t}),o=new e(function(){return a.applyArray},r.arrayBind);t.Bind=e,t.bind=function(n){return n.bind},t.bindArray=o}(n["Control.Bind"]=n["Control.Bind"]||{}),function(t){"use strict";var r=n["Control.Applicative"],a=(n["Control.Apply"],n["Control.Bind"]);n["Data.Functor"],n["Data.Unit"];t.Monad=function(n,t){this.Applicative0=n,this.Bind1=t},t.ap=function(n){return function(t){return function(e){return a.bind(n.Bind1())(t)(function(t){return a.bind(n.Bind1())(e)(function(a){return r.pure(n.Applicative0())(t(a))})})}}}}(n["Control.Monad"]=n["Control.Monad"]||{}),function(t){"use strict";n["Control.Alt"],n["Control.Alternative"];var r=n["Control.Applicative"],a=n["Control.Apply"],e=n["Control.Bind"],o=(n["Control.Category"],n["Control.Extend"],n["Control.Monad"],n["Control.MonadZero"],n["Control.Plus"],n["Data.Bounded"],n["Data.Eq"],n["Data.Function"],n["Data.Functor"]),i=(n["Data.Functor.Invariant"],n["Data.Monoid"],n["Data.Ord"],n["Data.Ordering"],n["Data.Semigroup"],n["Data.Show"],n["Data.Unit"],n.Prelude,function(){function n(){}return n.value=new n,n}()),u=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}(),c=new o.Functor(function(n){return function(t){return t instanceof u?new u(n(t.value0)):i.value}}),l=new a.Apply(function(){return c},function(n){return function(t){if(n instanceof u)return o.map(c)(n.value0)(t);if(n instanceof i)return i.value;throw new Error("Failed pattern match at Data.Maybe (line 67, column 1 - line 67, column 35): "+[n.constructor.name,t.constructor.name])}}),f=new e.Bind(function(){return l},function(n){return function(t){if(n instanceof u)return t(n.value0);if(n instanceof i)return i.value;throw new Error("Failed pattern match at Data.Maybe (line 125, column 1 - line 125, column 33): "+[n.constructor.name,t.constructor.name])}}),s=new r.Applicative(function(){return l},u.create);t.Nothing=i,t.Just=u,t.maybe=function(n){return function(t){return function(r){if(r instanceof i)return n;if(r instanceof u)return t(r.value0);throw new Error("Failed pattern match at Data.Maybe (line 217, column 1 - line 217, column 51): "+[n.constructor.name,t.constructor.name,r.constructor.name])}}},t.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])}},t.functorMaybe=c,t.applyMaybe=l,t.applicativeMaybe=s,t.bindMaybe=f}(n["Data.Maybe"]=n["Data.Maybe"]||{}),function(t){"use strict";n["Control.Alt"];var r=n["Control.Applicative"],a=n["Control.Apply"],e=n["Control.Bind"],o=(n["Control.Extend"],n["Control.Monad"],n["Control.Semigroupoid"],n["Data.Bifoldable"],n["Data.Bifunctor"],n["Data.Bitraversable"],n["Data.Bounded"],n["Data.Eq"],n["Data.Foldable"],n["Data.FoldableWithIndex"],n["Data.Function"],n["Data.Functor"]),i=(n["Data.Functor.Invariant"],n["Data.FunctorWithIndex"],n["Data.Maybe"]),u=(n["Data.Monoid"],n["Data.Ord"],n["Data.Ordering"],n["Data.Semigroup"],n["Data.Show"],n["Data.Traversable"],n["Data.TraversableWithIndex"],n["Data.Unit"],n.Prelude,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}(),l=new o.Functor(function(n){return function(t){if(t instanceof u)return new u(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])}}),f=function(n){return function(t){return function(r){if(r instanceof u)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 a.Apply(function(){return l},function(n){return function(t){if(n instanceof u)return new u(n.value0);if(n instanceof c)return o.map(l)(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])}}),D=new e.Bind(function(){return s},f(function(n){return function(t){return new u(n)}})(function(n){return function(t){return t(n)}})),d=new r.Applicative(function(){return s},c.create);t.Left=u,t.Right=c,t.either=f,t.note=function(n){return i.maybe(new u(n))(c.create)},t.functorEither=l,t.applyEither=s,t.applicativeEither=d,t.bindEither=D}(n["Data.Either"]=n["Data.Either"]||{}),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(t){"use strict";var r=n.Partial;t.crashWith=r.crashWith}(n.Partial=n.Partial||{}),function(t){"use strict";var r=n["Partial.Unsafe"],a=n.Partial;t.unsafeCrashWith=function(n){return r.unsafePartial(function(t){return a.crashWith(t)(n)})}}(n["Partial.Unsafe"]=n["Partial.Unsafe"]||{}),function(t){"use strict";n["Control.Applicative"],n["Control.Bind"],n["Control.Monad"],n["Control.Semigroupoid"],n["Data.Bifunctor"],n["Data.Either"],n["Data.Functor"],n["Data.Identity"],n["Data.Maybe"],n["Data.Unit"],n.Effect,n["Effect.Ref"],n["Partial.Unsafe"],n.Prelude;var r=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}(),a=function(){function n(n){this.value0=n}return n.create=function(t){return new n(t)},n}();t.Loop=r,t.Done=a,t.tailRec=function(n){return function(t){return function(t){var e,o=!1;function i(e){if(!(e instanceof r)){if(e instanceof a)return o=!0,e.value0;throw new Error("Failed pattern match at Control.Monad.Rec.Class (line 91, column 3 - line 91, column 25): "+[e.constructor.name])}t=n(e.value0)}for(;!o;)e=i(t);return e}(n(t))}}}(n["Control.Monad.Rec.Class"]=n["Control.Monad.Rec.Class"]||{}),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.foreach=function(n){return function(t){return function(){for(var r=0,a=n.length;r<a;r++)t(n[r])()}}},n.new=function(n){return function(){return{value:n}}},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.write=function(n){return function(t){return function(){return t.value=n}}}}(n["Control.Monad.ST.Internal"]=n["Control.Monad.ST.Internal"]||{}),function(t){"use strict";var r=n["Control.Monad.ST.Internal"],a=n["Control.Applicative"],e=n["Control.Apply"],o=n["Control.Bind"],i=n["Control.Monad"],u=(n["Control.Monad.Rec.Class"],n["Data.Functor"]),c=(n["Data.Unit"],n["Partial.Unsafe"],n.Prelude,new u.Functor(r.map_)),l=new i.Monad(function(){return D},function(){return f}),f=new o.Bind(function(){return s},r.bind_),s=new e.Apply(function(){return c},i.ap(l)),D=new a.Applicative(function(){return s},r.pure_);t.modify=function(n){return r["modify'"](function(t){var r=n(t);return{state:r,value:r}})},t.functorST=c,t.applyST=s,t.applicativeST=D,t.bindST=f,t.monadST=l,t.foreach=r.foreach,t.new=r.new,t.read=r.read,t.write=r.write}(n["Control.Monad.ST.Internal"]=n["Control.Monad.ST.Internal"]||{}),function(n){"use strict";n.length=function(n){return n.length},n.cons=function(n){return function(t){return[n].concat(t)}},n.indexImpl=function(n){return function(t){return function(r){return function(a){return a<0||a>=r.length?t:n(r[a])}}}},n.concat=function(n){if(n.length<=1e4)return Array.prototype.concat.apply([],n);for(var t=[],r=0,a=n.length;r<a;r++)for(var e=n[r],o=0,i=e.length;o<i;o++)t.push(e[o]);return t}}(n["Data.Array"]=n["Data.Array"]||{}),function(n){"use strict";n.empty=function(){return[]},n.pushAll=function(n){return function(t){return function(){return t.push.apply(t,n)}}}}(n["Data.Array.ST"]=n["Data.Array.ST"]||{}),function(t){"use strict";(n["Unsafe.Coerce"]=n["Unsafe.Coerce"]||{}).unsafeCoerce=function(n){return n}}(),function(t){"use strict";var r=n["Unsafe.Coerce"];t.unsafeCoerce=r.unsafeCoerce}(n["Unsafe.Coerce"]=n["Unsafe.Coerce"]||{}),function(t){"use strict";var r=n["Data.Array.ST"],a=n["Control.Applicative"],e=(n["Control.Bind"],n["Control.Monad.ST"],n["Control.Monad.ST.Internal"]);n["Control.Semigroupoid"],n["Data.Maybe"],n["Data.Ord"],n["Data.Ordering"],n["Data.Ring"],n.Prelude,n["Unsafe.Coerce"];t.push=function(n){return r.pushAll([n])},t.unsafeFreeze=function(n){return a.pure(e.applicativeST)(n)},t.empty=r.empty}(n["Data.Array.ST"]=n["Data.Array.ST"]||{}),function(t){"use strict";n["Control.Applicative"],n["Control.Bind"],n["Control.Monad.ST"];var r=n["Control.Monad.ST.Internal"],a=(n["Control.Monad.ST.Ref"],n["Control.Semigroupoid"],n["Data.Array.ST"]),e=(n["Data.Function"],n["Data.Functor"]),o=n["Data.HeytingAlgebra"],i=n["Data.Maybe"],u=(n["Data.Semiring"],n.Prelude,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}()),c=function(n){return function(){var t=r.read(n.value1)();return n.value0(t)}},l=function(n){return function(){var t=r.read(n.value1)();r.modify(function(n){return n+1|0})(n.value1)();return n.value0(t)}};t.iterator=function(n){return e.map(r.functorST)(u.create(n))(r.new(0))},t.iterate=function(n){return function(t){return function(){for(var a=r.new(!1)();e.map(r.functorST)(o.not(o.heytingAlgebraBoolean))(r.read(a))();)!function(){var o=l(n)();if(o instanceof i.Just)return t(o.value0)();if(o instanceof i.Nothing)return e.void(r.functorST)(r.write(!0)(a))();throw new Error("Failed pattern match at Data.Array.ST.Iterator (line 42, column 5 - line 44, column 47): "+[o.constructor.name])}();return{}}}},t.next=l,t.peek=c,t.pushWhile=function(n){return function(t){return function(u){return function(){for(var f=r.new(!1)();e.map(r.functorST)(o.not(o.heytingAlgebraBoolean))(r.read(f))();)!function(){var o=c(t)();if(o instanceof i.Just&&n(o.value0))return a.push(o.value0)(u)(),e.void(r.functorST)(l(t))();e.void(r.functorST)(r.write(!0)(f))()}();return{}}}}}}(n["Data.Array.ST.Iterator"]=n["Data.Array.ST.Iterator"]||{}),function(t){"use strict";n["Control.Applicative"],n["Control.Apply"],n["Control.Biapplicative"],n["Control.Biapply"],n["Control.Bind"],n["Control.Comonad"],n["Control.Extend"],n["Control.Lazy"],n["Control.Monad"],n["Control.Semigroupoid"],n["Data.Bifoldable"],n["Data.Bifunctor"],n["Data.Bitraversable"],n["Data.BooleanAlgebra"],n["Data.Bounded"],n["Data.CommutativeRing"],n["Data.Distributive"],n["Data.Eq"],n["Data.Foldable"],n["Data.FoldableWithIndex"],n["Data.Function"],n["Data.Functor"],n["Data.Functor.Invariant"],n["Data.FunctorWithIndex"],n["Data.HeytingAlgebra"],n["Data.Maybe"],n["Data.Maybe.First"],n["Data.Monoid"],n["Data.Newtype"],n["Data.Ord"],n["Data.Ordering"],n["Data.Ring"],n["Data.Semigroup"],n["Data.Semigroup.Foldable"],n["Data.Semigroup.Traversable"],n["Data.Semiring"],n["Data.Show"],n["Data.Traversable"],n["Data.TraversableWithIndex"],n["Data.Unit"],n.Prelude,n["Type.Equality"];var 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,t.fst=function(n){return n.value0}}(n["Data.Tuple"]=n["Data.Tuple"]||{}),function(t){"use strict";var r=n["Data.Array"],a=(n["Control.Alt"],n["Control.Alternative"],n["Control.Applicative"],n["Control.Apply"],n["Control.Bind"]),e=(n["Control.Category"],n["Control.Lazy"],n["Control.Monad.Rec.Class"],n["Control.Monad.ST"],n["Control.Monad.ST.Internal"]),o=(n["Control.Semigroupoid"],n["Data.Array.NonEmpty.Internal"],n["Data.Array.ST"]),i=n["Data.Array.ST.Iterator"],u=(n["Data.Boolean"],n["Data.Eq"]),c=(n["Data.Foldable"],n["Data.Function"]),l=n["Data.Functor"],f=(n["Data.HeytingAlgebra"],n["Data.Maybe"]),s=(n["Data.Ord"],n["Data.Ordering"],n["Data.Ring"],n["Data.Semigroup"],n["Data.Semiring"],n["Data.Traversable"],n["Data.Tuple"],n["Data.Unfoldable"],n["Partial.Unsafe"],n.Prelude,n["Unsafe.Coerce"],function(n){return[n]}),D=r.indexImpl(f.Just.create)(f.Nothing.value),d=function(n){return function(t){return r=o.empty(),a=i.iterator(function(n){return D(t)(n)})(),i.iterate(a)(function(t){return l.void(e.functorST)(function(){var e=o.empty();o.push(t)(e)(),i.pushWhile(n(t))(a)(e)();var u=o.unsafeFreeze(e)();return o.push(u)(r)()})})(),o.unsafeFreeze(r)();var r,a}},p=c.flip(a.bind(a.bindArray));t.singleton=s,t.head=function(n){return D(n)(0)},t.last=function(n){return D(n)(r.length(n)-1|0)},t.index=D,t.concatMap=p,t.mapMaybe=function(n){return p(function(t){return f.maybe([])(s)(n(t))})},t.group=function(n){return function(t){return d(u.eq(n))(t)}},t.groupBy=d,t.length=r.length,t.cons=r.cons}(n["Data.Array"]=n["Data.Array"]||{}),function(t){"use strict";n["Control.Alternative"],n["Control.Bind"],n["Control.Lazy"],n["Control.Monad.Rec.Class"],n["Control.Semigroupoid"];var r,a=n["Data.Array"],e=(n["Data.Array.NonEmpty.Internal"],n["Data.Bifunctor"],n["Data.Boolean"],n["Data.Eq"],n["Data.Foldable"],n["Data.Function"],n["Data.Functor"],n["Data.Maybe"]),o=(n["Data.NonEmpty"],n["Data.Ord"],n["Data.Ring"],n["Data.Semigroup"],n["Data.Semigroup.Foldable"],n["Data.Semiring"],n["Data.Tuple"],n["Data.Unfoldable"],n["Data.Unfoldable1"],n["Partial.Unsafe"],n.Prelude,n["Unsafe.Coerce"].unsafeCoerce),i=(r=a.head,function(n){return e.fromJust()(r(o(n)))}),u=function(n){return function(t){return n(o(t))}}(a.length);t.toArray=o,t.length=u,t.head=i}(n["Data.Array.NonEmpty"]=n["Data.Array.NonEmpty"]||{}),function(t){"use strict";(n["Data.Int"]=n["Data.Int"]||{}).fromStringAsImpl=function(n){return function(t){return function(r){var a;a=r<11?"[0-"+(r-1).toString()+"]":11===r?"[0-9a]":"[0-9a-"+String.fromCharCode(86+r)+"]";var e=new RegExp("^[\\+\\-]?"+a+"+$","i");return function(a){if(e.test(a)){var o=parseInt(a,r);return(0|o)===o?n(o):t}return t}}}}}(),function(t){"use strict";var r=n["Data.Int"],a=(n["Control.Category"],n["Control.Semigroupoid"],n["Data.Boolean"],n["Data.Bounded"],n["Data.CommutativeRing"],n["Data.DivisionRing"],n["Data.Eq"],n["Data.EuclideanRing"],n["Data.HeytingAlgebra"],n["Data.Int.Bits"],n["Data.Maybe"]),e=(n["Data.Ord"],n["Data.Ordering"],n["Data.Ring"],n["Data.Semiring"],n["Data.Show"],n.Global,n.Math,n.Prelude,r.fromStringAsImpl(a.Just.create)(a.Nothing.value)),o=e(10);t.fromString=o,t.fromStringAs=e}(n["Data.Int"]=n["Data.Int"]||{}),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(t){"use strict";var r=n["Data.String.Common"];n["Data.Eq"],n["Data.Ordering"],n["Data.String.Pattern"],n.Prelude;t.split=r.split,t.trim=r.trim}(n["Data.String.Common"]=n["Data.String.Common"]||{}),function(t){"use strict";var r=n["Control.Applicative"],a=n["Control.Bind"],e=n["Control.Monad.Rec.Class"],o=(n["Control.Monad.ST"],n["Control.Monad.ST.Internal"]),i=(n["Control.Monad.ST.Ref"],n["Data.Array"]),u=n["Data.Array.NonEmpty"],c=n["Data.Array.ST"],l=n["Data.Boolean"],f=n["Data.Either"],s=n["Data.Eq"],D=n["Data.Functor"],d=(n["Data.HeytingAlgebra"],n["Data.Int"]),p=n["Data.Maybe"],v=n["Data.Ord"],m=(n["Data.Ring"],n["Data.Semiring"],n["Data.Show"]),h=(n["Data.String"],n["Data.String.Common"]),C=(n["Data.String.Pattern"],n["Data.Tuple"]),y=n["Data.Unit"],g=(n["Debug.Trace"],n["Partial.Unsafe"]),w=(n.Prelude,function(n){var t=h.split("\n")(h.trim(n));return a.bind(f.bindEither)(f.note("n k")(a.bind(p.bindMaybe)(i.head(t))(function(n){var t=i.mapMaybe(d.fromString)(h.split(" ")(n));return 2===t.length?new p.Just(new C.Tuple(t[0],t[1])):p.Nothing.value})))(function(n){return a.bind(f.bindEither)(f.note("cs")(a.bind(p.bindMaybe)(i.last(t))(function(n){return r.pure(p.applicativeMaybe)(D.map(D.functorArray)(s.eq(s.eqString)("1"))(h.split("")(n)))})))(function(t){return r.pure(f.applicativeEither)(m.show(m.showInt)((a=n.value0,function(n){return function(t){if(n>=a)return a;if(l.otherwise){var r=D.map(D.functorArray)(function(n){return new C.Tuple(u.head(n),u.length(n))})(i.group(s.eqBoolean)(t)),f=C.fst(r[0]),d=i.cons(new C.Tuple(!f,0))((m=r,h=c.empty(),g=0,o.foreach(m)(function(n){return function(){var t=g;return c.push(new C.Tuple(n.value0,t+n.value1|0))(h)(),g=t+n.value1|0,y.unit}})(),c.unsafeFreeze(h)())),p=i.length(d);return e.tailRec(function(t){if(t.value0>=p)return new e.Done(t.value1);var r=v.min(v.ordInt)(p-1|0)((t.value0+(2*n|0)|0)+(d[t.value0].value0?0:1)|0);return new e.Loop(new C.Tuple(t.value0+1|0,v.max(v.ordInt)(t.value1)(d[r].value1-d[t.value0].value1|0)))})(new C.Tuple(0,0))}var m,h,g;throw new Error("Failed pattern match at AtCoder.ABC124.D (line 48, column 1 - line 48, column 46): "+[a.constructor.name,n.constructor.name,t.constructor.name])}})(n.value1)(t)));var a})})});t.solve=function(n){var t=w(n);if(t instanceof f.Left)return g.unsafeCrashWith(t.value0);if(t instanceof f.Right)return t.value0;throw new Error("Failed pattern match at AtCoder.ABC124.D (line 25, column 3 - line 27, column 24): "+[t.constructor.name])}}(n["AtCoder.ABC124.D"]=n["AtCoder.ABC124.D"]||{}),function(t){"use strict";(n["Effect.Console"]=n["Effect.Console"]||{}).log=function(n){return function(){return console.log(n),{}}}}(),function(t){"use strict";var r=n["Effect.Console"];n["Data.Show"],n["Data.Unit"],n.Effect;t.log=r.log}(n["Effect.Console"]=n["Effect.Console"]||{}),function(t){"use strict";n["Node.Encoding"];var r=n["Data.Show"],a=(n.Prelude,function(){function n(){}return n.value=new n,n}()),e=function(){function n(){}return n.value=new n,n}(),o=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}(),c=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}(),s=new r.Show(function(n){if(n instanceof a)return"ASCII";if(n instanceof e)return"UTF8";if(n instanceof o)return"UTF16LE";if(n instanceof i)return"UCS2";if(n instanceof u)return"Base64";if(n instanceof c)return"Latin1";if(n instanceof l)return"Binary";if(n instanceof f)return"Hex";throw new Error("Failed pattern match at Node.Encoding (line 19, column 1 - line 19, column 39): "+[n.constructor.name])});t.ASCII=a,t.UTF8=e,t.UTF16LE=o,t.UCS2=i,t.Base64=u,t.Latin1=c,t.Binary=l,t.Hex=f,t.showEncoding=s}(n["Node.Encoding"]=n["Node.Encoding"]||{}),function(t){"use strict";(n["Node.FS.Internal"]=n["Node.FS.Internal"]||{}).unsafeRequireFS=require("fs")}(),function(t){"use strict";var r=n["Node.FS.Internal"],a=(n.Effect,n.Prelude,n["Unsafe.Coerce"].unsafeCoerce);t.mkEffect=a,t.unsafeRequireFS=r.unsafeRequireFS}(n["Node.FS.Internal"]=n["Node.FS.Internal"]||{}),function(t){"use strict";n["Control.Bind"],n["Control.Semigroupoid"],n["Data.DateTime"],n["Data.DateTime.Instant"],n["Data.EuclideanRing"],n["Data.Function"],n["Data.Function.Uncurried"],n["Data.Functor"],n["Data.Int"],n["Data.Maybe"],n["Data.Nullable"];var r=n["Data.Show"],a=(n["Data.Time.Duration"],n.Effect,n["Node.Buffer"],n["Node.Encoding"]),e=(n["Node.FS"],n["Node.FS.Internal"]),o=(n["Node.FS.Perms"],n["Node.FS.Stats"],n["Node.Path"],n.Prelude,e.unsafeRequireFS);t.readTextFile=function(n){return function(t){return e.mkEffect(function(e){return o.readFileSync(t,{encoding:r.show(a.showEncoding)(n)})})}}}(n["Node.FS.Sync"]=n["Node.FS.Sync"]||{}),function(t){"use strict";var r=n["AtCoder.ABC124.D"],a=(n["Control.Applicative"],n["Control.Bind"],n.Effect,n["Effect.Console"]),e=n["Node.Encoding"],o=n["Node.FS.Sync"];n.Prelude;t.main=function(){var n=o.readTextFile(e.UTF8.value)("/dev/stdin")(),t=r.solve(n);return a.log(t)()}}(n.Main=n.Main||{}),n.Main.main();
},{}]},{},["Focm"], null)

Measured memory_bytes: 97652