diff --git a/challenges/2020/16.js b/challenges/2020/16.js new file mode 100644 index 0000000..be7c288 --- /dev/null +++ b/challenges/2020/16.js @@ -0,0 +1,156 @@ +const isValid = (num, rules) => rules.some(([l, h]) => num >= l && num <= h); + +/** + * Part 2 + */ +const solvePuzzle = (input) => { + input = input.split('\n\n').map((lines) => lines.split('\n')); + + let [rules, myTicket, [_, ...nearbyTickets]] = input; + + // Convert myTicket to a list of all fields + // [123, 456, 123] + myTicket = myTicket[1].split(',').map((n) => Number(n)); + + // Convert nearbyTickets to a list of tickets with all their fields + // [[111, 222, 333], [444, 555, 666], ...] + nearbyTickets = nearbyTickets.map((line) => + line.split(',').map((n) => Number(n)) + ); + + // Create a ruleName => possibleIndexes map + const possibleIndexes = new Map(); + + // Convert rules array to a ruleName => ruleRanges map + rules = new Map( + rules.map((r) => { + let [ruleName, ruleRanges] = r.split(': '); + + // Add a set of possible indexes for the rule name + possibleIndexes.set(ruleName, new Set([...Array(rules.length).keys()])); + + ruleRanges = ruleRanges + .split(' or ') + .map((r) => r.split('-').map((n) => Number(n))); + + return [ruleName, ruleRanges]; + }) + ); + + // Create a flat array with all ranges + const allRules = [...rules.values()].flat(); + + // Delete invalid tickets that don't match any rule + for (let i = 0; i < nearbyTickets.length; i++) { + let ticket = nearbyTickets[i]; + for (let num of ticket) { + if (!isValid(num, allRules)) { + delete nearbyTickets[i]; + break; + } + } + } + + // Iterate over all tickets + for (let ticket of nearbyTickets) { + // If the ticket was not deleted before + if (ticket) { + // Iterate over all fields + for (let j = 0; j < ticket.length; j++) { + let field = ticket[j]; + // Iterate over all rules + for (let [rule, ranges] of rules) { + // If the ticket's field is not valid for the range + if (!isValid(field, ranges)) { + // Delete the field's index from possible indexes field of the rule + possibleIndexes.get(rule).delete(j); + } + } + } + } + } + + // Create a possibleIndexSets list sorted by set size + // Note: These sets will point to the same ones in possibleIndexes map + const possibleIndexSetsBySize = [...possibleIndexes.values()].sort( + (a, b) => a.size - b.size + ); + + // First set will have one item, second set will have 2 items vice versa. + // We will remove the numbers that exist in the previous sets. + possibleIndexSetsBySize.forEach((rule, idx) => { + for (let i = idx + 1; i < possibleIndexSetsBySize.length; i++) { + for (let match of rule) { + possibleIndexSetsBySize[i].delete(match); + } + } + }); + + let total = 1; + + // Finally, iterate over the now-pruned possible indexes map. + for (let [ruleName, idxSet] of possibleIndexes) { + // If the ruleName contains 'departure' + if (/departure/.test(ruleName)) { + // Get the only possible index for the rule + const idxInMyTicket = idxSet.values().next().value; + // Multiply the total by the number found in the ticket with that id + total *= myTicket[idxInMyTicket]; + } + } + + return total; +}; + +/** + * Part 1 + */ +const solvePuzzlePart1 = (input) => { + input = input.split('\n\n').map((lines) => lines.split('\n')); + + let [rules, myTicket, [_, ...nearbyTickets]] = input; + + myTicket = myTicket[1].split(',').map((n) => Number(n)); + + nearbyTickets = nearbyTickets.map((line) => + line.split(',').map((n) => Number(n)) + ); + + rules = rules + .map((r) => { + return r + .split(': ')[1] + .split(' or ') + .map((n) => n.split('-')) + .map(([a, b]) => [Number(a), Number(b)]); + }) + .flat(); + + let errorRate = 0; + + for (let ticket of nearbyTickets) { + for (let field of ticket) { + if (!isValid(field, rules)) { + errorRate += field; + } + } + } + + return errorRate; +}; + +// eslint-disable-next-line no-undef +test('Puzzle Result', (done) => { + const fs = require('fs'); + const path = require('path'); + const currentDay = path.basename(__filename).split('.')[0]; + + fs.readFile(`${__dirname}/inputs/${currentDay}.txt`, (err, input) => { + if (err) { + throw err; + } + const result = solvePuzzle(input.toString()); + console.log('\x1b[1m\x1b[31m%s\x1b[0m', 'Result:', result); + done(); + }); +}); diff --git a/challenges/2020/inputs/16.txt b/challenges/2020/inputs/16.txt new file mode 100644 index 0000000..bd9ca6a --- /dev/null +++ b/challenges/2020/inputs/16.txt @@ -0,0 +1,262 @@ +departure location: 41-526 or 547-973 +departure station: 29-874 or 891-961 +departure platform: 25-200 or 213-966 +departure track: 38-131 or 152-951 +departure date: 29-349 or 366-955 +departure time: 34-450 or 464-958 +arrival location: 28-635 or 650-962 +arrival station: 25-663 or 689-955 +arrival platform: 49-731 or 738-955 +arrival track: 50-617 or 627-970 +class: 39-90 or 98-966 +duration: 32-99 or 120-949 +price: 43-742 or 756-955 +route: 32-501 or 520-968 +row: 41-276 or 285-951 +seat: 30-830 or 840-972 +train: 31-123 or 131-974 +type: 35-63 or 75-949 +wagon: 26-564 or 580-951 +zone: 47-380 or 402-952 + +your ticket: +197,173,229,179,157,83,89,79,193,53,163,59,227,131,199,223,61,181,167,191 + +nearby tickets: +153,109,923,689,426,793,483,628,843,774,785,841,63,168,314,725,489,339,231,914 +177,714,226,83,177,199,186,227,474,942,978,440,905,346,788,700,346,247,925,825 +98,718,599,348,225,261,310,490,773,867,659,874,286,290,408,481,780,240,309,391 +549,157,51,253,338,559,185,820,914,412,180,88,811,426,420,715,557,325,9,700 +523,86,241,489,735,854,797,654,380,846,522,432,87,911,849,88,219,757,564,901 +160,772,822,425,240,250,335,411,478,599,783,251,561,786,869,12,864,405,925,869 +202,581,555,337,185,699,857,222,869,826,873,445,273,440,465,938,766,482,901,99 +793,468,773,432,300,82,853,557,408,75,220,468,610,748,51,415,775,154,784,189 +949,200,857,419,777,613,489,424,152,872,486,599,580,925,230,250,574,903,865,914 +498,921,903,481,422,313,563,997,949,898,447,123,181,295,694,631,257,935,756,660 +740,384,249,792,303,857,830,236,651,628,560,408,466,469,343,599,83,324,345,375 +709,170,627,415,273,741,441,251,320,98,372,373,433,558,304,312,458,176,928,926 +77,606,582,935,420,820,816,468,115,303,346,264,422,335,699,494,423,709,913,334 +483,799,490,303,724,808,728,586,895,443,303,271,238,826,818,369,865,976,274,656 +928,326,220,182,303,811,472,470,736,217,627,190,450,616,526,719,415,300,417,772 +635,300,443,125,56,228,275,485,629,629,250,436,789,526,779,342,780,525,605,706 +889,712,260,409,419,895,828,421,344,479,341,524,709,943,156,555,152,550,845,61 +859,173,870,784,252,153,254,689,824,444,692,782,560,762,224,689,119,443,323,891 +242,87,292,843,472,404,168,817,806,699,372,763,896,65,251,63,251,611,216,260 +484,257,411,900,496,785,106,243,725,86,171,581,857,226,184,920,658,923,286,910 +607,458,690,765,582,322,61,946,939,131,262,830,428,339,230,774,192,704,340,285 +191,704,696,123,853,937,924,948,921,905,336,740,67,53,915,247,487,236,164,186 +466,501,224,225,873,786,268,172,904,588,250,417,896,821,493,428,907,918,84,624 +555,868,775,295,414,312,468,909,344,704,857,482,491,851,926,643,75,83,630,866 +368,565,89,373,340,298,592,421,894,323,240,231,902,223,705,305,415,820,772,213 +169,85,703,920,501,77,689,697,327,194,757,116,257,366,591,265,435,422,63,417 +199,255,233,481,241,270,727,339,337,87,930,778,548,438,874,418,168,283,707,728 +275,596,342,484,465,695,715,440,928,55,408,855,766,482,328,589,161,839,830,347 +193,856,583,827,862,402,486,943,862,902,406,309,85,229,286,941,215,135,689,162 +232,53,235,839,216,820,872,465,265,300,230,162,819,698,260,654,491,98,78,377 +769,897,470,752,336,122,190,767,88,583,90,225,161,583,81,157,658,192,291,498 +613,813,721,166,819,182,596,948,705,339,380,727,319,359,852,478,524,334,366,120 +409,941,60,23,488,714,487,289,328,380,523,304,741,81,612,756,584,928,487,260 +256,332,176,556,126,159,483,428,300,181,906,185,305,818,591,941,286,304,893,739 +177,70,616,469,168,632,846,215,807,58,473,368,590,555,705,812,715,919,224,168 +752,369,501,414,376,286,846,341,858,219,827,698,806,185,404,561,827,494,603,225 +384,346,232,465,771,272,470,900,724,232,706,847,501,522,179,657,768,335,710,630 +166,815,264,550,806,759,229,184,416,85,319,624,229,802,582,238,556,293,303,497 +337,591,606,937,564,789,858,614,724,986,934,862,158,415,701,194,852,189,157,407 +488,259,377,949,721,310,243,788,304,604,436,214,287,268,468,417,736,549,907,602 +422,877,860,900,898,483,286,178,345,188,370,651,846,177,376,217,436,83,168,791 +378,192,429,372,172,812,863,591,349,584,53,410,325,787,999,609,926,479,662,432 +477,444,421,706,629,438,436,862,447,826,264,738,624,865,728,236,913,554,860,303 +633,751,491,298,658,464,259,661,377,802,292,482,430,770,692,483,290,627,552,587 +524,906,177,259,821,168,771,70,650,722,798,228,900,606,940,77,854,270,258,470 +551,128,917,706,430,913,122,582,859,559,412,171,787,599,276,720,369,848,195,434 +182,772,919,616,402,843,193,427,474,734,82,633,589,723,607,466,221,466,440,435 +928,93,477,215,939,631,551,930,464,172,162,706,316,298,77,406,290,336,840,692 +944,560,714,409,369,908,413,56,320,173,902,307,776,412,262,553,23,613,923,215 +657,328,760,556,586,75,932,402,229,780,997,867,806,376,167,769,477,718,898,447 +805,472,258,931,741,766,871,433,775,220,764,895,604,308,310,500,515,120,722,121 +173,84,260,160,271,918,712,949,870,321,213,906,857,710,344,143,717,689,376,610 +559,938,76,800,553,823,870,423,421,169,615,704,811,980,701,403,194,627,857,198 +620,922,83,371,823,780,309,900,488,662,585,227,690,554,933,937,167,893,762,775 +284,820,787,435,768,466,584,560,123,587,910,341,220,57,810,847,799,872,721,257 +488,553,593,867,525,656,652,731,435,65,774,740,842,331,214,152,808,771,295,317 +721,804,766,450,276,944,741,927,580,728,62,242,713,287,837,587,423,442,498,177 +846,731,692,50,522,412,632,305,768,288,326,818,274,262,349,726,170,997,487,162 +549,860,760,246,782,214,377,441,727,602,560,183,820,531,214,702,447,768,200,692 +290,740,421,404,898,583,718,769,341,712,476,317,937,303,81,865,641,307,275,859 +443,775,321,371,275,412,292,757,729,947,233,241,225,694,308,292,445,11,333,818 +659,446,597,781,925,812,56,186,595,422,821,266,729,417,383,188,696,296,845,635 +138,559,258,718,449,309,366,873,290,936,59,193,193,156,556,171,769,434,223,302 +611,631,340,123,713,334,799,337,600,930,80,83,268,702,432,58,838,221,254,902 +310,905,722,414,336,851,319,423,823,428,296,922,476,575,474,476,120,594,740,783 +172,6,581,868,225,484,916,813,930,233,89,366,303,310,155,594,428,923,182,348 +479,218,791,558,689,871,739,417,405,438,820,796,846,613,894,421,939,62,279,288 +720,912,429,389,823,554,239,52,158,432,777,780,121,237,298,795,380,946,197,701 +233,655,790,186,496,758,586,236,928,173,904,493,851,5,910,709,936,52,466,697 +82,920,716,469,373,863,945,117,271,480,276,242,155,742,487,175,154,869,446,726 +285,725,652,249,63,244,235,698,742,106,797,172,75,629,475,845,922,194,275,161 +768,310,785,318,658,873,377,76,904,760,656,720,924,553,405,872,187,407,740,8 +804,763,653,730,220,221,369,407,337,277,553,857,498,310,864,932,772,152,306,415 +57,791,55,380,795,249,169,415,863,522,90,918,269,81,343,427,782,10,479,193 +820,81,442,608,552,233,155,181,948,187,427,918,944,343,220,228,128,371,470,925 +168,195,120,427,482,660,404,341,780,496,581,705,831,75,468,473,187,80,635,98 +274,821,738,446,328,944,224,489,332,699,499,500,402,582,691,82,213,125,255,501 +900,131,178,425,305,493,738,131,288,83,802,931,78,559,642,292,797,904,448,862 +200,694,928,67,485,605,917,596,229,232,166,903,273,822,657,155,935,423,448,154 +476,762,260,290,174,53,550,495,853,186,78,662,366,337,936,123,174,749,232,556 +198,192,798,370,908,948,605,229,803,701,628,874,209,475,304,177,227,131,302,468 +521,335,331,650,399,707,213,691,259,296,795,238,758,698,926,598,99,467,548,158 +73,601,419,548,263,367,828,807,448,341,921,170,485,778,495,247,320,756,794,219 +421,652,924,822,224,257,260,406,656,378,290,153,4,480,791,340,791,238,873,717 +635,739,172,893,468,247,423,817,706,845,59,895,927,196,326,524,85,113,804,256 +448,446,870,727,689,988,241,725,293,422,449,557,798,332,376,250,258,707,524,522 +908,422,218,649,183,773,217,708,228,936,526,182,314,780,411,780,444,213,726,336 +323,464,915,184,262,433,721,485,249,468,348,179,949,742,635,696,357,937,272,302 +939,165,84,79,419,187,494,442,902,326,263,697,384,196,53,921,823,856,907,563 +239,696,438,287,600,896,709,520,774,479,866,307,61,344,376,112,862,256,658,906 +304,221,79,252,179,187,628,172,777,343,819,430,924,195,276,555,799,249,300,24 +857,410,592,262,482,712,736,171,270,656,300,870,940,75,871,864,328,500,343,802 +809,856,478,893,938,85,560,285,438,482,841,616,923,861,712,19,226,424,824,762 +431,869,924,772,494,896,263,121,236,337,23,424,926,55,582,477,630,491,261,53 +301,321,896,689,777,291,420,264,909,336,937,522,54,553,277,98,220,343,704,241 +257,494,123,339,260,696,946,814,251,911,799,808,584,929,829,279,614,796,287,716 +627,780,924,527,263,860,807,60,915,774,522,602,368,764,77,617,319,217,553,323 +535,756,557,548,724,499,487,796,273,893,921,285,772,402,696,910,552,218,157,420 +906,443,921,186,474,821,70,629,594,867,345,651,492,289,815,297,715,549,190,304 +171,425,632,975,909,919,83,715,221,762,765,721,828,366,827,153,843,633,550,285 +458,522,691,153,724,520,176,85,244,306,936,921,54,377,757,818,758,524,79,316 +817,635,327,581,488,412,861,180,367,778,474,720,761,297,893,327,552,563,295,69 +330,597,219,78,282,86,158,584,161,431,653,161,243,552,171,925,342,597,822,774 +771,338,272,500,192,422,480,227,895,79,470,416,753,440,491,448,174,823,170,855 +293,806,271,120,209,76,807,805,946,98,801,288,409,425,474,288,475,302,406,825 +345,317,654,222,477,367,85,161,715,772,245,222,102,53,348,860,584,500,492,469 +645,251,857,60,525,369,656,444,58,658,121,934,253,200,469,342,249,190,605,250 +419,605,594,441,902,894,725,277,661,377,81,200,225,794,378,729,922,789,88,308 +853,373,199,249,323,756,905,193,293,428,827,153,335,148,936,479,295,847,90,289 +739,223,217,225,894,994,704,824,712,182,864,84,247,564,61,914,374,522,474,845 +784,769,596,197,253,64,852,592,845,214,122,297,285,251,425,823,366,823,174,798 +846,818,581,178,194,226,170,619,250,258,802,698,911,84,525,251,62,329,763,88 +438,174,928,179,897,651,558,846,865,724,159,830,583,321,691,54,987,695,816,465 +299,705,824,281,827,174,62,727,87,796,783,906,307,217,174,801,800,614,846,247 +193,489,121,908,841,88,780,581,444,243,252,797,368,475,259,582,482,75,610,283 +923,788,408,219,727,435,187,920,477,405,495,222,823,696,557,413,610,173,14,159 +499,143,406,825,412,762,944,480,249,828,947,585,821,939,822,920,699,298,840,180 +811,768,723,924,61,242,258,170,657,650,324,290,825,397,338,75,156,556,173,176 +441,233,582,247,489,893,155,75,553,850,51,829,936,832,305,490,123,61,858,778 +371,789,90,302,423,131,300,307,498,774,470,849,591,697,258,859,537,702,936,441 +784,430,222,266,720,469,287,419,720,337,263,164,430,690,324,540,290,944,329,840 +809,253,441,927,922,768,485,424,232,705,123,873,737,374,414,710,347,234,892,860 +810,475,997,257,941,690,472,448,243,599,829,738,256,906,818,378,874,825,262,83 +230,627,66,61,583,870,590,899,250,370,330,725,413,824,157,605,689,343,76,498 +822,632,80,804,612,860,333,703,715,319,270,464,485,127,415,582,661,482,584,821 +261,779,868,327,531,933,949,200,189,778,652,918,787,304,293,175,864,250,340,694 +722,873,3,472,153,722,80,855,590,874,170,870,942,720,320,348,188,241,171,309 +721,472,916,718,182,591,75,156,986,301,635,783,286,770,826,473,596,895,915,324 +338,318,485,229,823,789,661,375,167,899,198,549,713,431,911,328,142,615,904,904 +940,539,904,276,227,818,327,910,812,898,926,797,630,729,942,562,789,245,756,801 +115,153,776,78,311,472,182,288,597,252,659,271,774,934,784,166,924,231,287,340 +22,220,802,812,478,237,187,742,87,819,60,864,417,477,631,908,714,759,870,237 +416,53,159,728,854,75,86,735,61,871,595,859,220,896,796,430,310,81,629,481 +196,377,867,718,350,77,521,786,725,713,604,379,321,90,427,595,473,122,191,905 +488,638,923,271,912,631,524,331,481,369,478,340,926,236,346,437,241,157,500,663 +410,632,632,598,856,857,787,182,428,718,181,487,927,731,81,947,812,553,23,326 +603,894,778,82,938,991,795,709,226,411,191,584,912,490,730,609,820,469,379,895 +919,190,499,563,230,78,763,81,840,909,254,449,470,650,321,179,887,859,197,922 +477,335,179,934,936,285,395,476,269,58,548,819,694,497,436,553,268,329,801,286 +290,285,58,842,417,909,834,654,789,807,706,191,449,604,249,893,335,328,818,261 +808,260,341,526,366,725,791,58,893,247,442,847,482,223,548,785,389,313,63,809 +447,256,215,623,215,479,811,580,169,402,425,254,846,478,703,910,222,267,338,77 +629,209,920,758,858,811,845,593,346,438,90,494,821,488,693,466,917,941,856,285 +939,173,15,170,707,431,374,437,473,344,699,654,716,628,90,274,522,176,556,87 +724,54,722,343,729,219,434,227,614,662,367,77,423,196,229,481,72,615,181,820 +349,549,496,595,841,594,220,702,908,244,706,870,427,203,927,713,160,808,770,339 +356,859,858,77,549,469,694,699,844,919,770,780,272,477,738,604,171,465,857,474 +805,120,62,249,255,168,332,170,766,945,731,90,855,187,849,88,60,202,285,610 +339,587,524,309,785,594,813,295,744,305,654,650,727,501,804,940,793,849,326,912 +468,296,844,907,904,415,424,465,89,935,407,475,446,89,896,70,322,85,909,305 +975,787,851,85,427,796,604,830,718,61,841,916,696,330,714,376,314,799,944,656 +696,307,907,778,759,717,407,853,87,948,241,789,342,454,409,780,239,865,488,557 +368,427,213,285,194,658,922,652,700,434,305,224,500,980,244,781,181,874,236,302 +325,601,498,733,756,602,780,842,767,342,563,53,925,564,927,299,760,817,174,773 +159,90,268,176,725,431,427,169,612,840,186,327,251,941,812,446,792,292,67,690 +178,50,318,592,271,799,585,930,937,320,293,271,757,914,103,556,60,489,234,843 +656,345,598,589,861,659,630,342,871,827,54,655,271,523,708,556,428,73,444,291 +187,658,894,311,852,855,345,289,702,312,410,561,226,87,169,124,596,290,221,763 +338,429,167,520,697,189,826,178,626,329,651,52,57,416,817,860,761,713,902,758 +285,497,628,807,466,370,162,594,850,253,227,926,281,182,801,854,822,227,487,708 +551,768,718,213,107,652,325,247,199,660,948,419,244,435,762,803,605,829,526,551 +635,214,893,304,427,406,851,475,413,199,705,493,533,429,704,797,925,342,265,372 +815,902,849,557,825,484,247,520,600,162,181,792,323,794,600,696,122,534,873,180 +553,274,186,936,603,949,277,198,54,243,174,758,905,941,322,871,232,587,705,409 +706,845,557,938,644,269,249,428,929,489,923,482,918,913,420,901,802,804,815,438 +555,380,417,270,224,869,256,260,329,268,582,408,407,720,903,716,752,761,924,374 +317,728,467,828,861,993,230,783,214,229,426,522,406,762,781,606,826,582,372,633 +199,80,564,860,304,587,341,406,175,156,407,412,547,446,757,236,911,438,269,838 +985,723,857,553,722,692,81,919,302,186,780,220,53,61,310,464,473,184,83,369 +818,863,348,158,604,301,906,291,936,596,656,591,303,943,661,162,891,737,592,830 +466,622,321,467,491,484,700,794,695,275,218,789,484,631,814,781,266,558,588,81 +251,215,310,266,769,564,287,942,805,10,234,438,630,496,370,286,709,931,596,228 +371,772,218,817,406,421,808,296,306,633,198,448,629,774,122,650,282,230,698,493 +346,783,99,260,263,329,246,799,652,854,788,121,783,647,616,825,161,99,617,157 +407,121,805,224,290,189,717,294,481,183,316,818,432,377,944,620,487,725,223,806 +803,56,237,320,819,234,473,759,70,329,295,828,866,99,867,773,937,863,779,247 +482,361,215,492,710,335,559,862,415,610,799,159,929,704,706,380,294,404,896,185 +269,52,526,304,436,908,942,814,948,218,550,319,420,279,87,254,555,175,297,656 +590,735,411,153,193,416,295,76,654,76,935,807,315,772,592,845,86,786,335,178 +446,524,861,792,741,714,380,374,833,341,270,868,803,722,51,702,327,433,348,857 +696,633,936,590,832,824,762,694,373,122,337,157,225,689,89,250,556,660,871,78 +493,230,899,553,692,610,157,435,172,730,786,465,329,735,366,657,597,295,241,896 +221,796,480,372,190,87,921,603,761,818,192,198,140,551,707,811,376,171,707,260 +469,690,404,703,255,891,200,162,660,20,85,59,199,407,595,315,223,552,523,860 +779,946,818,237,606,824,926,661,894,377,816,606,239,52,487,297,908,398,944,231 +561,160,488,475,716,860,582,587,768,99,60,591,337,293,610,630,607,822,757,734 +326,281,242,779,260,238,223,607,593,52,927,184,629,789,595,483,287,218,234,943 +446,865,816,487,784,444,746,224,303,818,429,292,500,720,560,304,818,761,264,441 +226,837,290,596,434,823,501,613,598,824,174,236,941,803,425,276,899,480,131,806 +166,335,524,464,985,800,290,520,180,200,448,651,699,476,650,440,75,526,873,788 +177,252,341,446,654,493,61,563,248,60,233,902,82,717,422,427,156,442,329,111 +291,715,185,849,756,895,773,580,425,895,562,54,195,719,488,832,653,934,57,702 +420,895,445,900,938,308,856,850,934,900,156,280,229,85,798,424,330,691,376,815 +554,470,334,694,979,323,406,231,274,829,766,651,348,417,162,929,866,160,930,178 +409,711,220,656,433,929,922,308,828,368,612,167,600,186,313,840,932,580,732,905 +790,216,774,172,623,741,426,437,376,431,791,526,419,797,327,344,608,783,845,595 +344,264,852,634,692,555,597,78,636,827,582,171,805,373,602,614,793,935,257,296 +318,251,595,293,285,330,713,913,760,367,489,594,698,621,50,492,215,425,691,76 +468,424,714,56,585,698,157,79,789,470,191,449,292,334,690,786,622,595,870,334 +689,171,299,563,775,580,629,781,246,739,852,99,945,866,778,276,251,623,424,766 +347,178,497,713,738,629,772,613,474,760,434,440,801,217,934,368,202,276,696,564 +826,762,230,690,189,764,808,841,663,923,179,698,57,878,323,934,492,803,260,430 +817,824,224,367,407,868,797,690,58,711,552,733,522,616,660,79,802,347,342,215 +652,633,51,186,808,447,86,484,702,258,779,436,130,215,558,606,762,166,822,216 +735,719,445,910,705,158,467,154,242,921,905,719,949,526,236,416,199,285,490,418 +317,898,347,321,376,339,822,271,796,287,432,863,225,103,629,427,855,699,657,779 +487,791,616,723,708,526,499,81,279,159,239,776,260,812,166,630,406,655,467,175 +340,928,343,595,13,923,799,229,320,793,790,911,500,586,915,180,436,200,635,848 +867,596,942,287,843,225,432,341,927,440,55,445,234,425,868,740,786,806,798,993 +938,160,200,840,862,316,618,660,893,520,343,590,663,302,595,925,265,549,782,338 +61,467,331,697,345,896,78,601,550,874,194,918,692,717,624,778,932,616,263,60 +214,656,85,469,771,903,556,247,473,936,794,479,826,606,736,760,307,818,709,267 +631,474,167,321,654,438,82,233,522,893,261,820,380,791,67,797,165,272,320,897 +902,483,228,155,146,485,929,765,784,467,175,449,726,245,291,292,824,596,778,329 +348,317,467,80,429,188,246,292,313,157,474,286,270,493,703,733,249,904,213,245 +195,588,243,474,437,547,914,758,426,82,854,172,365,616,337,342,780,909,791,243 +554,913,412,332,327,476,225,377,725,719,200,67,779,270,60,627,172,182,857,739 +839,315,85,761,311,366,726,725,409,731,433,445,824,194,87,585,347,411,266,698 +176,275,466,499,759,895,307,177,158,598,524,467,554,171,53,933,937,643,423,793 +848,162,911,260,468,584,764,242,324,445,629,778,824,562,755,168,695,317,220,328 +129,275,898,405,166,329,695,62,760,497,769,554,863,234,711,783,470,249,858,845 +376,375,278,86,522,76,895,858,703,920,183,434,245,62,379,585,916,349,214,423 +332,482,248,804,755,600,410,930,928,52,75,61,764,768,256,444,245,798,852,262 +419,296,547,869,931,261,893,726,438,292,941,915,85,868,698,382,851,52,915,692 +295,122,893,335,77,856,824,368,59,230,302,713,726,560,843,752,199,808,895,286 +488,21,254,375,582,794,776,310,793,199,915,339,495,187,657,445,467,483,231,813 +809,249,794,338,764,233,120,76,304,234,774,250,452,226,740,773,372,84,784,949 +657,176,272,829,783,822,718,483,417,700,830,594,823,796,348,613,473,15,553,264 +589,792,761,81,847,229,248,807,131,800,722,833,464,703,443,558,561,265,218,909 +175,555,557,103,334,525,769,344,219,438,868,742,54,435,611,721,816,437,417,597 +823,190,611,905,718,215,84,450,870,235,221,863,345,902,782,403,468,660,700,23 +174,263,804,689,692,739,188,802,293,805,559,663,636,216,197,420,317,659,613,922 +222,496,316,764,162,779,430,496,759,931,742,704,259,440,125,273,166,244,251,78 +906,413,852,216,333,304,659,596,400,61,496,703,380,341,764,785,584,478,56,904 +772,617,174,235,407,285,826,563,563,600,788,468,909,689,84,473,93,496,652,154 +427,842,823,347,73,849,257,158,600,449,51,478,270,303,523,295,738,237,269,120 +322,931,842,416,89,980,523,89,943,606,247,693,826,163,50,54,199,650,153,915 \ No newline at end of file