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(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.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);t.Eq=a,t.eq=function(n){return n.eq},t.eqInt=e,t.eqChar=o}(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.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(t){"use strict";var r=n["Data.Semiring"],a=(n["Data.Symbol"],n["Data.Unit"],n["Record.Unsafe"],n["Type.Data.Row"],n["Type.Data.RowList"],function(n,t,r,a){this.add=n,this.mul=t,this.one=r,this.zero=a}),e=new a(r.intAdd,r.intMul,1,0);t.Semiring=a,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=e}(n["Data.Semiring"]=n["Data.Semiring"]||{}),function(t){"use strict";var r=n["Data.Ring"],a=n["Data.Semiring"],e=(n["Data.Symbol"],n["Data.Unit"],n["Record.Unsafe"],n["Type.Data.RowList"],function(n,t){this.Semiring0=n,this.sub=t}),o=new e(function(){return a.semiringInt},r.intSub);t.Ring=e,t.sub=function(n){return n.sub},t.ringInt=o}(n["Data.Ring"]=n["Data.Ring"]||{}),function(t){"use strict";n["Data.Ord"];var r=n["Data.Eq"],a=n["Data.Ord.Unsafe"],e=(n["Data.Ordering"],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}),o=new e(function(){return r.eqInt},a.unsafeCompare),i=new e(function(){return r.eqChar},a.unsafeCompare),u=function(n){return n.compare};t.Ord=e,t.compare=u,t.comparing=function(n){return function(t){return function(r){return function(a){return u(n)(t(r))(t(a))}}}},t.ordInt=o,t.ordChar=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"]),o=(n["Data.Functor"],n["Data.Unit"],function(n,t){this.Apply0=n,this.bind=t}),i=function(n){this.discard=n},u=new o(function(){return a.applyArray},r.arrayBind),c=function(n){return n.bind},f=new i(function(n){return c(n)});t.Bind=o,t.bind=c,t.bindFlipped=function(n){return e.flip(c(n))},t.Discard=i,t.discard=function(n){return n.discard},t.bindArray=u,t.discardUnit=f}(n["Control.Bind"]=n["Control.Bind"]||{}),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.while=function(n){return function(t){return function(){for(;n();)t()}}},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["Control.Monad.ST.Internal"]=n["Control.Monad.ST.Internal"]||{}),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(n){"use strict";n.topInt=2147483647,n.bottomInt=-2147483648,n.topChar=String.fromCharCode(65535),n.bottomChar=String.fromCharCode(0)}(n["Data.Bounded"]=n["Data.Bounded"]||{}),function(t){"use strict";var r=n["Data.Bounded"],a=n["Data.Ord"],e=(n["Data.Ordering"],n["Data.Unit"],function(n,t,r){this.Ord0=n,this.bottom=t,this.top=r}),o=new e(function(){return a.ordInt},r.bottomInt,r.topInt),i=new e(function(){return a.ordChar},r.bottomChar,r.topChar);t.Bounded=e,t.bottom=function(n){return n.bottom},t.top=function(n){return n.top},t.boundedInt=o,t.boundedChar=i}(n["Data.Bounded"]=n["Data.Bounded"]||{}),function(t){"use strict";n["Control.Alt"],n["Control.Alternative"],n["Control.Applicative"];var r=n["Control.Apply"],a=n["Control.Bind"],e=(n["Control.Category"],n["Control.Extend"],n["Control.Monad"],n["Control.MonadZero"],n["Control.Plus"],n["Data.Bounded"],n["Data.Eq"],n["Data.Function"]),o=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=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])}}},f=c(!0)(e.const(!1)),l=new o.Functor(function(n){return function(t){return t instanceof u?new u(n(t.value0)):i.value}}),d=new r.Apply(function(){return l},function(n){return function(t){if(n instanceof u)return o.map(l)(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])}}),s=new a.Bind(function(){return d},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])}});t.Nothing=i,t.Just=u,t.maybe=c,t.isNothing=f,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=l,t.applyMaybe=d,t.bindMaybe=s}(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}(),f=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])}}),l=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])}}},d=new a.Apply(function(){return f},function(n){return function(t){if(n instanceof u)return new u(n.value0);if(n instanceof c)return o.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])}}),s=new e.Bind(function(){return d},l(function(n){return function(t){return new u(n)}})(function(n){return function(t){return t(n)}})),D=new r.Applicative(function(){return d},c.create);t.Left=u,t.Right=c,t.either=l,t.note=function(n){return i.maybe(new u(n))(c.create)},t.functorEither=f,t.applyEither=d,t.applicativeEither=D,t.bindEither=s}(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}(),e=function(n){return n.tailRecM};t.Loop=r,t.Done=a,t.MonadRec=function(n,t){this.Monad0=n,this.tailRecM=t},t.tailRecM=e,t.tailRecM2=function(n){return function(t){return function(r){return function(a){return e(n)(function(n){return t(n.a)(n.b)})({a:r,b:a})}}}}}(n["Control.Monad.Rec.Class"]=n["Control.Monad.Rec.Class"]||{}),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"],c=n["Data.Functor"],f=n["Data.Unit"],l=(n["Partial.Unsafe"],n.Prelude,new c.Functor(r.map_)),d=new i.Monad(function(){return p},function(){return s}),s=new o.Bind(function(){return D},r.bind_),D=new e.Apply(function(){return l},i.ap(d)),p=new a.Applicative(function(){return D},r.pure_),m=new u.MonadRec(function(){return d},function(n){return function(t){var e=function(n){return n instanceof u.Loop},i=function(n){if(n instanceof u.Done)return n.value0;throw new Error("Failed pattern match at Control.Monad.ST.Internal (line 54, column 32 - line 54, column 46): "+[n.constructor.name])};return o.bind(s)(o.bindFlipped(s)(r.new)(n(t)))(function(t){return o.discard(o.discardUnit)(s)(r.while(c.map(l)(e)(r.read(t)))(o.bind(s)(r.read(t))(function(e){if(e instanceof u.Loop)return o.bind(s)(n(e.value0))(function(n){return c.void(l)(r.write(n)(t))});if(e instanceof u.Done)return a.pure(p)(f.unit);throw new Error("Failed pattern match at Control.Monad.ST.Internal (line 46, column 18 - line 50, column 28): "+[e.constructor.name])})))(function(){return c.map(l)(i)(r.read(t))})})}});t.functorST=l,t.applyST=D,t.applicativeST=p,t.bindST=s,t.monadST=d,t.monadRecST=m}(n["Control.Monad.ST.Internal"]=n["Control.Monad.ST.Internal"]||{}),function(n){"use strict";n.range=function(n){return function(t){for(var r=n>t?-1:1,a=new Array(r*(t-n)+1),e=n,o=0;e!==t;)a[o++]=e,e+=r;return a[o]=e,a}};n.replicate="function"==typeof Array.prototype.fill?function(n){return function(t){return n<1?[]:new Array(n).fill(t)}}:function(n){return function(t){for(var r=[],a=0,e=0;e<n;e++)r[a++]=t;return r}},n.length=function(n){return n.length},n.indexImpl=function(n){return function(t){return function(r){return function(a){return a<0||a>=r.length?t:n(r[a])}}}},n.sortImpl=function(n){return function(t){return t.slice().sort(function(t,r){return n(t)(r)})}},n.slice=function(n){return function(t){return function(r){return r.slice(n,t)}}},n.drop=function(n){return function(t){return n<1?t:t.slice(n)}},n.zipWith=function(n){return function(t){return function(r){for(var a=t.length<r.length?t.length:r.length,e=new Array(a),o=0;o<a;o++)e[o]=n(t[o])(r[o]);return e}}},n.unsafeIndexImpl=function(n){return function(t){return n[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.sortByImpl=function(n){return function(t){return function(){return t.sort(function(t,r){return n(t)(r)})}}}}(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"]),o=(n["Control.Semigroupoid"],n["Data.Maybe"],n["Data.Ord"]),i=n["Data.Ordering"],u=(n["Data.Ring"],n.Prelude,n["Unsafe.Coerce"],function(n){return r.sortByImpl(function(t){return function(r){var a=n(t)(r);if(a instanceof i.GT)return 1;if(a instanceof i.EQ)return 0;if(a instanceof i.LT)return-1;throw new Error("Failed pattern match at Data.Array.ST (line 94, column 15 - line 99, column 1): "+[a.constructor.name])}})});t.push=function(n){return r.pushAll([n])},t.sortBy=u,t.sortWith=function(n){return function(t){return u(o.comparing(n)(t))}},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";var r=n["Data.Ring"],a=(n["Data.Semiring"],n["Data.Symbol"],n["Data.Unit"],function(n){this.Ring0=n}),e=new a(function(){return r.ringInt});t.CommutativeRing=a,t.commutativeRingInt=e}(n["Data.CommutativeRing"]=n["Data.CommutativeRing"]||{}),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},t.snd=function(n){return n.value1}}(n["Data.Tuple"]=n["Data.Tuple"]||{}),function(t){"use strict";(n["Data.Unfoldable"]=n["Data.Unfoldable"]||{}).unfoldrArrayImpl=function(n){return function(t){return function(r){return function(a){return function(e){return function(o){for(var i=[],u=o;;){var c=e(u);if(n(c))return i;var f=t(c);i.push(r(f)),u=a(f)}}}}}}}}(),function(t){"use strict";(n["Data.Unfoldable1"]=n["Data.Unfoldable1"]||{}).unfoldr1ArrayImpl=function(n){return function(t){return function(r){return function(a){return function(e){return function(o){for(var i=[],u=o;;){var c=e(u);i.push(r(c));var f=a(c);if(n(f))return i;u=t(f)}}}}}}}}(),function(t){"use strict";var r=n["Data.Unfoldable1"],a=(n["Data.Boolean"],n["Data.Eq"],n["Data.Maybe"]),e=(n["Data.Ord"],n["Data.Ring"],n["Data.Semigroup.Traversable"],n["Data.Semiring"],n["Data.Tuple"]),o=(n["Partial.Unsafe"],n.Prelude,function(n){this.unfoldr1=n}),i=new o(r.unfoldr1ArrayImpl(a.isNothing)(a.fromJust())(e.fst)(e.snd));t.Unfoldable1=o,t.unfoldr1=function(n){return n.unfoldr1},t.unfoldable1Array=i}(n["Data.Unfoldable1"]=n["Data.Unfoldable1"]||{}),function(t){"use strict";var r=n["Data.Unfoldable"],a=(n["Data.Function"],n["Data.Functor"],n["Data.Maybe"]),e=(n["Data.Ord"],n["Data.Ring"],n["Data.Traversable"],n["Data.Tuple"]),o=n["Data.Unfoldable1"],i=(n["Data.Unit"],n["Partial.Unsafe"],n.Prelude,function(n,t){this.Unfoldable10=n,this.unfoldr=t}),u=new i(function(){return o.unfoldable1Array},r.unfoldrArrayImpl(a.isNothing)(a.fromJust())(e.fst)(e.snd));t.Unfoldable=i,t.unfoldr=function(n){return n.unfoldr},t.unfoldableArray=u}(n["Data.Unfoldable"]=n["Data.Unfoldable"]||{}),function(t){"use strict";var r=n["Data.Array"],a=(n["Control.Alt"],n["Control.Alternative"],n["Control.Applicative"]),e=(n["Control.Apply"],n["Control.Bind"]),o=(n["Control.Category"],n["Control.Lazy"],n["Control.Monad.Rec.Class"]),i=(n["Control.Monad.ST"],n["Control.Monad.ST.Internal"],n["Control.Semigroupoid"],n["Data.Array.NonEmpty.Internal"],n["Data.Array.ST"],n["Data.Array.ST.Iterator"],n["Data.Boolean"]),u=(n["Data.Eq"],n["Data.Foldable"],n["Data.Function"]),c=(n["Data.Functor"],n["Data.HeytingAlgebra"],n["Data.Maybe"]),f=(n["Data.Ord"],n["Data.Ordering"]),l=(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 r.unsafeIndexImpl}),d=function(n){return[n]},s=r.indexImpl(c.Just.create)(c.Nothing.value),D=u.flip(e.bind(e.bindArray));t.singleton=d,t.head=function(n){return s(n)(0)},t.index=s,t.concatMap=D,t.mapMaybe=function(n){return D(function(t){return c.maybe([])(d)(n(t))})},t.mapWithIndex=function(n){return function(t){return r.zipWith(n)(r.range(0)(r.length(t)-1|0))(t)}},t.sortBy=function(n){return function(t){return r.sortImpl(function(t){return function(r){var a=n(t)(r);if(a instanceof f.GT)return 1;if(a instanceof f.EQ)return 0;if(a instanceof f.LT)return-1;throw new Error("Failed pattern match at Data.Array (line 702, column 15 - line 707, column 1): "+[a.constructor.name])}})(t)}},t.foldRecM=function(n){return function(t){return function(u){return function(c){return o.tailRecM2(n)(function(u){return function(f){if(f>=r.length(c))return a.pure(n.Monad0().Applicative0())(new o.Done(u));if(i.otherwise)return e.bind(n.Monad0().Bind1())(t(u)(l()(c)(f)))(function(t){return a.pure(n.Monad0().Applicative0())(new o.Loop({a:t,b:f+1|0}))});throw new Error("Failed pattern match at Data.Array (line 1099, column 3 - line 1103, column 42): "+[u.constructor.name,f.constructor.name])}})(u)(0)}}}},t.unsafeIndex=l,t.replicate=r.replicate,t.length=r.length,t.drop=r.drop}(n["Data.Array"]=n["Data.Array"]||{}),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(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";var r=n["Data.EuclideanRing"],a=(n["Data.BooleanAlgebra"],n["Data.CommutativeRing"]),e=(n["Data.Eq"],n["Data.HeytingAlgebra"],n["Data.Ring"],n["Data.Semiring"],function(n,t,r,a){this.CommutativeRing0=n,this.degree=t,this.div=r,this.mod=a}),o=new e(function(){return a.commutativeRingInt},r.intDegree,r.intDiv,r.intMod);t.EuclideanRing=e,t.degree=function(n){return n.degree},t.div=function(n){return n.div},t.mod=function(n){return n.mod},t.euclideanRingInt=o}(n["Data.EuclideanRing"]=n["Data.EuclideanRing"]||{}),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";var t="function"==typeof Array.from,r="undefined"!=typeof Symbol&&null!=Symbol&&void 0!==Symbol.iterator&&"function"==typeof String.prototype[Symbol.iterator],a="function"==typeof String.prototype.fromCodePoint,e="function"==typeof String.prototype.codePointAt;n._unsafeCodePointAt0=function(n){return e?function(n){return n.codePointAt(0)}:n},n._singleton=function(n){return a?String.fromCodePoint:n},n._take=function(n){return function(t){return r?function(n){for(var r="",a=n[Symbol.iterator](),e=0;e<t;++e){var o=a.next();if(o.done)return r;r+=o.value}return r}:n(t)}},n._toCodePointArray=function(n){return function(r){return t?function(n){return Array.from(n,r)}:n}}}(n["Data.String.CodePoints"]=n["Data.String.CodePoints"]||{}),function(n){"use strict";n.toCharCode=function(n){return n.charCodeAt(0)},n.fromCharCode=function(n){return String.fromCharCode(n)}}(n["Data.Enum"]=n["Data.Enum"]||{}),function(t){"use strict";var r=n["Data.Enum"],a=(n["Control.Apply"],n["Control.Bind"],n["Control.MonadPlus"],n["Control.MonadZero"],n["Control.Semigroupoid"],n["Data.Boolean"],n["Data.Bounded"]),e=(n["Data.Either"],n["Data.Eq"],n["Data.Function"],n["Data.Functor"],n["Data.HeytingAlgebra"],n["Data.Maybe"]),o=(n["Data.Newtype"],n["Data.Ord"]),i=(n["Data.Ordering"],n["Data.Ring"],n["Data.Semigroup"],n["Data.Semiring"],n["Data.Show"],n["Data.Tuple"],n["Data.Unfoldable"],n["Data.Unfoldable1"],n["Data.Unit"],n["Partial.Unsafe"],n.Prelude,function(n,t,r){this.Ord0=n,this.pred=t,this.succ=r}),u=function(n,t,r,a,e){this.Bounded0=n,this.Enum1=t,this.cardinality=r,this.fromEnum=a,this.toEnum=e},c=function(n){return n.toEnum},f=function(n){return n.fromEnum},l=function(n){return function(t){return function(r){return n(t(r)+1|0)}}},d=function(n){return function(t){return function(r){return n(t(r)-1|0)}}},s=function(n){return n>=a.bottom(a.boundedInt)&&n<=a.top(a.boundedInt)?new e.Just(r.fromCharCode(n)):e.Nothing.value},D=new i(function(){return o.ordChar},d(s)(r.toCharCode),l(s)(r.toCharCode)),p=new u(function(){return a.boundedChar},function(){return D},r.toCharCode(a.top(a.boundedChar))-r.toCharCode(a.bottom(a.boundedChar))|0,r.toCharCode,s);t.Enum=i,t.succ=function(n){return n.succ},t.pred=function(n){return n.pred},t.BoundedEnum=u,t.cardinality=function(n){return n.cardinality},t.toEnum=c,t.fromEnum=f,t.toEnumWithDefaults=function(n){return function(t){return function(r){return function(o){var i=c(n)(o);if(i instanceof e.Just)return i.value0;if(i instanceof e.Nothing)return o<f(n)(a.bottom(n.Bounded0()))?t:r;throw new Error("Failed pattern match at Data.Enum (line 158, column 33 - line 160, column 62): "+[i.constructor.name])}}}},t.defaultSucc=l,t.defaultPred=d,t.enumChar=D,t.boundedEnumChar=p}(n["Data.Enum"]=n["Data.Enum"]||{}),function(n){"use strict";n.singleton=function(n){return n},n.length=function(n){return n.length},n.drop=function(n){return function(t){return t.substring(n)}}}(n["Data.String.CodeUnits"]=n["Data.String.CodeUnits"]||{}),function(t){"use strict";(n["Data.String.Unsafe"]=n["Data.String.Unsafe"]||{}).charAt=function(n){return function(t){if(n>=0&&n<t.length)return t.charAt(n);throw new Error("Data.String.Unsafe.charAt: Invalid index.")}}}(),function(t){"use strict";var r=n["Data.String.Unsafe"];t.charAt=r.charAt}(n["Data.String.Unsafe"]=n["Data.String.Unsafe"]||{}),function(t){"use strict";var r=n["Data.String.CodeUnits"];n["Control.Semigroupoid"],n["Data.Boolean"],n["Data.Eq"],n["Data.Function"],n["Data.HeytingAlgebra"],n["Data.Maybe"],n["Data.Ord"],n["Data.Ring"],n["Data.Semiring"],n["Data.String.Pattern"],n["Data.String.Unsafe"],n.Prelude;t.singleton=r.singleton,t.length=r.length,t.drop=r.drop}(n["Data.String.CodeUnits"]=n["Data.String.CodeUnits"]||{}),function(n){"use strict";n.split=function(n){return function(t){return t.split(n)}},n.trim=function(n){return n.trim()},n.joinWith=function(n){return function(t){return t.join(n)}}}(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,t.joinWith=r.joinWith}(n["Data.String.Common"]=n["Data.String.Common"]||{}),function(t){"use strict";var r=n["Data.String.CodePoints"],a=(n["Control.Semigroupoid"],n["Data.Array"]),e=(n["Data.Boolean"],n["Data.Bounded"]),o=n["Data.Enum"],i=(n["Data.Eq"],n["Data.EuclideanRing"]),u=n["Data.Functor"],c=(n["Data.HeytingAlgebra"],n["Data.Int"],n["Data.Maybe"]),f=(n["Data.Ord"],n["Data.Ring"],n["Data.Semigroup"],n["Data.Semiring"],n["Data.Show"],n["Data.String.CodeUnits"]),l=(n["Data.String.Common"],n["Data.String.Pattern"],n["Data.String.Unsafe"]),d=n["Data.Tuple"],s=n["Data.Unfoldable"],D=(n.Prelude,function(n){return function(t){return 65536+((1024*(n-55296|0)|0)+(t-56320|0)|0)|0}}),p=function(n){return 56320<=n&&n<=57343},m=function(n){return 55296<=n&&n<=56319},h=function(n){var t=f.length(n);if(0===t)return c.Nothing.value;if(1===t)return new c.Just({head:o.fromEnum(o.boundedEnumChar)(l.charAt(0)(n)),tail:""});var r=o.fromEnum(o.boundedEnumChar)(l.charAt(1)(n)),a=o.fromEnum(o.boundedEnumChar)(l.charAt(0)(n));return m(a)&&p(r)?new c.Just({head:D(a)(r),tail:f.drop(2)(n)}):new c.Just({head:a,tail:f.drop(1)(n)})},g=function(n){return u.map(c.functorMaybe)(function(n){return new d.Tuple(n.head,n.tail)})(h(n))},C=r._unsafeCodePointAt0(function(n){var t=o.fromEnum(o.boundedEnumChar)(l.charAt(0)(n));if(m(t)&&f.length(n)>1){var r=o.fromEnum(o.boundedEnumChar)(l.charAt(1)(n));return p(r)?D(t)(r):t}return t}),v=r._toCodePointArray(function(n){return s.unfoldr(s.unfoldableArray)(g)(n)})(C),y=function(n){return f.singleton(o.toEnumWithDefaults(o.boundedEnumChar)(e.bottom(e.boundedChar))(e.top(e.boundedChar))(n))},S=r._singleton(function(n){if(n<=65535)return y(n);var t=i.div(i.euclideanRingInt)(n-65536|0)(1024)+55296|0,r=i.mod(i.euclideanRingInt)(n-65536|0)(1024)+56320|0;return y(t)+y(r)}),b=function(n){return function(t){if(n<1)return"";var r=h(t);return r instanceof c.Just?S(r.value0.head)+b(n-1|0)(r.value0.tail):t}},w=r._take(b);t.singleton=S,t.toCodePointArray=v,t.uncons=h,t.length=function(n){return a.length(v(n))},t.take=w,t.drop=function(n){return function(t){return f.drop(f.length(w(n)(t)))(t)}}}(n["Data.String.CodePoints"]=n["Data.String.CodePoints"]||{}),function(t){"use strict";var r=n["Control.Applicative"],a=n["Control.Bind"],e=(n["Control.Monad.ST"],n["Control.Monad.ST.Internal"]),o=n["Data.Array"],i=n["Data.Array.ST"],u=n["Data.Either"],c=(n["Data.Eq"],n["Data.Functor"]),f=n["Data.Int"],l=n["Data.Maybe"],d=n["Data.Ord"],s=n["Data.Ordering"],D=(n["Data.Ring"],n["Data.Semigroup"],n["Data.Semiring"],n["Data.Show"]),p=(n["Data.String"],n["Data.String.CodePoints"]),m=n["Data.String.Common"],h=(n["Data.String.Pattern"],n["Partial.Unsafe"]),g=(n.Prelude,function(n){var t=m.split("\n")(m.trim(n));return a.bind(u.bindEither)(u.note("n m")(a.bind(l.bindMaybe)(o.head(t))(function(n){var t=o.mapMaybe(f.fromString)(m.split(" ")(n));return 2===t.length?new l.Just({n:t[0],m:t[1]}):l.Nothing.value})))(function(n){var a=o.mapWithIndex(function(n){return function(t){return{p:t.p,y:t.y,i:n+1|0}}})(o.mapMaybe(function(n){var t=o.mapMaybe(f.fromString)(m.split(" ")(n));return 2===t.length?new l.Just({p:t[0],y:t[1]}):l.Nothing.value})(o.drop(1)(t)));return r.pure(u.applicativeEither)(m.joinWith("\n")((n.n,function(n){return function(n){var t,r=function(n){var t=D.show(D.showInt)(n),r=p.length(t);return r<6?m.joinWith("")(o.replicate(6-r|0)("0"))+t:t};return(t=o.sortBy(function(n){return function(t){var r=d.compare(d.ordInt)(n.p)(t.p);if(r instanceof s.LT)return s.LT.value;if(r instanceof s.GT)return s.GT.value;if(r instanceof s.EQ)return d.compare(d.ordInt)(n.y)(t.y);throw new Error("Failed pattern match at AtCoder.ABC113.C (line 60, column 11 - line 63, column 32): "+[r.constructor.name])}})(n),function(){var n=i.empty(),a=(o.foldRecM(e.monadRecST)(function(t){return function(r){var a=(t["p'"]!==r.p?0:t.x)+1|0;return function(){return i.push({p:r.p,x:a,i:r.i})(n)(),{"p'":r.p,x:a}}}})({"p'":-1,x:0})(t)(),i.sortWith(d.ordInt)(function(n){return n.i})(n)(),i.unsafeFreeze(n)());return c.map(c.functorArray)(function(n){return r(n.p)+r(n.x)})(a)})()}})(n.m)(a)))})});t.solve=function(n){var t=g(n);if(t instanceof u.Left)return h.unsafeCrashWith(t.value0);if(t instanceof u.Right)return t.value0;throw new Error("Failed pattern match at AtCoder.ABC113.C (line 19, column 3 - line 21, column 24): "+[t.constructor.name])}}(n["AtCoder.ABC113.C"]=n["AtCoder.ABC113.C"]||{}),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}(),f=function(){function n(){}return n.value=new n,n}(),l=function(){function n(){}return n.value=new n,n}(),d=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 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=a,t.UTF8=e,t.UTF16LE=o,t.UCS2=i,t.Base64=u,t.Latin1=c,t.Binary=f,t.Hex=l,t.showEncoding=d}(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.ABC113.C"],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)