From de10e43cde2640b2d0885697fea1b94b6ee43427 Mon Sep 17 00:00:00 2001 From: Mark Anderson Date: Mon, 3 Nov 2025 11:37:00 +0000 Subject: Challenge 346 Solutions (Raku) --- challenge-346/mark-anderson/raku/ch-1.raku | 20 ++++++++ challenge-346/mark-anderson/raku/ch-2.raku | 81 ++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 challenge-346/mark-anderson/raku/ch-1.raku create mode 100644 challenge-346/mark-anderson/raku/ch-2.raku diff --git a/challenge-346/mark-anderson/raku/ch-1.raku b/challenge-346/mark-anderson/raku/ch-1.raku new file mode 100644 index 0000000000..3bb622d2ee --- /dev/null +++ b/challenge-346/mark-anderson/raku/ch-1.raku @@ -0,0 +1,20 @@ +#!/usr/bin/env raku +use Test; + +is longest-parenthesis('(()())'), 6; +is longest-parenthesis(')()())'), 4; +is longest-parenthesis('(((()))()(((()'), 8; +is longest-parenthesis('))))((()('), 2; +is longest-parenthesis('()(()'), 2; + +# I think I want to use the <~~> recursive feature here but I +# don't really understand it. The following comes close but it +# doesn't quite give the output I want. + +# $str ~~ m:g/ '(' [ <-[()]>* <~~> <-[()]>* ]* ')' /; + +sub longest-parenthesis($str) +{ + my @m = $str ~~ m:g/ [ ('('+) (')'+) ]+ /; + max @m>>.chars +} diff --git a/challenge-346/mark-anderson/raku/ch-2.raku b/challenge-346/mark-anderson/raku/ch-2.raku new file mode 100644 index 0000000000..60238a8f9d --- /dev/null +++ b/challenge-346/mark-anderson/raku/ch-2.raku @@ -0,0 +1,81 @@ +#!/usr/bin/env raku +use JSON::Fast; +use Test; + +is-deeply magic-expression("123", 6), ("1*2*3", "1+2+3"); +is-deeply magic-expression("105", 5), ("1*0+5", "10-5"); +is-deeply magic-expression("232", 8), ("2*3+2", "2+3*2"); +is-deeply magic-expression("1234", 10), ("1*2*3+4", "1+2+3+4"); +is-deeply magic-expression("1001", 2), ("1+0*0+1", "1+0+0+1", "1+0-0+1", "1-0*0+1", "1-0+0+1", "1-0-0+1"); + +# +# With help from https://andrewshitov.com/2018/10/31/creating-a-calculator-with-perl-6-grammars/ +# + +grammar Calculate +{ + rule TOP { } + rule add-sub { + % $=<[+-]> } + rule mult { + % '*' } + rule digits { + } +} + +class Actions +{ + method TOP($/) { make $.made } + method digits($/) { make $/ } + method mult($/) { make [*] $>>.made } + method add-sub($/) + { + my @ops = $>>.Str; + my @vals = $>>.made; + my $result; + + for @vals Z @ops.unshift('+') + { + if .tail eq '+' { $result += .head } + else { $result -= .head } + } + + make $result + } +} + +multi magic-expression($str where *.chars > 7, $target) +{ + note "This is a brute force solution: \$str must be 7 characters or less" +} + +multi magic-expression($str, $target) +{ + my @nums = $str.comb; + my (@partitions, @operators) := from-json $=finish; + + gather for @partitions[@nums-2]<> -> @p + { + my @r = @nums.rotor(@p)>>.join; + next if any @r ~~ /^0\d/; + + for @operators[@p-2]<> -> @o + { + my $exp = flat roundrobin @r, @o; + take [~] $exp if Calculate.parse($exp, actions => Actions).made == $target + } + } +} + +=finish +[ +[[[1,1]], +[[1,1,1],[1,2],[2,1]], +[[1,1,1,1],[1,1,2],[1,2,1],[2,1,1],[1,3],[3,1],[2,2]], +[[1,1,1,1,1],[1,1,1,2],[1,1,2,1],[1,2,1,1],[2,1,1,1],[1,1,3],[1,3,1],[3,1,1],[1,2,2],[2,1,2],[2,2,1],[1,4],[4,1],[2,3],[3,2]], +[[1,1,1,1,1,1],[1,1,1,1,2],[1,1,1,2,1],[1,1,2,1,1],[1,2,1,1,1],[2,1,1,1,1],[1,1,1,3],[1,1,3,1],[1,3,1,1],[3,1,1,1],[1,1,2,2],[1,2,1,2],[1,2,2,1],[2,1,1,2],[2,1,2,1],[2,2,1,1],[1,1,4],[1,4,1],[4,1,1],[1,2,3],[1,3,2],[2,1,3],[2,3,1],[3,1,2],[3,2,1],[1,5],[5,1],[2,2,2],[2,4],[4,2],[3,3]], +[[1,1,1,1,1,1,1],[1,1,1,1,1,2],[1,1,1,1,2,1],[1,1,1,2,1,1],[1,1,2,1,1,1],[1,2,1,1,1,1],[2,1,1,1,1,1],[1,1,1,1,3],[1,1,1,3,1],[1,1,3,1,1],[1,3,1,1,1],[3,1,1,1,1],[1,1,1,2,2],[1,1,2,1,2],[1,1,2,2,1],[1,2,1,1,2],[1,2,1,2,1],[1,2,2,1,1],[2,1,1,1,2],[2,1,1,2,1],[2,1,2,1,1],[2,2,1,1,1],[1,1,1,4],[1,1,4,1],[1,4,1,1],[4,1,1,1],[1,1,2,3],[1,1,3,2],[1,2,1,3],[1,2,3,1],[1,3,1,2],[1,3,2,1],[2,1,1,3],[2,1,3,1],[2,3,1,1],[3,1,1,2],[3,1,2,1],[3,2,1,1],[1,1,5],[1,5,1],[5,1,1],[1,2,2,2],[2,1,2,2],[2,2,1,2],[2,2,2,1],[1,2,4],[1,4,2],[2,1,4],[2,4,1],[4,1,2],[4,2,1],[1,3,3],[3,1,3],[3,3,1],[1,6],[6,1],[2,2,3],[2,3,2],[3,2,2],[2,5],[5,2],[3,4],[4,3]]], + +[[["*"],["+"],["-"]], +[["*","*"],["*","+"],["*","-"],["+","*"],["+","+"],["+","-"],["-","*"],["-","+"],["-","-"]], +[["*","*","*"],["*","*","+"],["*","*","-"],["*","+","*"],["*","+","+"],["*","+","-"],["*","-","*"],["*","-","+"],["*","-","-"],["+","*","*"],["+","*","+"],["+","*","-"],["+","+","*"],["+","+","+"],["+","+","-"],["+","-","*"],["+","-","+"],["+","-","-"],["-","*","*"],["-","*","+"],["-","*","-"],["-","+","*"],["-","+","+"],["-","+","-"],["-","-","*"],["-","-","+"],["-","-","-"]], +[["*","*","*","*"],["*","*","*","+"],["*","*","*","-"],["*","*","+","*"],["*","*","+","+"],["*","*","+","-"],["*","*","-","*"],["*","*","-","+"],["*","*","-","-"],["*","+","*","*"],["*","+","*","+"],["*","+","*","-"],["*","+","+","*"],["*","+","+","+"],["*","+","+","-"],["*","+","-","*"],["*","+","-","+"],["*","+","-","-"],["*","-","*","*"],["*","-","*","+"],["*","-","*","-"],["*","-","+","*"],["*","-","+","+"],["*","-","+","-"],["*","-","-","*"],["*","-","-","+"],["*","-","-","-"],["+","*","*","*"],["+","*","*","+"],["+","*","*","-"],["+","*","+","*"],["+","*","+","+"],["+","*","+","-"],["+","*","-","*"],["+","*","-","+"],["+","*","-","-"],["+","+","*","*"],["+","+","*","+"],["+","+","*","-"],["+","+","+","*"],["+","+","+","+"],["+","+","+","-"],["+","+","-","*"],["+","+","-","+"],["+","+","-","-"],["+","-","*","*"],["+","-","*","+"],["+","-","*","-"],["+","-","+","*"],["+","-","+","+"],["+","-","+","-"],["+","-","-","*"],["+","-","-","+"],["+","-","-","-"],["-","*","*","*"],["-","*","*","+"],["-","*","*","-"],["-","*","+","*"],["-","*","+","+"],["-","*","+","-"],["-","*","-","*"],["-","*","-","+"],["-","*","-","-"],["-","+","*","*"],["-","+","*","+"],["-","+","*","-"],["-","+","+","*"],["-","+","+","+"],["-","+","+","-"],["-","+","-","*"],["-","+","-","+"],["-","+","-","-"],["-","-","*","*"],["-","-","*","+"],["-","-","*","-"],["-","-","+","*"],["-","-","+","+"],["-","-","+","-"],["-","-","-","*"],["-","-","-","+"],["-","-","-","-"]], +[["*","*","*","*","*"],["*","*","*","*","+"],["*","*","*","*","-"],["*","*","*","+","*"],["*","*","*","+","+"],["*","*","*","+","-"],["*","*","*","-","*"],["*","*","*","-","+"],["*","*","*","-","-"],["*","*","+","*","*"],["*","*","+","*","+"],["*","*","+","*","-"],["*","*","+","+","*"],["*","*","+","+","+"],["*","*","+","+","-"],["*","*","+","-","*"],["*","*","+","-","+"],["*","*","+","-","-"],["*","*","-","*","*"],["*","*","-","*","+"],["*","*","-","*","-"],["*","*","-","+","*"],["*","*","-","+","+"],["*","*","-","+","-"],["*","*","-","-","*"],["*","*","-","-","+"],["*","*","-","-","-"],["*","+","*","*","*"],["*","+","*","*","+"],["*","+","*","*","-"],["*","+","*","+","*"],["*","+","*","+","+"],["*","+","*","+","-"],["*","+","*","-","*"],["*","+","*","-","+"],["*","+","*","-","-"],["*","+","+","*","*"],["*","+","+","*","+"],["*","+","+","*","-"],["*","+","+","+","*"],["*","+","+","+","+"],["*","+","+","+","-"],["*","+","+","-","*"],["*","+","+","-","+"],["*","+","+","-","-"],["*","+","-","*","*"],["*","+","-","*","+"],["*","+","-","*","-"],["*","+","-","+","*"],["*","+","-","+","+"],["*","+","-","+","-"],["*","+","-","-","*"],["*","+","-","-","+"],["*","+","-","-","-"],["*","-","*","*","*"],["*","-","*","*","+"],["*","-","*","*","-"],["*","-","*","+","*"],["*","-","*","+","+"],["*","-","*","+","-"],["*","-","*","-","*"],["*","-","*","-","+"],["*","-","*","-","-"],["*","-","+","*","*"],["*","-","+","*","+"],["*","-","+","*","-"],["*","-","+","+","*"],["*","-","+","+","+"],["*","-","+","+","-"],["*","-","+","-","*"],["*","-","+","-","+"],["*","-","+","-","-"],["*","-","-","*","*"],["*","-","-","*","+"],["*","-","-","*","-"],["*","-","-","+","*"],["*","-","-","+","+"],["*","-","-","+","-"],["*","-","-","-","*"],["*","-","-","-","+"],["*","-","-","-","-"],["+","*","*","*","*"],["+","*","*","*","+"],["+","*","*","*","-"],["+","*","*","+","*"],["+","*","*","+","+"],["+","*","*","+","-"],["+","*","*","-","*"],["+","*","*","-","+"],["+","*","*","-","-"],["+","*","+","*","*"],["+","*","+","*","+"],["+","*","+","*","-"],["+","*","+","+","*"],["+","*","+","+","+"],["+","*","+","+","-"],["+","*","+","-","*"],["+","*","+","-","+"],["+","*","+","-","-"],["+","*","-","*","*"],["+","*","-","*","+"],["+","*","-","*","-"],["+","*","-","+","*"],["+","*","-","+","+"],["+","*","-","+","-"],["+","*","-","-","*"],["+","*","-","-","+"],["+","*","-","-","-"],["+","+","*","*","*"],["+","+","*","*","+"],["+","+","*","*","-"],["+","+","*","+","*"],["+","+","*","+","+"],["+","+","*","+","-"],["+","+","*","-","*"],["+","+","*","-","+"],["+","+","*","-","-"],["+","+","+","*","*"],["+","+","+","*","+"],["+","+","+","*","-"],["+","+","+","+","*"],["+","+","+","+","+"],["+","+","+","+","-"],["+","+","+","-","*"],["+","+","+","-","+"],["+","+","+","-","-"],["+","+","-","*","*"],["+","+","-","*","+"],["+","+","-","*","-"],["+","+","-","+","*"],["+","+","-","+","+"],["+","+","-","+","-"],["+","+","-","-","*"],["+","+","-","-","+"],["+","+","-","-","-"],["+","-","*","*","*"],["+","-","*","*","+"],["+","-","*","*","-"],["+","-","*","+","*"],["+","-","*","+","+"],["+","-","*","+","-"],["+","-","*","-","*"],["+","-","*","-","+"],["+","-","*","-","-"],["+","-","+","*","*"],["+","-","+","*","+"],["+","-","+","*","-"],["+","-","+","+","*"],["+","-","+","+","+"],["+","-","+","+","-"],["+","-","+","-","*"],["+","-","+","-","+"],["+","-","+","-","-"],["+","-","-","*","*"],["+","-","-","*","+"],["+","-","-","*","-"],["+","-","-","+","*"],["+","-","-","+","+"],["+","-","-","+","-"],["+","-","-","-","*"],["+","-","-","-","+"],["+","-","-","-","-"],["-","*","*","*","*"],["-","*","*","*","+"],["-","*","*","*","-"],["-","*","*","+","*"],["-","*","*","+","+"],["-","*","*","+","-"],["-","*","*","-","*"],["-","*","*","-","+"],["-","*","*","-","-"],["-","*","+","*","*"],["-","*","+","*","+"],["-","*","+","*","-"],["-","*","+","+","*"],["-","*","+","+","+"],["-","*","+","+","-"],["-","*","+","-","*"],["-","*","+","-","+"],["-","*","+","-","-"],["-","*","-","*","*"],["-","*","-","*","+"],["-","*","-","*","-"],["-","*","-","+","*"],["-","*","-","+","+"],["-","*","-","+","-"],["-","*","-","-","*"],["-","*","-","-","+"],["-","*","-","-","-"],["-","+","*","*","*"],["-","+","*","*","+"],["-","+","*","*","-"],["-","+","*","+","*"],["-","+","*","+","+"],["-","+","*","+","-"],["-","+","*","-","*"],["-","+","*","-","+"],["-","+","*","-","-"],["-","+","+","*","*"],["-","+","+","*","+"],["-","+","+","*","-"],["-","+","+","+","*"],["-","+","+","+","+"],["-","+","+","+","-"],["-","+","+","-","*"],["-","+","+","-","+"],["-","+","+","-","-"],["-","+","-","*","*"],["-","+","-","*","+"],["-","+","-","*","-"],["-","+","-","+","*"],["-","+","-","+","+"],["-","+","-","+","-"],["-","+","-","-","*"],["-","+","-","-","+"],["-","+","-","-","-"],["-","-","*","*","*"],["-","-","*","*","+"],["-","-","*","*","-"],["-","-","*","+","*"],["-","-","*","+","+"],["-","-","*","+","-"],["-","-","*","-","*"],["-","-","*","-","+"],["-","-","*","-","-"],["-","-","+","*","*"],["-","-","+","*","+"],["-","-","+","*","-"],["-","-","+","+","*"],["-","-","+","+","+"],["-","-","+","+","-"],["-","-","+","-","*"],["-","-","+","-","+"],["-","-","+","-","-"],["-","-","-","*","*"],["-","-","-","*","+"],["-","-","-","*","-"],["-","-","-","+","*"],["-","-","-","+","+"],["-","-","-","+","-"],["-","-","-","-","*"],["-","-","-","-","+"],["-","-","-","-","-"]], +[["*","*","*","*","*","*"],["*","*","*","*","*","+"],["*","*","*","*","*","-"],["*","*","*","*","+","*"],["*","*","*","*","+","+"],["*","*","*","*","+","-"],["*","*","*","*","-","*"],["*","*","*","*","-","+"],["*","*","*","*","-","-"],["*","*","*","+","*","*"],["*","*","*","+","*","+"],["*","*","*","+","*","-"],["*","*","*","+","+","*"],["*","*","*","+","+","+"],["*","*","*","+","+","-"],["*","*","*","+","-","*"],["*","*","*","+","-","+"],["*","*","*","+","-","-"],["*","*","*","-","*","*"],["*","*","*","-","*","+"],["*","*","*","-","*","-"],["*","*","*","-","+","*"],["*","*","*","-","+","+"],["*","*","*","-","+","-"],["*","*","*","-","-","*"],["*","*","*","-","-","+"],["*","*","*","-","-","-"],["*","*","+","*","*","*"],["*","*","+","*","*","+"],["*","*","+","*","*","-"],["*","*","+","*","+","*"],["*","*","+","*","+","+"],["*","*","+","*","+","-"],["*","*","+","*","-","*"],["*","*","+","*","-","+"],["*","*","+","*","-","-"],["*","*","+","+","*","*"],["*","*","+","+","*","+"],["*","*","+","+","*","-"],["*","*","+","+","+","*"],["*","*","+","+","+","+"],["*","*","+","+","+","-"],["*","*","+","+","-","*"],["*","*","+","+","-","+"],["*","*","+","+","-","-"],["*","*","+","-","*","*"],["*","*","+","-","*","+"],["*","*","+","-","*","-"],["*","*","+","-","+","*"],["*","*","+","-","+","+"],["*","*","+","-","+","-"],["*","*","+","-","-","*"],["*","*","+","-","-","+"],["*","*","+","-","-","-"],["*","*","-","*","*","*"],["*","*","-","*","*","+"],["*","*","-","*","*","-"],["*","*","-","*","+","*"],["*","*","-","*","+","+"],["*","*","-","*","+","-"],["*","*","-","*","-","*"],["*","*","-","*","-","+"],["*","*","-","*","-","-"],["*","*","-","+","*","*"],["*","*","-","+","*","+"],["*","*","-","+","*","-"],["*","*","-","+","+","*"],["*","*","-","+","+","+"],["*","*","-","+","+","-"],["*","*","-","+","-","*"],["*","*","-","+","-","+"],["*","*","-","+","-","-"],["*","*","-","-","*","*"],["*","*","-","-","*","+"],["*","*","-","-","*","-"],["*","*","-","-","+","*"],["*","*","-","-","+","+"],["*","*","-","-","+","-"],["*","*","-","-","-","*"],["*","*","-","-","-","+"],["*","*","-","-","-","-"],["*","+","*","*","*","*"],["*","+","*","*","*","+"],["*","+","*","*","*","-"],["*","+","*","*","+","*"],["*","+","*","*","+","+"],["*","+","*","*","+","-"],["*","+","*","*","-","*"],["*","+","*","*","-","+"],["*","+","*","*","-","-"],["*","+","*","+","*","*"],["*","+","*","+","*","+"],["*","+","*","+","*","-"],["*","+","*","+","+","*"],["*","+","*","+","+","+"],["*","+","*","+","+","-"],["*","+","*","+","-","*"],["*","+","*","+","-","+"],["*","+","*","+","-","-"],["*","+","*","-","*","*"],["*","+","*","-","*","+"],["*","+","*","-","*","-"],["*","+","*","-","+","*"],["*","+","*","-","+","+"],["*","+","*","-","+","-"],["*","+","*","-","-","*"],["*","+","*","-","-","+"],["*","+","*","-","-","-"],["*","+","+","*","*","*"],["*","+","+","*","*","+"],["*","+","+","*","*","-"],["*","+","+","*","+","*"],["*","+","+","*","+","+"],["*","+","+","*","+","-"],["*","+","+","*","-","*"],["*","+","+","*","-","+"],["*","+","+","*","-","-"],["*","+","+","+","*","*"],["*","+","+","+","*","+"],["*","+","+","+","*","-"],["*","+","+","+","+","*"],["*","+","+","+","+","+"],["*","+","+","+","+","-"],["*","+","+","+","-","*"],["*","+","+","+","-","+"],["*","+","+","+","-","-"],["*","+","+","-","*","*"],["*","+","+","-","*","+"],["*","+","+","-","*","-"],["*","+","+","-","+","*"],["*","+","+","-","+","+"],["*","+","+","-","+","-"],["*","+","+","-","-","*"],["*","+","+","-","-","+"],["*","+","+","-","-","-"],["*","+","-","*","*","*"],["*","+","-","*","*","+"],["*","+","-","*","*","-"],["*","+","-","*","+","*"],["*","+","-","*","+","+"],["*","+","-","*","+","-"],["*","+","-","*","-","*"],["*","+","-","*","-","+"],["*","+","-","*","-","-"],["*","+","-","+","*","*"],["*","+","-","+","*","+"],["*","+","-","+","*","-"],["*","+","-","+","+","*"],["*","+","-","+","+","+"],["*","+","-","+","+","-"],["*","+","-","+","-","*"],["*","+","-","+","-","+"],["*","+","-","+","-","-"],["*","+","-","-","*","*"],["*","+","-","-","*","+"],["*","+","-","-","*","-"],["*","+","-","-","+","*"],["*","+","-","-","+","+"],["*","+","-","-","+","-"],["*","+","-","-","-","*"],["*","+","-","-","-","+"],["*","+","-","-","-","-"],["*","-","*","*","*","*"],["*","-","*","*","*","+"],["*","-","*","*","*","-"],["*","-","*","*","+","*"],["*","-","*","*","+","+"],["*","-","*","*","+","-"],["*","-","*","*","-","*"],["*","-","*","*","-","+"],["*","-","*","*","-","-"],["*","-","*","+","*","*"],["*","-","*","+","*","+"],["*","-","*","+","*","-"],["*","-","*","+","+","*"],["*","-","*","+","+","+"],["*","-","*","+","+","-"],["*","-","*","+","-","*"],["*","-","*","+","-","+"],["*","-","*","+","-","-"],["*","-","*","-","*","*"],["*","-","*","-","*","+"],["*","-","*","-","*","-"],["*","-","*","-","+","*"],["*","-","*","-","+","+"],["*","-","*","-","+","-"],["*","-","*","-","-","*"],["*","-","*","-","-","+"],["*","-","*","-","-","-"],["*","-","+","*","*","*"],["*","-","+","*","*","+"],["*","-","+","*","*","-"],["*","-","+","*","+","*"],["*","-","+","*","+","+"],["*","-","+","*","+","-"],["*","-","+","*","-","*"],["*","-","+","*","-","+"],["*","-","+","*","-","-"],["*","-","+","+","*","*"],["*","-","+","+","*","+"],["*","-","+","+","*","-"],["*","-","+","+","+","*"],["*","-","+","+","+","+"],["*","-","+","+","+","-"],["*","-","+","+","-","*"],["*","-","+","+","-","+"],["*","-","+","+","-","-"],["*","-","+","-","*","*"],["*","-","+","-","*","+"],["*","-","+","-","*","-"],["*","-","+","-","+","*"],["*","-","+","-","+","+"],["*","-","+","-","+","-"],["*","-","+","-","-","*"],["*","-","+","-","-","+"],["*","-","+","-","-","-"],["*","-","-","*","*","*"],["*","-","-","*","*","+"],["*","-","-","*","*","-"],["*","-","-","*","+","*"],["*","-","-","*","+","+"],["*","-","-","*","+","-"],["*","-","-","*","-","*"],["*","-","-","*","-","+"],["*","-","-","*","-","-"],["*","-","-","+","*","*"],["*","-","-","+","*","+"],["*","-","-","+","*","-"],["*","-","-","+","+","*"],["*","-","-","+","+","+"],["*","-","-","+","+","-"],["*","-","-","+","-","*"],["*","-","-","+","-","+"],["*","-","-","+","-","-"],["*","-","-","-","*","*"],["*","-","-","-","*","+"],["*","-","-","-","*","-"],["*","-","-","-","+","*"],["*","-","-","-","+","+"],["*","-","-","-","+","-"],["*","-","-","-","-","*"],["*","-","-","-","-","+"],["*","-","-","-","-","-"],["+","*","*","*","*","*"],["+","*","*","*","*","+"],["+","*","*","*","*","-"],["+","*","*","*","+","*"],["+","*","*","*","+","+"],["+","*","*","*","+","-"],["+","*","*","*","-","*"],["+","*","*","*","-","+"],["+","*","*","*","-","-"],["+","*","*","+","*","*"],["+","*","*","+","*","+"],["+","*","*","+","*","-"],["+","*","*","+","+","*"],["+","*","*","+","+","+"],["+","*","*","+","+","-"],["+","*","*","+","-","*"],["+","*","*","+","-","+"],["+","*","*","+","-","-"],["+","*","*","-","*","*"],["+","*","*","-","*","+"],["+","*","*","-","*","-"],["+","*","*","-","+","*"],["+","*","*","-","+","+"],["+","*","*","-","+","-"],["+","*","*","-","-","*"],["+","*","*","-","-","+"],["+","*","*","-","-","-"],["+","*","+","*","*","*"],["+","*","+","*","*","+"],["+","*","+","*","*","-"],["+","*","+","*","+","*"],["+","*","+","*","+","+"],["+","*","+","*","+","-"],["+","*","+","*","-","*"],["+","*","+","*","-","+"],["+","*","+","*","-","-"],["+","*","+","+","*","*"],["+","*","+","+","*","+"],["+","*","+","+","*","-"],["+","*","+","+","+","*"],["+","*","+","+","+","+"],["+","*","+","+","+","-"],["+","*","+","+","-","*"],["+","*","+","+","-","+"],["+","*","+","+","-","-"],["+","*","+","-","*","*"],["+","*","+","-","*","+"],["+","*","+","-","*","-"],["+","*","+","-","+","*"],["+","*","+","-","+","+"],["+","*","+","-","+","-"],["+","*","+","-","-","*"],["+","*","+","-","-","+"],["+","*","+","-","-","-"],["+","*","-","*","*","*"],["+","*","-","*","*","+"],["+","*","-","*","*","-"],["+","*","-","*","+","*"],["+","*","-","*","+","+"],["+","*","-","*","+","-"],["+","*","-","*","-","*"],["+","*","-","*","-","+"],["+","*","-","*","-","-"],["+","*","-","+","*","*"],["+","*","-","+","*","+"],["+","*","-","+","*","-"],["+","*","-","+","+","*"],["+","*","-","+","+","+"],["+","*","-","+","+","-"],["+","*","-","+","-","*"],["+","*","-","+","-","+"],["+","*","-","+","-","-"],["+","*","-","-","*","*"],["+","*","-","-","*","+"],["+","*","-","-","*","-"],["+","*","-","-","+","*"],["+","*","-","-","+","+"],["+","*","-","-","+","-"],["+","*","-","-","-","*"],["+","*","-","-","-","+"],["+","*","-","-","-","-"],["+","+","*","*","*","*"],["+","+","*","*","*","+"],["+","+","*","*","*","-"],["+","+","*","*","+","*"],["+","+","*","*","+","+"],["+","+","*","*","+","-"],["+","+","*","*","-","*"],["+","+","*","*","-","+"],["+","+","*","*","-","-"],["+","+","*","+","*","*"],["+","+","*","+","*","+"],["+","+","*","+","*","-"],["+","+","*","+","+","*"],["+","+","*","+","+","+"],["+","+","*","+","+","-"],["+","+","*","+","-","*"],["+","+","*","+","-","+"],["+","+","*","+","-","-"],["+","+","*","-","*","*"],["+","+","*","-","*","+"],["+","+","*","-","*","-"],["+","+","*","-","+","*"],["+","+","*","-","+","+"],["+","+","*","-","+","-"],["+","+","*","-","-","*"],["+","+","*","-","-","+"],["+","+","*","-","-","-"],["+","+","+","*","*","*"],["+","+","+","*","*","+"],["+","+","+","*","*","-"],["+","+","+","*","+","*"],["+","+","+","*","+","+"],["+","+","+","*","+","-"],["+","+","+","*","-","*"],["+","+","+","*","-","+"],["+","+","+","*","-","-"],["+","+","+","+","*","*"],["+","+","+","+","*","+"],["+","+","+","+","*","-"],["+","+","+","+","+","*"],["+","+","+","+","+","+"],["+","+","+","+","+","-"],["+","+","+","+","-","*"],["+","+","+","+","-","+"],["+","+","+","+","-","-"],["+","+","+","-","*","*"],["+","+","+","-","*","+"],["+","+","+","-","*","-"],["+","+","+","-","+","*"],["+","+","+","-","+","+"],["+","+","+","-","+","-"],["+","+","+","-","-","*"],["+","+","+","-","-","+"],["+","+","+","-","-","-"],["+","+","-","*","*","*"],["+","+","-","*","*","+"],["+","+","-","*","*","-"],["+","+","-","*","+","*"],["+","+","-","*","+","+"],["+","+","-","*","+","-"],["+","+","-","*","-","*"],["+","+","-","*","-","+"],["+","+","-","*","-","-"],["+","+","-","+","*","*"],["+","+","-","+","*","+"],["+","+","-","+","*","-"],["+","+","-","+","+","*"],["+","+","-","+","+","+"],["+","+","-","+","+","-"],["+","+","-","+","-","*"],["+","+","-","+","-","+"],["+","+","-","+","-","-"],["+","+","-","-","*","*"],["+","+","-","-","*","+"],["+","+","-","-","*","-"],["+","+","-","-","+","*"],["+","+","-","-","+","+"],["+","+","-","-","+","-"],["+","+","-","-","-","*"],["+","+","-","-","-","+"],["+","+","-","-","-","-"],["+","-","*","*","*","*"],["+","-","*","*","*","+"],["+","-","*","*","*","-"],["+","-","*","*","+","*"],["+","-","*","*","+","+"],["+","-","*","*","+","-"],["+","-","*","*","-","*"],["+","-","*","*","-","+"],["+","-","*","*","-","-"],["+","-","*","+","*","*"],["+","-","*","+","*","+"],["+","-","*","+","*","-"],["+","-","*","+","+","*"],["+","-","*","+","+","+"],["+","-","*","+","+","-"],["+","-","*","+","-","*"],["+","-","*","+","-","+"],["+","-","*","+","-","-"],["+","-","*","-","*","*"],["+","-","*","-","*","+"],["+","-","*","-","*","-"],["+","-","*","-","+","*"],["+","-","*","-","+","+"],["+","-","*","-","+","-"],["+","-","*","-","-","*"],["+","-","*","-","-","+"],["+","-","*","-","-","-"],["+","-","+","*","*","*"],["+","-","+","*","*","+"],["+","-","+","*","*","-"],["+","-","+","*","+","*"],["+","-","+","*","+","+"],["+","-","+","*","+","-"],["+","-","+","*","-","*"],["+","-","+","*","-","+"],["+","-","+","*","-","-"],["+","-","+","+","*","*"],["+","-","+","+","*","+"],["+","-","+","+","*","-"],["+","-","+","+","+","*"],["+","-","+","+","+","+"],["+","-","+","+","+","-"],["+","-","+","+","-","*"],["+","-","+","+","-","+"],["+","-","+","+","-","-"],["+","-","+","-","*","*"],["+","-","+","-","*","+"],["+","-","+","-","*","-"],["+","-","+","-","+","*"],["+","-","+","-","+","+"],["+","-","+","-","+","-"],["+","-","+","-","-","*"],["+","-","+","-","-","+"],["+","-","+","-","-","-"],["+","-","-","*","*","*"],["+","-","-","*","*","+"],["+","-","-","*","*","-"],["+","-","-","*","+","*"],["+","-","-","*","+","+"],["+","-","-","*","+","-"],["+","-","-","*","-","*"],["+","-","-","*","-","+"],["+","-","-","*","-","-"],["+","-","-","+","*","*"],["+","-","-","+","*","+"],["+","-","-","+","*","-"],["+","-","-","+","+","*"],["+","-","-","+","+","+"],["+","-","-","+","+","-"],["+","-","-","+","-","*"],["+","-","-","+","-","+"],["+","-","-","+","-","-"],["+","-","-","-","*","*"],["+","-","-","-","*","+"],["+","-","-","-","*","-"],["+","-","-","-","+","*"],["+","-","-","-","+","+"],["+","-","-","-","+","-"],["+","-","-","-","-","*"],["+","-","-","-","-","+"],["+","-","-","-","-","-"],["-","*","*","*","*","*"],["-","*","*","*","*","+"],["-","*","*","*","*","-"],["-","*","*","*","+","*"],["-","*","*","*","+","+"],["-","*","*","*","+","-"],["-","*","*","*","-","*"],["-","*","*","*","-","+"],["-","*","*","*","-","-"],["-","*","*","+","*","*"],["-","*","*","+","*","+"],["-","*","*","+","*","-"],["-","*","*","+","+","*"],["-","*","*","+","+","+"],["-","*","*","+","+","-"],["-","*","*","+","-","*"],["-","*","*","+","-","+"],["-","*","*","+","-","-"],["-","*","*","-","*","*"],["-","*","*","-","*","+"],["-","*","*","-","*","-"],["-","*","*","-","+","*"],["-","*","*","-","+","+"],["-","*","*","-","+","-"],["-","*","*","-","-","*"],["-","*","*","-","-","+"],["-","*","*","-","-","-"],["-","*","+","*","*","*"],["-","*","+","*","*","+"],["-","*","+","*","*","-"],["-","*","+","*","+","*"],["-","*","+","*","+","+"],["-","*","+","*","+","-"],["-","*","+","*","-","*"],["-","*","+","*","-","+"],["-","*","+","*","-","-"],["-","*","+","+","*","*"],["-","*","+","+","*","+"],["-","*","+","+","*","-"],["-","*","+","+","+","*"],["-","*","+","+","+","+"],["-","*","+","+","+","-"],["-","*","+","+","-","*"],["-","*","+","+","-","+"],["-","*","+","+","-","-"],["-","*","+","-","*","*"],["-","*","+","-","*","+"],["-","*","+","-","*","-"],["-","*","+","-","+","*"],["-","*","+","-","+","+"],["-","*","+","-","+","-"],["-","*","+","-","-","*"],["-","*","+","-","-","+"],["-","*","+","-","-","-"],["-","*","-","*","*","*"],["-","*","-","*","*","+"],["-","*","-","*","*","-"],["-","*","-","*","+","*"],["-","*","-","*","+","+"],["-","*","-","*","+","-"],["-","*","-","*","-","*"],["-","*","-","*","-","+"],["-","*","-","*","-","-"],["-","*","-","+","*","*"],["-","*","-","+","*","+"],["-","*","-","+","*","-"],["-","*","-","+","+","*"],["-","*","-","+","+","+"],["-","*","-","+","+","-"],["-","*","-","+","-","*"],["-","*","-","+","-","+"],["-","*","-","+","-","-"],["-","*","-","-","*","*"],["-","*","-","-","*","+"],["-","*","-","-","*","-"],["-","*","-","-","+","*"],["-","*","-","-","+","+"],["-","*","-","-","+","-"],["-","*","-","-","-","*"],["-","*","-","-","-","+"],["-","*","-","-","-","-"],["-","+","*","*","*","*"],["-","+","*","*","*","+"],["-","+","*","*","*","-"],["-","+","*","*","+","*"],["-","+","*","*","+","+"],["-","+","*","*","+","-"],["-","+","*","*","-","*"],["-","+","*","*","-","+"],["-","+","*","*","-","-"],["-","+","*","+","*","*"],["-","+","*","+","*","+"],["-","+","*","+","*","-"],["-","+","*","+","+","*"],["-","+","*","+","+","+"],["-","+","*","+","+","-"],["-","+","*","+","-","*"],["-","+","*","+","-","+"],["-","+","*","+","-","-"],["-","+","*","-","*","*"],["-","+","*","-","*","+"],["-","+","*","-","*","-"],["-","+","*","-","+","*"],["-","+","*","-","+","+"],["-","+","*","-","+","-"],["-","+","*","-","-","*"],["-","+","*","-","-","+"],["-","+","*","-","-","-"],["-","+","+","*","*","*"],["-","+","+","*","*","+"],["-","+","+","*","*","-"],["-","+","+","*","+","*"],["-","+","+","*","+","+"],["-","+","+","*","+","-"],["-","+","+","*","-","*"],["-","+","+","*","-","+"],["-","+","+","*","-","-"],["-","+","+","+","*","*"],["-","+","+","+","*","+"],["-","+","+","+","*","-"],["-","+","+","+","+","*"],["-","+","+","+","+","+"],["-","+","+","+","+","-"],["-","+","+","+","-","*"],["-","+","+","+","-","+"],["-","+","+","+","-","-"],["-","+","+","-","*","*"],["-","+","+","-","*","+"],["-","+","+","-","*","-"],["-","+","+","-","+","*"],["-","+","+","-","+","+"],["-","+","+","-","+","-"],["-","+","+","-","-","*"],["-","+","+","-","-","+"],["-","+","+","-","-","-"],["-","+","-","*","*","*"],["-","+","-","*","*","+"],["-","+","-","*","*","-"],["-","+","-","*","+","*"],["-","+","-","*","+","+"],["-","+","-","*","+","-"],["-","+","-","*","-","*"],["-","+","-","*","-","+"],["-","+","-","*","-","-"],["-","+","-","+","*","*"],["-","+","-","+","*","+"],["-","+","-","+","*","-"],["-","+","-","+","+","*"],["-","+","-","+","+","+"],["-","+","-","+","+","-"],["-","+","-","+","-","*"],["-","+","-","+","-","+"],["-","+","-","+","-","-"],["-","+","-","-","*","*"],["-","+","-","-","*","+"],["-","+","-","-","*","-"],["-","+","-","-","+","*"],["-","+","-","-","+","+"],["-","+","-","-","+","-"],["-","+","-","-","-","*"],["-","+","-","-","-","+"],["-","+","-","-","-","-"],["-","-","*","*","*","*"],["-","-","*","*","*","+"],["-","-","*","*","*","-"],["-","-","*","*","+","*"],["-","-","*","*","+","+"],["-","-","*","*","+","-"],["-","-","*","*","-","*"],["-","-","*","*","-","+"],["-","-","*","*","-","-"],["-","-","*","+","*","*"],["-","-","*","+","*","+"],["-","-","*","+","*","-"],["-","-","*","+","+","*"],["-","-","*","+","+","+"],["-","-","*","+","+","-"],["-","-","*","+","-","*"],["-","-","*","+","-","+"],["-","-","*","+","-","-"],["-","-","*","-","*","*"],["-","-","*","-","*","+"],["-","-","*","-","*","-"],["-","-","*","-","+","*"],["-","-","*","-","+","+"],["-","-","*","-","+","-"],["-","-","*","-","-","*"],["-","-","*","-","-","+"],["-","-","*","-","-","-"],["-","-","+","*","*","*"],["-","-","+","*","*","+"],["-","-","+","*","*","-"],["-","-","+","*","+","*"],["-","-","+","*","+","+"],["-","-","+","*","+","-"],["-","-","+","*","-","*"],["-","-","+","*","-","+"],["-","-","+","*","-","-"],["-","-","+","+","*","*"],["-","-","+","+","*","+"],["-","-","+","+","*","-"],["-","-","+","+","+","*"],["-","-","+","+","+","+"],["-","-","+","+","+","-"],["-","-","+","+","-","*"],["-","-","+","+","-","+"],["-","-","+","+","-","-"],["-","-","+","-","*","*"],["-","-","+","-","*","+"],["-","-","+","-","*","-"],["-","-","+","-","+","*"],["-","-","+","-","+","+"],["-","-","+","-","+","-"],["-","-","+","-","-","*"],["-","-","+","-","-","+"],["-","-","+","-","-","-"],["-","-","-","*","*","*"],["-","-","-","*","*","+"],["-","-","-","*","*","-"],["-","-","-","*","+","*"],["-","-","-","*","+","+"],["-","-","-","*","+","-"],["-","-","-","*","-","*"],["-","-","-","*","-","+"],["-","-","-","*","-","-"],["-","-","-","+","*","*"],["-","-","-","+","*","+"],["-","-","-","+","*","-"],["-","-","-","+","+","*"],["-","-","-","+","+","+"],["-","-","-","+","+","-"],["-","-","-","+","-","*"],["-","-","-","+","-","+"],["-","-","-","+","-","-"],["-","-","-","-","*","*"],["-","-","-","-","*","+"],["-","-","-","-","*","-"],["-","-","-","-","+","*"],["-","-","-","-","+","+"],["-","-","-","-","+","-"],["-","-","-","-","-","*"],["-","-","-","-","-","+"],["-","-","-","-","-","-"]]]] -- cgit