diff --git a/2023/12/code.go b/2023/12/code.go index c02ee4a..2039c05 100644 --- a/2023/12/code.go +++ b/2023/12/code.go @@ -1,7 +1,6 @@ package main import ( - "fmt" "strconv" "strings" @@ -37,82 +36,87 @@ func run(part2 bool, input string) any { ci, _ := strconv.Atoi(c) combo = append(combo, ci) } - springs := make([]rune, 0) - for _, r := range strings.Split(spl[0], "") { - springs = append(springs, rune(r[0])) - } - p := iteratePossibilities(spl[0]+".", combo, 0) - sum += p + //fmt.Printf("\nLooking in %v %v\n", spl[0], combo) + poss := iteratePossibilities(spl[0], combo) + + //fmt.Printf("In %v %v: %v\n", spl[0], combo, poss) + + sum += poss } return sum } -func iteratePossibilities(springs string, combo []int, depth int) int { +func iteratePossibilities(springs string, combo []int) int { if len(combo) == 0 { - panic("Can't try find possibilities with empty combo list") + panic("Combo is empty") } - sprlen := combo[0] + 1 - print(fmt.Sprintf("%v:", springs), depth) - if len(springs) < sprlen { - // Can't fit, bad match - print(fmt.Sprintf("Cannot fit combo len %v in remaining springs %v", sprlen, springs), depth) + lenMatch := combo[0] + + if len(springs) < lenMatch { + // Cannot match, not enough space return 0 } p := 0 - for i := 0; i <= len(springs)-sprlen; i++ { + for i := 0; i < len(springs)-lenMatch+1; i++ { match := true - forcedMatch := true - checking := springs[i : i+sprlen] - print(fmt.Sprintf("Testing %v in %v", checking, springs), depth) + forceMatch := false + for m := i; m < i+lenMatch; m++ { + if rune(springs[m]) == '.' { + match = false + } - for c, r := range checking { - if rune(r) == '#' { - if c == sprlen-1 { - print("Failed match: ends with damaged (would be non-contiguous)", depth) - match = false - } - } else if rune(r) == '.' { - if c != sprlen-1 { - print("Failed match: contained undamaged", depth) - match = false - } - } else { - if c != sprlen-1 { - print(fmt.Sprintf("NOT forced match at %v", c), depth) - forcedMatch = false - } + if rune(springs[m]) == '#' && i == m { + forceMatch = true } } - if match { - print(fmt.Sprintf("Found %v+1 match (forced=%v) in %v at %v-%v (%v) (remaining: %v)", combo[0], forcedMatch, springs, i, i+sprlen-1, springs[i:i+sprlen], combo[1:]), depth) - - if len(combo) > 1 { - p += iteratePossibilities(springs[i+sprlen:], combo[1:], depth+1) - } else { - p += 1 - } - - if forcedMatch { - print("Forced match, not trying any other combos for this", depth) + if !match { + // Keep trying + if forceMatch { break } + continue + } + + matchFrom := i + lenMatch + if len(springs) > i+lenMatch { + if rune(springs[i+lenMatch]) == '#' { + // Would be contigious, does not work + if forceMatch { + break + } + continue + } + matchFrom += 1 + } + + // Cool! We are matched! + if len(combo) == 1 { + // Check, finally, that there are no possible # in the future (which would violate the requirements) + anyFuture := false + for j := matchFrom; j < len(springs); j++ { + if rune(springs[j]) == '#' { + anyFuture = true + } + } + + if !anyFuture { + //fmt.Printf("MATCHED %v in %v from [%v;%v)\n", lenMatch, springs, i, i+lenMatch-1) + p += 1 + } + } else { + //fmt.Printf("Matched %v in %v from [%v;%v)\n", lenMatch, springs, i, i+lenMatch-1) + p += iteratePossibilities(springs[matchFrom:], combo[1:]) + } + + if forceMatch { + break } } return p } - -func print(pr string, depth int) { - print := false - if print { - for i := 0; i < depth; i++ { - fmt.Printf("> ") - } - fmt.Println(pr) - } -} diff --git a/2023/12/input-example.txt b/2023/12/input-example.txt index e925935..7406e1b 100755 --- a/2023/12/input-example.txt +++ b/2023/12/input-example.txt @@ -4,3 +4,6 @@ ????.#...#... 4,1,1 ????.######..#####. 1,6,5 ?###???????? 3,2,1 +???#???????? 3,2,1 +???#??#???????? 3,2,1 + diff --git a/2023/12/input-user.txt b/2023/12/input-user.txt new file mode 100644 index 0000000..fe71c3a --- /dev/null +++ b/2023/12/input-user.txt @@ -0,0 +1,1000 @@ +??#??#????## 2,7 +..?##????????.?#?.? 10,2 +#??.???..? 1,1,1 +#??.#??.??#?#????#?# 2,1,6,3 +?.#??.????..?.??? 1,2 +#???##?.???#? 2,3,5 +?##??#????.??. 2,3,2 +??.#??#?????##? 2,1,3,4 +?#????#?#.. 2,1,3 +?#???#???##?#??? 2,11 +#?##??.#??#?? 6,2,1 +#.?#????#?#.?? 1,2,5,2 +????#?#?#???? 1,6,1,1 +.?????.??? 2,1 +????????.?#.??? 5,1,1,1 +????..???????.??? 1,1 +?#???#??#??.????.# 11,1,1,1 +???.#?.???#? 2,2,2 +???.???.????##? 1,5 +??#?#???.#??????#??? 1,5,3,3 +???.???.????. 1,2,1,1 +????#?...????. 4,1 +?.????#??#? 1,7 +.?#?.?.##?.?????? 1,3,2,2 +????.?????##?.# 3,8,1 +????#..????? 1,1,3 +.?#???.#????. 1,2,1,2 +????.??###.#??.??? 1,1,4,3,1 +?????????? 1,1,1 +?#.??#...???? 2,1,1 +?#????#?????? 7,3 +?????.#####??? 1,6 +?..?##.#?????? 1,2,4 +#??#?#???????????#? 1,4,1,4,1,1 +??#??###.???#??. 3,3,3 +??????.?#??.?? 3,2 +?#???#??#??..?# 6,1,2 +#.??.??##?????#?? 1,1,10 +.?#???#?.? 2,4 +???..????## 2,1,2 +??????????????? 1,3,1 +??##???????### 1,6,4 +?#??????.??? 2,1 +??#??????#???? 5,2,2 +?#.??#???#?? 2,2,1,1 +??#?????#???????. 2,1,1,4 +?#?##??#?.. 4,3 +##?????#??.??? 9,1,1 +??.?...????#???#? 2,9 +?????????.? 3,1 +.???.??#?.????? 2,4,1 +#?##.?#?#????? 4,1,6 +????#??#?#??? 1,8 +.??.?.###?????? 1,7 +??##????#. 4,1,2 +???#?.???. 2,1 +.?##?##?#?.?#????# 7,3,3 +#????..####??.#? 2,1,4,1,1 +#..#?#?????#??? 1,9 +#.??????.?#??#..???# 1,6,1,1,1,1 +???????##?#???#.??? 1,1,5,2,2 +?#????.???#? 5,3 +#.?#?##??????#?#?? 1,14 +.????..?.#???#. 1,1,1,2,1 +?#????#???.#????? 8,1,2 +????#?.??#??????. 1,3,7 +??.??.?.???? 1,1,1,1 +??#????..??? 2,1,1,2 +?.??#??#??#?.?.???# 10,2 +.?#.??#??.? 1,5 +?.##????????##?? 4,1,3 +.?.??##?#??? 1,6 +?????#.??? 1,1,1 +.#?#???#???? 4,3,1 +????#??.??????? 1,3,1,1,1 +???#?.??#?##?# 3,7 +?#?#?#???????? 8,1 +??.?#????? 1,2 +?#???#????.??????? 1,1,3,1,1,1 +##???.???.? 3,3 +####???????.???? 4,3,1 +??#?##??????? 6,3 +?..??????? 3,2 +.?#??###????#? 8,3 +##?###????? 8,1 +?.?#?????###??.??#?? 10,1 +??????#?????? 3,1,1,1 +.#???#?#?.?????? 1,5,1,2,1 +???.#???#.??#?#?. 1,2,2,5 +..???#????### 1,2,4 +????#???#????. 1,7,1 +??????#????#.? 3,7,1 +???#???????#?...? 4,5,1 +#????????##?# 1,3,4 +?.#???.???#??. 3,4 +.???????.??????.? 4,2,1,3 +.?.??.???? 2,2 +.???.??????###?#. 3,10 +????..?????## 2,1,2,4 +#?.???#??.??? 1,4,1 +?????..???? 1,4 +??????#.????????? 3,1,8 +????#??????? 5,1,1,1 +????#?#??#????? 1,4,1,2,1 +?#?.???#???.? 2,6,1 +?.???#??.?#. 1,1,1,1 +??.#.#.??????#???? 1,1,1,10 +.##?.?????.. 2,2,1 +???#?#??#??#??#? 5,1,1,1 +?#.?.????????????#? 1,1,10 +??#?????.. 3,1 +?#.?#?#?????.?????? 1,2,3,1,4,1 +?#???..#?.??#?#. 2,1,2,1,1 +.????#????.?#?????# 7,1,3 +..###??#???#???.??? 10,1,1 +??????##?.?#?#.#??# 4,3,2,1,2,1 +?.???####.?#?? 4,2 +?#.???#???#??##?#?? 1,15 +?.?##?#?#? 5,2 +?#???#?#??????##??? 9,3 +.??????????.??. 6,3,1 +???????.#? 1,2,1 +????#?#??#?#.. 5,6 +?????.?.?#????? 2,1,5 +????..??#?#?#??.???? 3,8 +#???.?.??????. 1,2,1,2 +?????????.???????.?. 1,2,3,4,1 +????????##???? 1,7 +?.??#.?#??#? 1,1,5 +#??????#?##??? 3,9 +???#??.?.#?#??### 4,8 +?.##??##?#??? 2,7 +.?.#?#?????.#?#??.? 1,8,1,1,1,1 +?.???#.?????? 2,2 +.#.??##???.#??.??. 1,5,3,1 +??#???##?? 1,1,4 +??????#??##?#. 2,8,1 +????#?????.???.?.? 6,1,3 +.?.#.?##.??.????#? 1,1,2,2,2,2 +.??#?.???? 4,1,1 +?.?#?##??##?#??.?? 2,8,1,1 +#???##???.??. 1,2,1,1 +?#???##??.??#??? 3,3,5 +.???#??#??? 1,5,1 +?#.?????#???. 2,7 +?.???#????????.?. 1,1,1,4,1 +??#??#.??#??? 4,1,2 +???#.????#???##???? 2,12 +..??????.??#??#?? 2,6 +??#?.?#?#???..??#?? 3,4,1,1,2 +?#????.#?????#?. 2,3,3,3 +?????#????.? 2,3,1 +.?.?????.?.##.? 5,2 +.???.???.???#?? 1,2,3 +.????.?#?#???.??. 1,7,2 +???#???#??????.. 1,9,1 +.#???#?.?? 1,2 +##?#??#?##??????#??# 2,7,8 +?.?????#????##??.?? 1,8,2,1 +??????#.##??##?##?## 3,1,9,2 +???#?#?#???#? 1,7,1 +???#????.?????? 6,1,1 +?.##?#.?#?.?. 1,2,1,2 +.????.?..?????? 1,2,1,3,1 +?.??????.. 1,1 +.?????.?#??. 1,4 +???.??????... 2,1 +?#?#?#?#.?..#..??? 6,1,1,1,1,1 +.??..?#???? 2,1,1 +??#?????????#?..??? 10,2,1 +?.???.?.?.?.#? 1,2,1,2 +#?.?#?.?#???.??????# 2,2,2,1,2,2 +????..??####???#?? 4,1,10 +.????..??#?? 1,3 +.#??#?#?.?.##. 6,2 +??#?#..?.??#?#??# 2,1,1,5,1 +??##??#??###??..??? 3,7,1,1 +????.#.???..??. 1,1,1,1,2 +#?.??..??. 1,1,1 +.#??????#?.????? 1,5,3,1 +?.???#?..??#??? 4,4 +?????##?#..#???#?? 7,1,1,1,1,1 +?????????? 5,2 +????.????.?#?.. 1,1,3 +????????????#????#? 4,2,5,4 +???#???.??##? 1,1,1,5 +?##????????#????##?. 2,7,3 +???..??#?? 2,3 +#.?#?.???..?? 1,3,3,1 +.????????? 2,1,1 +???????????##? 6,1,2 +?..#????#?? 2,3 +????.??..#? 3,1,2 +.#.?????#.?#?? 1,2,1,3 +????????.?# 7,1 +?????#?#??##??#???? 15,2 +?#.??.?????#?? 1,1,7 +??????#????#?#????? 8,1,7 +#..????#???. 1,4,1 +##??#.??????. 2,1,2,2 +.????.#?#####?. 1,1,7 +#????#???..?????? 9,4 +???#??.#?.# 3,1,1 +.?#?#.?..???? 4,2 +??...??.?#?##??? 1,2,8 +?.??#?????..???.?.? 5,1,1 +?.?##??.?#?##????# 5,5,3 +??#?????##??????? 9,1 +???#????#? 1,2,2 +?.?????????#?#?.?#? 1,3,7,2 +???.?#??##?#?? 1,1,5,2 +?????.#.?? 3,1,1 +?#???#???..??.##??? 2,6,1,5 +#??#????????? 2,1,3,1 +.#??.?.??.?#. 2,2,1 +.???#???????#??##??? 12,2,2 +##?#?#???###???????? 13,1,1,1 +.?#.??##?????.? 1,3,2,1 +#????.???#????. 1,1,3,2 +##????????? 2,1,2 +?#?..?#????.??? 3,6 +.?..??.??#??#?#? 1,1,7 +?????????.???.? 1,1,1,2,1 +??.????#.???? 1,1,1,2 +###?##.??? 6,2 +.?#####???????.#??? 5,6,4 +.???.??????????? 1,2,1,1,2 +?????#?#?#.??#??? 6,1,1,2,1 +??.??#???.. 2,1,1 +#..?.?.##??. 1,1,3 +?##???.?.? 4,1,1 +????????##??????.??# 1,10,1,1,1 +???#.???.?????? 1,2,1,2,2 +????????????.????#? 1,3,3 +.?.?????..?#?? 1,1,1,3 +?..???##????##? 1,9 +.??????#??? 1,2,5 +.#?????.?..#???## 1,3,1,1,3 +#????.???.? 5,1,1 +.?#.?????#??##??? 1,12 +???.?#???.?#?? 2,4,4 +?.?.??????.?????#?? 1,5,8 +???##?#?#?.#. 4,4,1 +.#.???.????#????? 1,6 +??#?##???#??.????? 9,2 +?.?.###??##?#?? 1,11 +???.?.???.? 1,1,2 +.?#?????#? 3,2 +?.??#??#???#?#?## 8,6 +???###.?????????? 4,6,1 +?.???#???#?## 1,2,2,4 +??##??????..???#?? 1,3,3,1,1 +.??.#?????#???..?? 1,9,1 +...??????? 2,1 +???.?###??.????? 3,3,1,1,1 +??.?#?..???#????. 2,1,1,3,1 +??????..#???.#. 1,4,2,1,1 +?.??##?#???##?..???. 11,3 +???##?.?##??? 5,4 +????.??#?????? 3,7 +#??#..?#???#?.? 1,1,2,3,1 +????##?#???.?#?# 2,6,4 +?#???.##????.? 3,6 +.?#????.#????.?.#? 4,1,1,1,2 +.??##?#.????#.. 6,3 +.#?#??..?? 3,1 +#.?.??..??.?? 1,2,1,1 +.?????????#???#????? 1,10 +?#.#..#?#?#?#????#?? 2,1,3,1,8 +??????#????# 6,3 +??????..#??#?. 1,1,3 +?.??#.??????#?. 1,1,3,1,2 +???..##.??##?.????? 1,2,5,2 +??????..???# 2,2,1 +?????#?.????..?#??#? 4,3,2,3 +.??#??????????#??? 11,2,1 +??.??..?????.?? 1,1,5,1 +#?###?.????????##?? 1,4,9 +.?#?#???#??.# 9,1 +?????#.??#??#. 1,3,3,1 +????#???#??#?.?????. 6,1,2,5 +????????.##?# 1,1,2,1 +??#?##??????? 8,2 +???.???#?#????#??. 1,1,6,2,1 +#??.#??????#? 2,1,3,1 +.###??.??.? 4,2 +?????.??#. 3,1 +??????.#..?# 4,1,1,1 +?.#??#?.??##?##???? 4,8 +??????#?#???? 2,6,1 +???..###???..??????? 1,1,4,1,2,1 +??..?.???#?? 1,1,1,3 +.??#?#????.?.#??#??? 3,1,5 +??????.??? 1,1,3 +#?.???#??.??#?. 2,5,3 +??#??##??.? 6,1 +?#?????????#?? 1,10 +.????#.??? 4,1 +.?###?..?#?#??? 5,5,1 +??#??#.?#????.?. 1,1,1,3,1 +.???#???#???????? 1,9,1 +???..?????? 1,2 +??#?.#??##?. 3,2,2 +?#?#????.?? 4,2 +??#????.##??? 6,4 +???#.??.?#?###?.#?? 2,1,6,3 +???.?#?##?.? 1,5 +?#.?##?.?? 1,4 +????###??? 1,4 +???##????#?# 1,3,1,3 +##???????? 6,2 +????#??.####?.? 2,2,1,4,1 +#.??#????#???.???? 1,11,1,1 +?#??????.? 1,1,1 +#..?.?#?.??###??.? 1,1,3,5,1,1 +???.??#??#?#?##?? 1,12 +??????#??#?##?? 1,2,7 +???#???.??.???#? 4,1,5 +?????#?????#.?#?#??? 3,1,1,2,5 +#??.????#? 3,1,3 +???????????...# 8,1 +#??#.#.?..????.? 1,1,1,1,4 +?#????.??.?. 1,1,2,1 +?.??##?.?.???#????.. 5,5 +?#??#????.##.## 2,2,2,2,2 +?.#????.?? 2,1,1 +.#??????????? 1,6 +??#.??.#????.??#.??. 2,2,1,1,3,2 +??#?#??.??#??? 5,1,2 +???#?#??.???.??? 6,2,1 +.??#????...?????#.? 6,1,2,1 +??.???????.?#??? 2,2,1,4 +.?.??????? 1,1,1 +.????..??#?#? 2,5 +?.?#?##.???.?#??# 1,5,2,1,1 +.#??#?.??#?#??.?#??? 2,1,1,5,2,1 +?.#??..????#?????#.? 2,10 +???#???.?#.???????? 6,1,1,3 +?.??#?###??.??##???? 1,8,4,1,1 +?????#.??##? 1,2,1,2 +..??.##.?.???# 1,2,3 +??#?.????#???????? 2,10 +?#??????#??.????? 7,1,1,1 +#???.?#?.???.??#?? 1,1,2,1,1,5 +??##????.#.#?.#?. 6,1,1,1 +?#???#??????????.?.? 1,11,1 +??#????#???#???. 3,1,8 +?#???????.#??? 2,1,2,1 +?.#???????.?? 1,1,2 +???.????#????#???#? 3,1,4,4,2 +????.#??##???#?.### 1,1,6,2,3 +??????.?#?#?#?? 2,1,8 +.??????.#? 3,1 +#??????.????#.????? 1,1,1,2,1,4 +???????????????.??# 1,1,7,2 +#??.????#?#??.??#?#? 1,7,6 +??#?????????## 5,4 +????.??#?.. 1,2,4 +#?#??.#?#.?? 1,2,3,2 +..?#?#?.?#??????#?? 3,1,7 +.?????#??###..?#?? 1,6,3 +?.#?#????.????###. 1,5,1,1,1,3 +?????####?##?.#.??? 10,1,1 +.?##???###???. 3,1,6 +.??#.?.???.?.?.?? 1,2,1,1 +?#????.???.?? 6,1,1 +??#.?????#? 1,1,2 +.??#?.?.#????? 3,1,1,1 +??.?????????# 1,3,1,1 +?#.#?????.?????? 2,1,1,5 +.????#??..????#? 1,1,3,4 +?????..#?.#??# 4,1,4 +??.????##?..?#?? 1,2,3,2 +???##??.#?##???? 1,2,1,5,2 +??#???????#???#? 4,8 +#?#??#.???????#?. 4,1,2,1,2 +?????#?#??.??.??? 1,5,2,2 +?#???#???.? 1,2,1 +????.?##??#???#??##? 3,7,5 +#?????#?.#? 1,3,2 +.??#?####?##?#??? 11,1,1 +####??#.###.??.?? 4,2,3,2,1 +#???.??#?#??# 1,1,5,1 +?##.?????. 3,2 +.?.????????#? 1,2,2,3 +??????#??.??#?#?.? 8,5 +??.?...?..?.??.?.?.? 1,1 +.#??.???#.?#?#?? 2,1,1,6 +?.#??##??#???????? 1,1,2,4,1,1 +##?.?.##??????#??.?? 2,10 +.?????##????.?.??#? 1,6,1,1,2 +.##??#?#??##?#??? 2,8,2 +??.?#.??#?.???#??? 1,2,2,5 +?????.?????????#?.? 1,1,3,2,2,1 +.#?##???##??.?.# 9,1,1 +??????#???????? 7,2 +#?????.?????#?. 1,2,1,1,1 +?.#?????????#.#?# 1,1,4,1,3 +?.??#??#??#??#.. 1,2,2,1,2 +??.##??????#?????. 1,2,2,1,1,4 +#?.?????#?.?##?? 1,2,2,5 +.?#?#?#?.?.# 6,1 +#.????#?#??# 1,6,2 +??.??????? 1,2 +???#?.?..??.??#????. 2,2,4 +??????#??????? 2,2,4,1 +?.????#?..???? 5,1 +???..????.?????? 3,1,3 +???.???#??. 1,1 +?...?#?.??.?#?.? 2,3 +???#..??..#?#??. 4,2,3 +..?????#??? 4,1 +???##?.#???#?? 6,3,1 +????#??.??.. 5,1 +??????#??? 3,2 +??????????#?????? 3,3 +?????.??#??#??? 3,8 +?#?##..?#.?#? 1,2,1,2 +#???##?#????. 10,1 +??????.???#??? 2,2 +?????###??.???. 9,1 +??##???#????.?#??#? 1,2,5,1,1,2 +?.?????#??#.?? 1,5 +?#...???#?#??#?. 1,9 +???.#?????????.???# 3,6,2,1,1 +.?#?#????.?? 7,1 +??.#?.#??#??.?? 1,2,1,1,1 +????????##?..? 1,1,5,1 +?????????????.?.?. 3,5,1 +??#?.#?????? 1,1,1,1 +?????????#..??#? 3,6,1,1 +.?.??..?.??.?.???.?. 1,2 +????#???.?###...???? 6,4,1,1 +???#?#??#??????..??. 13,2 +.##???.?????? 4,2 +??????????? 7,1 +.???.#?#?##?.???. 1,6,1,1 +?????.#?.??#???# 3,2,1,2,1 +?????#?#?###??##??# 1,1,1,5,6 +???...?#?.#??#?. 2,2,1,2 +.?#???????? 2,1 +?.?##????????? 1,5,1,1 +..??????##?#???.?? 3,8,2 +?????.?.??????#?.?? 1,2,3,1,2,2 +??#..??##?.# 1,3,1 +#?#??..??#.?.?#?.??? 5,3,1,3,1,1 +?????#??#??#? 1,2,1,1 +??.#???#?#???#?..??? 12,1 +??#?#..???#??? 3,1,1,1 +?.??.??.#??#???#?#?? 1,11 +??#.??#??#??.?? 1,5,2 +?#???#?#?#?????.?? 10,1,1,1 +?#???#?????##?. 7,4 +???##??#?#.???.??. 5,1,1,1,1,2 +????.?????#??? 3,1,3,1 +.???#?.??#?.????# 3,2,5 +??#?????#????#??#??? 4,2,8 +?????#???.#?#??? 1,3,1,3,1 +?###.???#?????.#? 3,5,1 +#.?##..??.#???. 1,2,1,1,1 +??#?#??????.#?..?.?? 8,1,2,1,1 +????.?????.????#??? 1,1,3,2 +?#?#????#????#??# 6,1,1,1,2 +.???#?#???#?#?#????? 15,1 +..???##.??. 1,3,2 +.???#.?#??#???? 4,1,2,1 +????????#?#?#??##.? 2,11 +??.?.??????#??. 3,3 +??.???###????##??? 1,10 +#????.?#??.??.??? 5,3,1,1 +?.????????##.? 1,5,2,1 +???#?##??#??. 2,4,2 +?.#??.??#??#?#? 1,1,8 +.##???.?#???. 4,1,1 +??#.????.?.#??#? 2,2,1,2,2 +???##????# 1,5,1 +#???????#?..?#??? 4,5,3,1 +??.?????.???? 2,1,1,2 +??.???.?????.???#?? 1,2,2,1,5 +??.??#??#?#?..??. 1,7,1 +?#???#?##?..?.?????? 9,5 +#?##?#????..#? 6,1,1,1 +#????.???. 3,2 +?????##.?..??##????? 6,4 +??????.??.??? 2,2,1,1 +??????#?.??# 1,2,3 +????#?????## 1,1,1,2 +..#????#??#????. 2,2,2 +?#.??.??????? 2,1,1 +.#???????#.?#?##.. 1,1,1,1,4 +?????#....?.# 3,1,1 +???????#??.?#?#?? 1,2,3,4 +.???#??#?? 3,1 +??#??#???##??.#????? 1,11,1,1,1 +??????#.#? 1,4,2 +.???#?.#??.? 1,1,2,1 +.?#?#????#.# 9,1 +?#?.##???.?.?#.#?? 3,4,1,2,1,1 +????.???.???..??? 3,2,1,1,1 +#?#??..????.?????# 1,2,2,1,1,1 +.??#??.#?#??#???? 1,1,1,6,3 +?#?????????????#??? 2,1,3,9 +?????#.?????? 1,1,1,4 +?.??#???#?.#????. 1,3,2,1,1 +??..#?#?.? 1,4 +????#?????#. 3,1,4 +??.?##??#?###??#???? 1,15 +????.??#?.?..? 3,3,1 +#?.??.??#?####?? 1,1,1,8 +?#????##??????????? 14,2 +?#????.#??.? 1,2,3 +???.##?????#?????? 2,2,1,3,1 +.?????????##?.# 1,8,1 +??.???????? 1,2,2 +??????#?#? 2,1,1 +???????.#?? 1,3 +?...?####????.?#?? 1,4,2,1,1 +.?##?#??????? 9,1 +????.???????#???#?? 2,9 +?????.?.????? 2,2 +????.?????. 1,1 +.?????????###.??.? 11,1,1 +????##?????.?? 1,2,1,1 +???#?.#??##???#?#?.. 4,1,2,5 +???????#??.??. 3,1,1,2 +.??????????#??#?? 4,6,3 +??.?????..?.?##?#??? 1,1,2,1,4,1 +??#..??.????? 2,1,1,1 +.#??#??.#??#? 1,3,5 +.?????##??????.? 3,6,1 +##?.?#..?. 3,1,1 +?.#.??????#?????#?? 1,12 +#??.????.?# 3,1,1 +#.#?#.##??#?..???? 1,1,1,6,1,1 +????#???.???#??.. 3,4 +???????.##??.???? 2,2,4,1 +??#??#?.####???#??? 4,10 +.????###???###???? 6,6 +???.??????. 1,3 +??##..?#??#??###? 2,3,1,5 +.????#?#????.#? 9,1 +??.???#.#????????? 4,1,2,2 +???#?.????#?# 1,1,4,1 +.#?????.#??? 2,1 +??????...???????#??# 5,2,1,5 +#.?????###?????. 1,2,6 +??##..????..?# 3,2,2 +##???????.?#?. 2,2,1,3 +??#?.#.??#.? 1,1,1,1 +??##.??????..?.??. 4,1,1,1,1,1 +??##?#?????????#?#?? 3,8,1,1 +???????#????.????#?. 8,1,1,1,2 +??????????#????#?? 1,2,11 +???#??.??#. 5,2 +.??????????# 3,1,2 +??#.?????##?#???. 1,10 +?.#???#?#???#????# 1,1,4,2,1,1 +#????.?#?????#??? 2,2,9 +.???#???##? 1,3,3 +.??.??#???#? 3,2 +???#???##??#???.??## 14,3 +???##?##??.##?.?.#?? 2,6,3,1,1 +???###????#???? 6,6 +??.?.?#?##?##?#???? 1,1,1,5,5 +?#???..?.???#?#.?? 5,1,4,1 +#?????#????#???#??? 4,1,1,1,5 +??#.???#????#???? 1,5,1,2 +.??#?#???? 5,1 +?.???..#???#?? 1,2,5,1 +???#?##????..???##? 7,4 +??..#?.???? 2,2,2 +?.??#?.##?????#? 4,5,2 +?.?##???##??##?#?. 9,4 +??#?#??..#??????? 6,4 +???#??.??.? 4,1 +?..#?#?#?????????#? 1,6,1,2 +???.#?..?? 1,2 +??????????.?.#?. 4,2,1,1,1 +#..??.???###?.?.? 1,1,6,1,1 +??.?????#?#??#.?? 1,1,6,2 +?.?##???#?? 3,2 +??.???????? 1,5,1 +?.#???#????#??## 1,1,5,1,2 +???????????###??? 2,1,8 +???.????.?# 2,1,2 +.#?.??#????#.?????? 1,1,1,4,1,1 +#???###?##?.??...? 10,2,1 +..#.??????.?# 1,1,4,1 +????#?????#.? 1,5,1,1 +???#??#??#??# 2,1,2,2 +?#??????????#? 1,1,3,1 +??#??#??#?#?? 3,1,4 +???.?????????#. 1,1,1,2,1 +#??##??.?#? 5,1,1 +..?##???#?#???? 2,6 +#??????#?.?? 2,1,2,1 +.###???.??###??#?? 5,10 +?.????..?????#??? 4,3,2,1 +???##??????? 1,3,1,2 +????.?.####??####??? 1,11 +??##???.?? 4,1 +??#?.?????# 1,3,1 +??.???...#..?. 1,3,1,1 +.##?#??#?#??#??#??? 2,1,5,1,4 +?#.????#??????????## 1,1,2,10 +.#?.??#???? 2,5 +?#?.#?????.??.? 3,4,2,1 +.#?????.?..?? 6,1,1 +###????????###? 6,3,3 +#??????.??#?#? 4,1,6 +??????#?????? 1,2,1 +.?#.???#??????????#? 2,1,2,1,2,2 +.????#?????????? 5,5 +.??????????. 5,1 +?????????.?#?? 2,5,1 +.?#??.?.?? 2,1,2 +?.#.?#?#?. 1,4 +??##.??##?#??###?? 3,5,3,1 +.????..??#?.? 1,1,4 +.???#?????# 1,3,3 +??????.?????##???.? 6,7 +???#?###?.??#?##??# 6,9 +##???#?.#?..#?????. 6,2,3,1 +???????#?#????#.?.?# 3,11,1,1 +?#?.??#??#? 2,3,2 +???#?????.?? 7,1,1 +?.???????#?#??.?.#? 4,2,3,2 +.#.?#.??#??????? 1,1,1,5,1 +?.##??????????? 7,1 +?.?#????????.? 6,1 +.##??#?.???? 2,1,3 +#?.#?#?#????.? 1,1,6 +?##???#??#.???.? 6,1,1,1 +???????#?? 2,1,1 +..?#????#???#?? 1,1,3,4 +.?.#??##?#.?#??..#? 1,1,5,1,1,1 +?#?##?#????. 6,1,1 +#?#?????#?##???#?#?# 1,4,12 +.????#???? 1,2,1 +?..??.???. 1,1 +.????????????.???? 4,1,1,1,1,1 +??.??##???.?#?? 2,4,1,2 +?????#.##???#??#?.? 1,3,4,1,1,1 +??#?.?#??##. 1,2,6 +.???.??#?#.#????##.? 2,3,1,7 +.?.????????. 3,3 +?????#.?.#...? 2,2,1,1 +??????.##????..?. 3,4 +?#.??????#???### 1,1,9 +??..???#.??##????#?# 2,1,1,10 +?????#?..#?. 3,2,1 +???????..?# 2,1,1 +???#???#?? 1,3,2 +.#?#??.?????????.? 5,1,1,1,1 +?.#?.?.??????# 2,6 +???#.??????? 1,1,1,3 +?#???#?????.#?? 3,5,2 +???#???????.?? 1,6,1,1 +..?#????#.. 1,4 +?????.???# 1,1,3 +??#.?????????..? 1,1,1,5,1 +??##??...??#??? 6,3 +#??#????#? 2,2,1 +?#???##.##???? 6,2 +?.?#????.?#?.????# 1,3,1,3,1,3 +??.##??#?????????.. 1,8,1,1 +?###?##.?????#?.???# 4,2,1,4,3 +???.???????.#.??? 2,1,3,1,2 +??.???#????. 1,4,1 +.?##?????##???.???? 13,2 +??##.???????#??#??#? 2,1,2,5,2 +#??????##???. 2,1,3,2 +#.???????? 1,1,1 +?#?.#.?#??.??????? 1,1,4,1,3 +?????#??#??? 2,5 +??.??#?#?? 2,5 +?.#?#?#?????????. 1,9,2,1 +??#??.?##.??#.??? 1,3,1,1,3 +???????.?????? 4,6 +#?.?#??#?????.??? 2,9,1 +#??#??#?.??#????# 5,2,4,1 +?#.#?#?.?? 1,4 +.?.?.????#??#?? 1,1,1,2,2 +?.#???????#?.?. 1,1,3,1 +#.??????..?.?. 1,4,1,1 +???????.#???#??.? 7,6,1 +?..##???##???? 3,3 +?????###?#..???#.?#? 1,1,5,1,1,1 +??.????#?.?..# 2,2,1,1 +????#???##??#? 6,5 +#?????##??????? 1,1,3,1,4 +#?.?????#?.?? 1,2,1,1 +??..#?#??##? 1,3,3 +???#??#???#??. 4,1,1 +???.#??##???????? 3,6,1,1,1 +#?###?#?##?.#?.?.?.. 1,9,1,1,1 +?#???#??#?.?.#???? 1,4,1,4 +????..#.?.???#??.? 2,1,1,4,1 +?????##??#.??#?.# 9,2,1 +????.?##??#?????..?. 2,3,1 +??????.#?#???#??.??# 4,8,3 +?#?##?#????????#?? 7,1,3 +?#??###??#?#?#?.? 13,1 +?.??##???.??????#.? 1,6,1,2,1,1 +??#??#????? 3,3,1 +??.??????????#.. 5,5 +????????#?? 2,6 +#?.??#???.#??? 1,6,1,1 +##.?????#?. 2,2,1 +????#??.?#???? 4,1,5 +.?????????????##?.? 5,3 +.?.???.?#??.## 2,1,2 +.?????????###????? 3,5 +.###??.##?? 5,3 +?#??????#?.??#???? 5,3,3 +.????#??????? 1,2 +??#??????..#???#?. 3,1,5 +.???#?#?.???.?????? 6,3,2,2 +??.#??.???. 3,2 +?.??.???#.?? 1,4,1 +.?????.???..#?? 1,1,1,1,3 +#????????? 4,2 +????#?...????????#?# 1,2,1,9 +??#?#####???? 2,5,1 +.??#???#?. 3,2 +?#?#?.##????#?????? 1,1,9,2 +?####?????.?.???? 8,2 +#???#??.??.??? 2,3,1,3 +.#??##?????#.#?? 7,1,1,1,1 +?..????.???###????. 1,7 +???##???#???.??#?#? 9,1,6 +???#?????????. 3,5 +#?#??#??#?. 3,5 +?#??.?.???? 3,1 +???###.?#.. 3,2 +?????????.??? 4,1,1,2 +???#??#??.? 8,1 +#..??.#???? 1,5 +????#??###?#?#?#???? 2,1,6,7 +???????????###????. 13,1 +???####?.? 1,4,1 +?##.???#????##?##?? 2,1,9 +???..??..?.#?#??#.. 3,2,6 +.#?#???.?#?##??? 1,1,1,6,1 +??#?..??????#??? 1,6,1 +#.????#??????# 1,8 +???#??..?? 1,1 +???..????????? 1,1,4,1 +.????.#???. 1,1 +#???#?#?#?.??.#?? 9,2 +#??#?##????.??.?? 10,1 +.?#?.?????##????#? 2,11 +????#??.#???#?????? 1,4,1,3,1,1 +.?.??..???#?? 1,2,5 +.#?????.?.???#?#??#? 1,4,2,1,1,1 +??#????#??#???#.??? 1,1,10,1,1 +.???..#??#???.. 2,7 +??.#???.#?????? 1,2,1,5 +????#??.??????#? 1,3,1,3,2 +##?????##..???.???.? 2,6,3,1,1 +??##???.??????#?? 7,4,1 +#..##.??#???#??? 1,2,1,1,3 +#??.?##...?? 1,3 +??##?...###... 5,3 +#?#??#????#??#..#? 11,2,1 +???#?????#?#???#??.? 4,8 +??.??????#????????? 9,1 +??.??.?????# 1,1,5 +???.??????#??? 1,1,3,1 +.?.#???.???#?????? 2,7 +???##??.?#?###? 2,2,1,2,3 +???????#.??.#????#.? 1,4,1,1,2,1 +.???#.????#.?????? 1,1,5,2,1 +?.?.???###?##???? 1,10 +?????.?#?.? 5,1 +????????##.?? 3,5,1 +.???#??##?####??? 1,6,4 +#?????????#?. 3,4 +.?.??#?.??.???.? 1,1 +.???#?????? 4,1,1 +???#?#?..?...#???.. 4,1,1,1 +?????.????##???? 1,1,1,1,6 +??#..????? 1,1 +?#?.?????#??#..?#. 2,2,2,2,2 +????#..????? 4,3 +??????????#.?. 2,4,1 +??..#?????..?.#???? 1,6,1,1,1 +??#?####????? 10,1 +?#???#.?..?? 3,1,1 +?????#????????????? 5,4,2 +##??.??..?.?? 2,1 +.?#?#??.??####???? 6,8 +##?.??#???#?#???. 3,4,3 +?#.?#...?#.???.# 1,1,2,2,1 +?#..????#??? 2,2,3,1 +??#??????? 2,1 +????..?.????#?# 3,1,1,3 +?????.??.????#???#?? 1,1,1,1,2,7 +.?##??.?#?.? 4,2 +????#??.??. 5,1,1 +??????.??? 5,2 +????????#?#? 2,1,4 +??.?????????#??.#?? 2,5,4,1 +??.??????????? 1,4,1,1 +???#????.? 2,4,1 +??????.?#?# 1,2,3 +#???????#?. 1,4,1 +????#.??#???.???.? 5,1,1,1,2,1 +?#?????.??##?? 1,1,2,3 +?...???????? 1,1,3 +.##????#.?#?? 3,2,1 +#??#?.?.#??##.????? 5,1,5,1,1 +.???#????? 6,1 +?#???????.?###??#. 2,1,1,4,1 +#??????.???????? 5,1,1,1,3 +.?#??###?#?#?##?..?? 15,2 +.?.??#?######?.??.?? 1,10,2 +??#???.#??#?????# 5,8,1 +????.????? 4,3 +??#.???.??? 1,1,3 +.????.##??????#?##? 4,2,2,4 +??#??????###????#?.? 4,1,10,1 +????#..???? 4,2 +#?????????#???????.# 1,2,1,1,3,1 +?#??##???.#?#.? 8,3,1 +????.#?#???#### 1,1,1,3,4 +??.?#?#?#?.??. 1,1,4,1 +??#??????????.# 2,4,1 +???#??.???##??#? 6,1,2,3 +?.???#?#??#??##?.?.. 14,1 +??.#??#?#??? 4,3 +?#?.??????#??????#? 2,15 +???.???#??.???#??. 1,2,3,5 +?#?.?#?#?#?#???#???? 2,4,1,1,5,1 +???????????#???. 1,1,6 +??????????.?? 2,5,1 +.##???????.?#???? 9,3 +.???..?.?###? 2,1,3 +?#??##??????????. 10,1 +?????.????.?##?? 4,1,4 +.???##?.???????#? 1,2,1,6 +????????????.?? 5,1,2 +.?#????????? 3,1,3 +#?.?#?.??. 2,1 +?#?#????????. 7,1 +??????####???????#? 2,10,1 +?.???..????? 1,4 +.????##??#?##? 2,9 +#??#?#?#??.#.#?? 9,1,2 +?#??.?###???????? 1,1,6,2,1 +?###??????.?# 4,2,1 +#.??#??.?##?#. 1,4,5 +?????.????????? 1,1,5,2 +??.?#..#?????#?? 1,2,3,5 +?.??#????.?????#?# 6,8 +?.??#.?##?????? 1,2,6,1 +#??#.?.?.#?#?????#?# 1,1,1,1,1,9 +.????#??##?????#??? 9,5 +?#????#?##.????? 7,2,1,1 +?.??????.??? 1,1,2,1 +??##???#?##?? 4,5,1 +#??????####?.???? 1,8,1,1 +?.#?###?????#?#? 5,4 +?.??#.???.#.#?#. 1,2,1,1,3 +#.#?#?##??##?.??.. 1,10,2 +???????#?????#??? 3,2,1,1,5 +.?.#??.?#?#?.?#???? 1,1,4,2,2 +??##???.???# 6,1,1 +?#??..???#?#???#.??? 1,1,2,5,1,1 +##?.??#???#??###? 2,3,2,5 +?.???#???#?#?#???#? 1,1,1,1,9 +?#??#??#??.?.#?. 2,2,2,1,2 +????#??.?##? 4,3 +?.?#???..?####???? 1,2,1,7,1 +#???????.? 1,2,1 +#?..???..??????? 1,1,1,1 +.#??#?????? 1,6,1 +.#?.?.???##?? 1,1,5 +??#????.###?##??? 2,2,3,2,2 +?#?.?.???. 2,1 +.??..???????.????? 2,3,1,1,1,1 +.??.#???.???? 3,2 +...?.??#???.. 1,1 +.??.?.?????????#??? 1,3,2,5 +?.???..?#.#????# 1,2,1,6 +.?#???.??#?????. 4,5 +?##?.???..#? 3,3,2 +.##???#?#?.?#??.??? 3,4,3,2 +.????#??.?? 4,1 +?##??#?###???#???#?? 2,5,1,5,1 +??#??.?.##??? 1,2 +..#????#??#?? 1,2,1,3 +??????##?. 2,3 +.????????.?#????? 1,6,1,2 +??.?#????.#??#?. 1,2,2,1,1 +.?#?????????.#?# 2,5,1,1,1 +???????.???????#?#? 2,10 +?#?#?.#.?????#? 3,1,2,2 +???????#?????????? 3,1,4,2 +?.?.??????? 1,3,1 +????.#???#?.##.?? 1,1,5,2 +????..#????.????? 3,1,1,1,2 +????#?.#???#?? 6,6 +?.?#???.??.??### 1,2,1,1,3 +..##?.??#?.?#?.#?. 3,1,2,2,2 +.?##?#??.? 2,1,1 +?#???##?????. 6,1 +???#?#???#?#?#???? 2,3,7,2 +.#?#?..####?? 1,1,6 +#???#??#????? 2,9 +?..?#??????#???.?#? 1,1,8,2 +?.#???#??? 1,1,4 +..???##???#?#?.#??. 11,2 +????##????. 1,6 +??????#??.?????. 1,1,1,2,2 +?#?##???????#.?#? 13,2 +?????????# 2,2 +##???????. 5,3 +????????##??# 2,5,1 +???#?#?##???#?#??#? 8,1,1,4 +?.????????. 6,1 +???????#.??#?#??# 4,3,7 +#####????#?????????. 10,1,1,1 +#??????#?#.?????? 1,6,1,2 +.??.??????????#?# 4,3 +.???..#??. 1,3 +???.?????? 1,1,2 +#?.??#???.??? 1,3,1,1 +???????.???.. 1,2 +.##???#?.#???#?#?# 2,2,9 +.?#???.?.? 1,1 +?#?#????#?#.??#? 4,3,1,4 +.?????.?????????# 4,1,6,1 +????.???#?#??###? 4,1,5,3 +??#????????#??#?..# 3,1,1,3,1,1 +.?????.?????????.# 1,1,1,1,5,1 +..?????????#???.??? 5,5,1 +??#????#?? 1,1,1 +????#?#?????? 1,1,4,1 +???#??#??.?#?? 7,2 +????.#??.?.##? 1,1,1,3 +??.#???.??? 1,2,1 +#?????##?#????? 11,1 +?...??#??. 1,5 +?????#?#?.???# 1,1,3,4 +??.??##.####????.# 2,1,2,7,1 +??#????..? 5,1 +????#??#???#??#?##? 3,2,7 +.???##????.##?##?. 5,5 +??#??#??#?#? 1,9 +??#?#??#??.#???#???? 10,5,2 +.??.?????#? 2,1,2 +???#.??#?#??#? 1,1,9 +??#?????..???# 7,4 +..#??.?###???#?#.? 3,9 +???#?????##?.????# 3,4,5 +#??#?#???# 1,4,2 +??#??#???#?.#?#??? 1,1,6,1,1,1 +??#????.???#.#? 2,2,1,1,2 +##?#?????#?.????#?? 6,3,5 +????#?.?????? 3,3 +??#.???.?.#????#???? 2,1,2,7 +??#?#???.???? 8,1 +#.?#.?#????.???. 1,1,3,1,3 +##???#????.?..?.??? 10,1,1,1,1 +????#??#?????? 1,7,3 +???.?.??.??? 2,1,1,1 +?#?###?????.?#?#?.?? 9,1,1,1,1 +???###?##???.#? 1,4,2,1,1 +????###?????#?.? 1,11,1 +????#??..??##??? 5,1,3 +.????##??????..##. 12,2 +?.#????#?? 2,2 +????????#?#????#??.? 2,4,3 +????.#???.??#?#. 4,3,5 +??##????.#?.?#. 7,1,1 +.?.??.??..? 1,2 +##???.#?.? 2,2,2 +.?????#?.??#.? 4,2,1 +..##??#??#? 2,2,2 +??..?.?.??..?. 1,1 +???.?.?..???#?#?? 1,1,8 +???##?#???#????? 1,3,2,2,1 +?.?????#?????#??.??? 1,1,2,6,2 +?????.#?????#?#???. 1,1,9,2 +?#?.????.???????## 1,4,1,1,1,2 +.?.?##??.### 2,3 +??????##???# 2,4,2 +.?#.#.?#????..#.?? 2,1,1,3,1,1 +?.#???..??????.? 2,3 +#..#??????????? 1,1,3,5 +??.??.???.?...? 1,2 +.?.#???#?#. 1,4 +#??..??#.?#? 1,1,1,3 +?.?##??.#.?? 4,1 +???????.#??? 1,2,1,1 +.????#??.?. 2,3,1 +????.?#???? 2,3,1 +???#???.?#?????? 1,4,2,2,1 +.#?????..???????.? 6,7