Find the Town Judge

Easy

A town has n people, labeled from 1 to n. A rumor says one of them is secretly the town judge. If the judge exists, then:

  1. The judge trusts nobody.
  2. Everybody else trusts the judge.
  3. Exactly one person fits both of these rules.

You are given an array trust, where trust[i] = [a_i, b_i] means person a_i trusts person b_i. If a pair isn't in trust, that trust doesn't exist.

Return the label of the town judge, or -1 if the judge doesn't exist.

Examples

Example 1

Input:  n = 2, trust = [[1,2]]
Output: 2

Person 1 trusts person 2, and person 2 trusts nobody. Person 2 fits both rules.

Example 2

Input:  n = 3, trust = [[1,3],[2,3]]
Output: 3

Persons 1 and 2 both trust person 3, and person 3 trusts nobody.

Example 3

Input:  n = 3, trust = [[1,3],[2,3],[3,1]]
Output: -1

Everybody else trusts person 3, but person 3 trusts person 1, which breaks the first rule. So there is no judge.

Example 2: judge is 3123Everyone trusts 3.3 trusts nobody.Example 3: no judge1233 trusts 1, so 3 breaksthe first rule.

Example 4

Input:  n = 1, trust = []
Output: 1

Person 1 trusts nobody, and there is nobody else who needs to trust them. A town of one has a judge.

Example 5

Input:  n = 3, trust = [[1,2]]
Output: -1

Person 2 trusts nobody, but person 3 doesn't trust person 2. Trusting nobody isn't enough on its own.

Constraints

  • 1 <= n <= 1000
  • 0 <= trust.length <= 10^4
  • trust[i].length == 2
  • All the pairs in trust are unique.
  • a_i != b_i
  • 1 <= a_i, b_i <= n
TypeScript
Loading editor…
Test cases40
Case 1
n = 2
trust = [[1,2]]
Case 2
n = 3
trust = [[1,3],[2,3]]
Case 3
n = 3
trust = [[1,3],[2,3],[3,1]]
Case 4
n = 1
trust = []
Case 5
n = 3
trust = [[1,2]]
Case 6
n = 2
trust = []
Case 7
n = 2
trust = [[2,1]]
Case 8
n = 2
trust = [[1,2],[2,1]]
Case 9
n = 3
trust = [[1,2],[2,3]]
Case 10
n = 3
trust = [[1,2],[2,3],[3,1]]
Case 11
n = 3
trust = [[1,3],[2,3],[1,2]]
Case 12
n = 3
trust = [[2,1],[3,1]]
Case 13
n = 3
trust = [[1,2],[3,2]]
Case 14
n = 3
trust = []
Case 15
n = 4
trust = [[1,3],[1,4],[2,3],[2,4],[4,3]]
Case 16
n = 4
trust = [[1,2],[1,3],[1,4]]
Case 17
n = 4
trust = [[1,4],[2,4],[3,4],[1,2],[1,3],[2,3]]
Case 18
n = 5
trust = [[1,5],[2,5],[3,5]]
Case 19
n = 5
trust = [[1,5],[2,5],[3,5],[4,5],[5,4]]
Case 20
n = 4
trust = [[1,2],[2,1],[3,4],[4,3]]
Case 21
n = 4
trust = [[1,3],[2,3],[4,3],[1,2],[2,1]]
Case 22
n = 4
trust = [[1,3],[2,3]]
Case 23
n = 4
trust = [[1,2],[1,3],[2,1],[2,3],[3,1],[3,2]]
Case 24
n = 5
trust = [[5,1],[3,1],[4,5],[2,1],[3,2],[4,1]]
Case 25
n = 5
trust = [[3,1],[4,3],[3,2],[5,2],[1,2],[3,5]]
Case 26
n = 5
trust = [[4,1],[5,2],[1,3],[1,2],[3,2],[5,1],[2,3],[4,2]]
Case 27
n = 8
trust = [[4,6],[8,1],[2,4],[2,7],[8,5],[8,6],[2,6],[1,7],[3,6],[5,6],[8,2],[7,6],[1,6],[8,4]]
Case 28
n = 8
trust = [[5,2],[5,4],[1,3],[3,4],[7,4],[6,5],[6,4],[2,7],[7,5],[7,8],[3,6],[8,5],[6,3],[8,4],[1,4]]
Case 29
n = 8
trust = [[3,5],[4,5],[8,3],[8,2],[3,2],[1,5],[6,5],[2,5],[3,6],[7,3],[4,1],[6,8],[8,5],[1,3],[2,3],[7,5],[6,3],[5,7]]
Case 30
n = 13
trust = [[2,11],[3,7],[10,3],[9,10],[4,7],[8,9],[8,12],[1,5],[4,8],[2,5],[2,10],[13,9],[11,7],[13,7],[2,7],[9,5],[2,12],[6,7],[8,3],[11,10],[8,11],[10,7],[1,7],[12,7],[5,7],[13,10],[12,10],[2,4],[8,7],[9,7],[11,8]]
Case 31
n = 13
trust = [[8,10],[12,10],[13,10],[5,10],[8,6],[7,10],[9,10],[6,7],[2,10],[7,11],[3,5],[4,10],[1,10],[11,9],[13,8],[8,11],[9,2],[11,6],[3,6],[4,8],[5,8],[4,7],[6,10],[9,13],[2,12],[9,6],[4,3],[9,1],[3,10],[13,12]]
Case 32
n = 13
trust = [[13,12],[1,2],[5,10],[10,7],[13,8],[8,10],[1,7],[11,1],[7,2],[10,12],[6,3],[8,12],[1,8],[1,12],[5,12],[6,12],[8,13],[6,10],[3,12],[11,12],[3,4],[9,13],[3,5],[9,12],[13,1],[4,11],[11,13],[7,12],[4,12],[11,7],[2,12],[13,3],[12,9]]
Case 33
n = 30
trust = [[19,30],[5,15],[7,15],[27,19],[16,9],[18,27],[6,15],[28,15],[25,16],[24,23],[29,19],[16,12],[19,15],[20,19],[26,30],[27,22],[25,27],[1,15],[1,20],[18,15],[25,13],[25,15],[4,15],[22,28],[23,15],[14,15],[11,16],[25,2],[23,24],[10,15],[29,15],[26,11],[6,23],[1,30],[8,15],[18,29],[26,25],[1,28],[27,15],[2,22],[22,15],[11,22],[9,15],[21,15],[8,6],[20,15],[17,15],[22,16],[10,27],[24,12],[21,7],[12,15],[27,6],[3,15],[21,12],[24,15],[2,15],[26,15],[28,25],[8,12],[16,15],[26,8],[5,25],[11,15],[13,15],[30,15]]
Case 34
n = 30
trust = [[8,11],[21,30],[24,11],[14,3],[5,21],[3,11],[7,11],[13,11],[21,24],[9,11],[26,21],[3,4],[15,29],[25,11],[12,11],[4,11],[14,12],[30,11],[27,11],[25,6],[20,30],[26,11],[8,20],[28,11],[14,11],[19,11],[2,11],[19,7],[29,11],[22,26],[13,2],[17,18],[8,12],[3,23],[3,26],[28,3],[6,11],[18,11],[16,1],[7,18],[15,11],[27,10],[1,11],[16,27],[20,11],[5,11],[10,9],[27,22],[10,30],[4,21],[21,11],[10,22],[13,1],[8,4],[23,11],[13,23],[26,13],[19,16],[1,6],[27,20],[16,11],[18,12],[14,18],[6,19],[10,11],[17,11],[21,25]]
Case 35
n = 30
trust = [[2,17],[10,19],[2,27],[20,18],[17,14],[13,8],[5,19],[8,19],[15,5],[27,5],[30,19],[23,19],[1,28],[22,19],[17,19],[19,10],[21,4],[27,19],[15,2],[17,28],[29,19],[20,19],[24,19],[18,19],[7,29],[14,19],[12,19],[15,19],[28,4],[16,19],[26,19],[25,19],[11,19],[15,24],[6,19],[22,10],[14,24],[10,15],[6,13],[23,20],[14,26],[28,19],[1,19],[2,19],[7,19],[26,15],[27,21],[24,10],[12,27],[2,7],[9,19],[18,15],[16,2],[23,7],[3,19],[21,19],[4,19],[29,8],[25,22],[13,19],[21,15],[5,13],[20,3],[11,6],[20,10],[9,4],[30,11],[5,29]]
Case 36
n = 6
trust = [[1,2],[1,3],[1,5],[2,1],[3,2],[3,4],[4,1],[5,1],[5,6],[6,1],[6,3]]
Case 37
n = 9
trust = [[1,7],[2,4],[2,6],[2,7],[2,9],[3,1],[3,5],[4,5],[4,8],[4,9],[5,3],[6,8],[7,1],[7,9],[9,1],[9,5]]
Case 38
n = 15
trust = [[1,4],[1,8],[4,2],[5,6],[5,10],[5,12],[5,14],[6,1],[7,1],[7,2],[7,6],[7,13],[8,11],[9,1],[9,4],[9,7],[9,12],[10,1],[10,6],[10,15],[11,6],[11,9],[12,4],[12,15],[13,2],[14,5],[14,13],[15,5],[15,13]]
Case 39
n = 1000
trust = [[830,648],[899,648],[507,648],[79,648],[857,716],[198,648],[781,648],[100,648],[620,648],[993,648],[210,648],[243,648],[82,648],[541,648],[292,648],[567,648],[693,648],[353,648],[306,648],[920,648],[273,241],[589,36],[498,648],[450,648],[87,648],[368,648],[318,648],[640,648],[739,648],[294,648],[80,648],[692,367],[235,648],[468,648],[616,648],[175,648],[262,648],[158,648],[381,648],[840,648],[107,648],[652,648],[856,648],[692,648],[492,648],[762,648],[957,648],[237,648],[804,648],[937,648],[469,535],[667,648],[283,648],[917,648],[95,648],[482,648],[427,648],[888,648],[958,648],[662,648],[573,923],[39,648],[523,648],[367,648],[171,648],[543,648],[431,648],[829,648],[104,648],[489,648],[8,648],[569,648],[478,648],[997,648],[200,648],[188,54],[130,648],[216,648],[721,648],[643,648],[934,764],[77,648],[844,648],[134,774],[846,648],[58,648],[45,648],[632,648],[913,648],[591,648],[340,498],[936,648],[340,648],[810,648],[646,648],[768,648],[528,648],[799,648],[544,648],[658,648],[273,648],[819,648],[473,648],[679,648],[279,648],[790,648],[807,648],[265,648],[518,648],[326,970],[904,648],[161,648],[483,648],[9,648],[227,648],[506,648],[66,648],[114,648],[88,648],[423,648],[823,648],[30,648],[257,648],[919,648],[584,648],[287,648],[909,648],[477,648],[864,648],[944,648],[136,648],[713,648],[738,648],[454,648],[334,101],[356,648],[363,648],[52,648],[55,648],[50,648],[250,325],[971,648],[488,648],[348,648],[174,648],[377,648],[64,648],[187,648],[218,648],[893,648],[872,648],[566,648],[761,648],[653,648],[895,648],[328,648],[762,417],[278,648],[554,648],[540,648],[963,648],[817,648],[894,1],[417,648],[749,648],[48,648],[284,648],[910,648],[772,648],[849,648],[873,648],[579,648],[251,648],[751,648],[824,648],[402,648],[947,648],[205,648],[931,648],[979,581],[915,648],[694,648],[647,648],[415,648],[961,648],[414,618],[657,648],[594,648],[570,648],[358,648],[837,648],[545,648],[4,648],[411,648],[467,648],[815,648],[682,648],[319,648],[609,648],[61,648],[401,648],[137,605],[365,975],[391,648],[624,648],[456,648],[341,648],[812,648],[357,32],[395,648],[443,648],[362,648],[874,648],[149,886],[465,648],[274,648],[777,648],[462,648],[434,648],[841,648],[972,648],[832,648],[724,648],[675,581],[875,356],[92,648],[984,648],[740,648],[946,648],[512,648],[290,648],[466,648],[633,648],[795,648],[12,648],[342,246],[935,648],[941,648],[717,648],[805,648],[615,648],[669,648],[591,163],[814,648],[245,648],[387,648],[828,648],[924,278],[533,648],[688,648],[775,648],[600,648],[555,648],[153,674],[877,648],[336,763],[560,697],[172,648],[53,648],[475,648],[338,648],[991,648],[900,67],[524,648],[995,648],[938,435],[916,648],[513,648],[770,648],[953,648],[385,648],[230,648],[811,648],[701,648],[375,648],[132,648],[276,648],[254,648],[989,409],[606,648],[852,648],[605,648],[522,648],[885,648],[34,648],[41,648],[654,648],[477,483],[853,648],[185,648],[825,677],[128,273],[98,648],[458,648],[896,648],[516,739],[976,648],[716,648],[950,581],[40,648],[408,648],[592,648],[293,648],[5,648],[449,648],[420,648],[720,648],[992,262],[864,154],[409,648],[912,648],[503,525],[102,648],[731,648],[84,648],[538,209],[60,648],[631,648],[461,648],[564,648],[99,648],[562,648],[901,648],[308,648],[295,648],[24,648],[801,648],[148,648],[626,648],[77,525],[833,648],[366,648],[314,648],[369,648],[743,648],[128,648],[561,896],[580,648],[614,648],[691,648],[934,648],[649,648],[875,648],[242,648],[156,648],[58,467],[787,142],[980,648],[846,370],[607,648],[206,648],[706,648],[527,648],[551,648],[463,648],[138,648],[699,648],[384,648],[961,9],[437,648],[582,648],[486,648],[382,648],[268,648],[558,648],[372,150],[145,648],[260,648],[225,648],[196,648],[660,648],[330,648],[154,648],[249,648],[96,128],[267,648],[407,648],[403,648],[366,725],[204,648],[928,648],[118,648],[529,648],[583,648],[97,648],[336,648],[269,648],[497,648],[160,648],[440,648],[650,648],[638,648],[742,648],[966,648],[400,648],[441,648],[636,648],[857,648],[203,648],[211,648],[780,648],[151,648],[493,648],[233,648],[346,648],[109,648],[745,648],[479,648],[855,648],[152,648],[593,648],[678,648],[502,648],[981,648],[143,648],[967,648],[736,654],[758,648],[818,648],[869,648],[15,648],[900,648],[548,648],[47,648],[723,648],[291,648],[664,648],[726,648],[984,851],[578,648],[788,55],[989,648],[686,648],[680,648],[839,648],[746,648],[733,648],[474,648],[836,648],[703,648],[131,648],[750,179],[380,648],[344,648],[927,648],[296,648],[816,648],[323,648],[162,648],[849,65],[378,648],[622,613],[870,648],[389,648],[425,648],[767,648],[612,648],[444,648],[107,854],[897,648],[83,648],[300,648],[986,648],[7,648],[370,648],[975,648],[252,648],[79,623],[628,648],[557,648],[255,631],[68,648],[750,648],[201,648],[480,648],[813,188],[371,648],[485,648],[814,654],[435,648],[133,38],[349,648],[921,648],[359,648],[709,648],[73,648],[938,648],[668,593],[412,648],[988,648],[508,648],[31,648],[246,648],[803,648],[982,648],[159,648],[147,648],[317,648],[729,648],[848,648],[755,648],[666,648],[144,648],[867,648],[13,648],[610,648],[845,648],[86,648],[153,648],[504,648],[542,648],[535,648],[37,648],[357,648],[166,648],[861,648],[999,529],[33,648],[945,648],[798,648],[487,648],[634,648],[511,648],[120,648],[10,648],[670,648],[190,648],[163,648],[202,648],[714,648],[939,648],[741,648],[956,648],[994,648],[491,648],[277,648],[466,380],[137,648],[825,648],[940,648],[834,648],[409,864],[1,648],[220,648],[841,110],[398,648],[281,648],[180,648],[374,924],[516,648],[663,648],[978,648],[563,648],[892,648],[730,648],[923,648],[464,648],[704,648],[747,511],[525,648],[101,648],[863,648],[655,648],[197,648],[561,648],[176,648],[907,648],[113,648],[715,648],[659,648],[748,648],[123,648],[332,480],[735,648],[914,165],[191,648],[14,648],[46,648],[740,491],[155,648],[969,648],[396,648],[890,648],[342,648],[539,648],[882,648],[718,648],[422,648],[948,648],[808,222],[71,648],[442,648],[697,648],[149,648],[517,648],[364,648],[500,648],[859,648],[656,648],[3,648],[903,648],[290,898],[78,648],[36,648],[72,656],[736,648],[181,648],[23,648],[494,648],[681,648],[142,648],[74,648],[345,648],[81,623],[588,648],[826,648],[602,648],[908,648],[684,648],[386,648],[76,648],[484,648],[133,648],[973,648],[49,648],[522,356],[27,743],[301,648],[327,648],[587,648],[772,731],[390,648],[519,648],[195,648],[286,648],[883,648],[289,648],[791,574],[774,648],[428,648],[572,648],[639,648],[419,648],[756,648],[111,648],[970,648],[884,648],[635,648],[329,648],[1000,648],[792,648],[410,648],[573,33],[355,648],[979,578],[701,875],[93,648],[800,648],[372,648],[29,648],[996,648],[72,648],[736,218],[316,648],[858,648],[433,648],[42,648],[821,648],[413,648],[676,648],[305,648],[641,648],[860,648],[350,648],[455,648],[310,648],[241,648],[802,648],[302,964],[672,648],[789,648],[608,648],[727,648],[213,648],[754,648],[737,648],[302,648],[922,648],[575,648],[221,648],[881,648],[192,648],[406,648],[62,648],[125,648],[476,648],[880,648],[90,648],[537,648],[258,648],[677,648],[26,648],[914,648],[546,648],[266,648],[665,483],[141,648],[263,648],[363,934],[365,648],[573,648],[457,648],[630,648],[495,648],[51,648],[86,305],[94,648],[124,648],[598,648],[942,648],[244,648],[622,648],[577,648],[272,648],[868,648],[281,27],[760,648],[108,694],[791,648],[698,648],[752,648],[275,648],[710,648],[509,648],[261,648],[621,962],[866,648],[835,648],[288,648],[878,648],[687,648],[711,648],[25,648],[763,648],[734,648],[665,648],[964,769],[222,648],[57,159],[297,648],[425,366],[962,648],[865,648],[116,648],[247,648],[861,132],[585,648],[851,648],[334,648],[339,648],[96,648],[935,130],[259,648],[110,648],[299,648],[459,648],[728,648],[105,648],[871,648],[601,648],[451,648],[547,648],[217,210],[569,119],[611,648],[708,648],[351,648],[642,65],[843,648],[806,648],[237,46],[549,648],[360,648],[248,648],[19,648],[520,648],[320,648],[661,648],[308,121],[599,648],[886,648],[361,648],[842,648],[331,648],[179,648],[443,957],[651,648],[81,648],[675,648],[820,648],[571,60],[76,63],[165,648],[298,648],[440,357],[538,648],[889,648],[146,648],[469,648],[707,648],[621,648],[854,648],[103,648],[589,648],[250,648],[576,648],[597,648],[959,648],[122,648],[199,648],[188,648],[499,648],[460,648],[182,648],[876,648],[183,648],[226,648],[796,648],[121,648],[905,648],[753,648],[887,648],[70,648],[685,648],[150,648],[809,648],[771,571],[532,648],[6,648],[481,648],[950,648],[846,123],[862,648],[705,648],[194,648],[786,648],[405,648],[930,648],[983,648],[771,648],[321,648],[106,648],[35,648],[560,648],[737,45],[794,648],[565,139],[778,648],[399,648],[943,648],[167,648],[16,648],[952,648],[89,648],[759,418],[759,648],[256,648],[219,648],[129,648],[676,833],[56,648],[604,648],[924,630],[985,648],[671,648],[304,648],[396,16],[232,648],[951,648],[550,648],[514,648],[772,692],[63,648],[505,648],[990,648],[776,648],[43,648],[43,257],[439,648],[521,648],[813,648],[819,678],[193,648],[170,648],[309,648],[531,648],[556,648],[906,648],[501,648],[212,648],[747,648],[394,648],[960,648],[702,648],[999,648],[897,775],[954,648],[436,648],[568,648],[453,648],[312,786],[668,648],[637,648],[44,648],[326,648],[169,648],[534,648],[642,648],[393,648],[184,648],[379,648],[164,648],[207,648],[779,648],[228,648],[614,179],[424,648],[507,793],[445,648],[126,648],[397,648],[503,648],[693,256],[689,648],[891,648],[764,648],[578,981],[722,648],[325,648],[757,648],[879,648],[67,648],[231,648],[114,643],[644,648],[696,648],[215,648],[827,648],[490,648],[894,648],[282,648],[452,648],[590,648],[631,766],[57,648],[303,648],[472,648],[2,648],[902,648],[977,648],[186,648],[430,648],[421,648],[838,648],[243,377],[987,648],[751,854],[115,648],[929,648],[924,648],[783,648],[501,740],[612,336],[374,648],[119,648],[629,648],[565,648],[689,547],[385,301],[322,648],[429,648],[769,648],[559,648],[964,648],[536,648],[352,648],[239,648],[674,648],[32,648],[595,648],[223,648],[178,710],[328,256],[214,648],[392,648],[238,648],[847,648],[788,648],[177,648],[404,648],[732,648],[112,648],[574,648],[808,648],[38,648],[198,142],[478,240],[240,648],[178,648],[255,648],[712,648],[280,648],[3,946],[669,82],[234,648],[623,648],[347,648],[418,648],[337,648],[157,648],[744,648],[224,648],[446,648],[469,948],[627,648],[968,648],[979,648],[388,648],[134,648],[629,699],[324,648],[229,648],[117,648],[432,648],[530,648],[932,648],[208,648],[313,648],[189,648],[173,648],[719,648],[619,648],[933,648],[911,648],[18,648],[285,648],[552,648],[526,648],[311,648],[690,648],[773,648],[737,146],[465,371],[28,648],[65,648],[36,37],[965,648],[253,648],[625,648],[992,648],[700,648],[209,648],[955,648],[217,648],[793,648],[766,648],[603,648],[333,648],[797,648],[438,648],[586,648],[571,648],[264,648],[465,749],[139,648],[949,648],[695,648],[596,182],[581,648],[998,648],[376,648],[332,648],[271,648],[515,648],[617,648],[270,648],[787,648],[22,648],[135,648],[343,648],[168,648],[85,648],[140,648],[75,648],[683,648],[69,648],[765,648],[510,648],[416,648],[613,648],[925,648],[447,648],[27,648],[918,648],[20,648],[822,648],[120,645],[470,648],[21,648],[426,648],[312,648],[837,836],[59,648],[471,648],[898,648],[127,648],[57,187],[785,648],[831,648],[448,648],[307,648],[354,648],[513,489],[782,648],[645,648],[335,648],[553,648],[414,648],[108,648],[974,648],[725,648],[926,648],[373,648],[496,648],[310,51],[11,648],[17,648],[850,648],[54,648],[596,648],[315,648],[314,949],[383,648],[91,648],[784,648],[673,648],[618,648],[236,648],[154,746]]
Case 40
n = 1000
trust = [[424,872],[782,872],[490,872],[204,872],[947,872],[572,872],[571,872],[103,872],[70,872],[998,872],[311,872],[120,872],[295,583],[119,872],[276,872],[726,388],[982,872],[79,872],[138,872],[784,872],[83,872],[919,872],[201,872],[718,872],[34,872],[570,872],[656,872],[342,216],[764,872],[875,872],[584,872],[462,872],[840,872],[831,872],[391,872],[453,872],[714,872],[330,872],[871,872],[920,872],[516,11],[776,872],[768,872],[899,872],[457,872],[616,872],[428,872],[265,872],[85,872],[958,872],[151,872],[735,872],[401,872],[777,872],[526,872],[12,872],[93,194],[668,872],[331,872],[607,864],[305,872],[446,872],[489,872],[333,872],[202,872],[313,872],[688,872],[240,872],[378,872],[90,872],[206,377],[528,872],[897,872],[971,872],[719,872],[402,872],[465,872],[523,872],[712,872],[107,872],[150,872],[323,872],[979,872],[662,872],[248,872],[694,872],[370,872],[960,872],[620,872],[152,872],[956,872],[935,872],[386,872],[654,872],[657,872],[556,872],[744,872],[435,872],[222,988],[794,872],[550,872],[124,872],[502,872],[395,872],[887,872],[433,872],[449,872],[703,872],[69,872],[554,872],[952,872],[186,872],[646,798],[420,872],[129,872],[915,872],[909,872],[828,872],[590,872],[178,872],[479,872],[855,872],[160,872],[423,872],[633,872],[864,872],[854,872],[162,872],[910,872],[407,872],[511,872],[923,872],[861,872],[665,872],[254,872],[211,872],[326,872],[454,88],[808,872],[88,872],[252,872],[806,872],[51,872],[95,872],[969,872],[56,872],[45,872],[516,872],[917,872],[534,872],[610,872],[127,872],[683,872],[594,872],[421,808],[243,872],[748,872],[879,872],[981,872],[522,872],[573,872],[432,872],[473,872],[8,872],[939,872],[13,872],[851,872],[358,872],[93,872],[97,872],[532,872],[842,872],[907,872],[82,953],[987,872],[557,872],[932,872],[44,950],[354,872],[645,872],[721,872],[91,872],[267,872],[994,872],[464,872],[757,872],[415,872],[778,872],[741,872],[804,872],[155,872],[700,872],[459,872],[884,872],[708,872],[177,991],[289,872],[675,872],[890,872],[802,872],[672,872],[796,872],[444,872],[533,872],[427,872],[476,872],[836,872],[582,872],[967,872],[9,872],[336,872],[42,872],[89,872],[54,872],[833,872],[413,872],[216,872],[825,872],[903,872],[225,872],[763,872],[996,872],[866,872],[74,872],[486,25],[619,872],[33,872],[648,872],[94,872],[304,872],[293,872],[471,872],[228,872],[35,872],[7,872],[3,872],[352,872],[638,872],[81,872],[753,872],[369,872],[141,872],[727,872],[604,872],[258,872],[100,872],[733,872],[701,872],[209,872],[105,872],[245,872],[510,872],[375,872],[134,872],[2,872],[238,872],[581,872],[310,872],[891,872],[434,872],[652,872],[650,872],[506,689],[664,872],[467,872],[346,872],[377,872],[389,872],[586,872],[671,872],[231,872],[306,872],[665,282],[766,872],[276,609],[373,872],[983,872],[408,872],[538,872],[546,872],[717,872],[770,872],[390,872],[342,872],[122,872],[438,872],[417,872],[233,872],[57,872],[60,872],[826,872],[376,872],[863,872],[322,872],[87,872],[219,872],[867,872],[563,872],[275,872],[64,872],[820,872],[739,872],[374,872],[206,872],[307,872],[761,872],[170,872],[647,872],[995,872],[66,872],[241,872],[613,872],[795,872],[501,872],[713,872],[937,872],[798,872],[104,872],[540,872],[942,872],[488,872],[519,872],[213,872],[888,872],[1,872],[494,872],[335,872],[817,872],[799,872],[830,872],[414,872],[46,872],[788,872],[811,872],[643,872],[558,872],[277,872],[450,22],[117,872],[48,872],[283,872],[885,872],[785,872],[853,872],[27,872],[345,872],[329,872],[893,872],[298,872],[912,872],[687,872],[974,872],[707,872],[44,872],[623,872],[559,872],[886,872],[282,872],[485,872],[106,872],[914,872],[398,872],[922,872],[622,872],[237,872],[518,872],[988,872],[407,740],[549,872],[697,68],[266,872],[229,872],[260,872],[685,872],[26,872],[725,872],[809,872],[354,377],[499,872],[589,872],[154,872],[269,872],[30,872],[264,872],[148,872],[177,872],[601,872],[627,872],[290,560],[797,872],[111,872],[739,155],[810,872],[272,872],[580,872],[372,872],[882,872],[760,872],[548,872],[296,872],[139,872],[984,872],[351,872],[363,872],[856,872],[839,872],[860,872],[731,872],[973,872],[145,647],[949,872],[592,872],[29,872],[525,872],[807,872],[676,872],[834,872],[560,872],[824,872],[270,872],[943,872],[762,744],[497,872],[771,872],[493,872],[295,872],[353,872],[121,872],[698,872],[159,872],[759,872],[403,872],[894,872],[460,872],[255,872],[37,872],[193,872],[953,872],[827,872],[286,872],[78,872],[585,872],[350,872],[535,872],[349,872],[31,872],[75,872],[545,872],[406,872],[325,872],[412,872],[498,872],[896,872],[1000,872],[815,872],[11,872],[985,872],[426,872],[316,872],[256,872],[615,872],[367,872],[738,872],[587,872],[337,872],[217,872],[814,872],[500,872],[631,872],[145,872],[962,872],[691,872],[16,872],[72,872],[61,872],[147,872],[754,872],[207,872],[566,872],[651,872],[537,872],[196,872],[267,858],[359,872],[682,872],[165,872],[795,497],[25,872],[934,872],[536,872],[442,872],[644,872],[745,872],[977,872],[84,872],[76,872],[185,872],[940,872],[950,872],[112,872],[756,872],[452,872],[702,872],[670,872],[605,872],[169,872],[709,872],[660,872],[773,872],[261,872],[20,872],[938,280],[758,872],[136,769],[28,872],[55,872],[749,872],[997,288],[166,872],[164,872],[274,872],[386,837],[172,872],[859,872],[792,872],[110,872],[63,872],[312,872],[251,872],[380,872],[239,872],[195,872],[539,872],[531,872],[324,872],[986,872],[470,872],[101,872],[515,872],[118,872],[341,872],[640,872],[951,872],[371,872],[737,872],[816,872],[328,872],[541,872],[732,872],[297,872],[579,872],[400,872],[506,872],[722,872],[780,872],[437,872],[382,872],[774,872],[367,98],[36,872],[678,872],[361,872],[551,872],[321,872],[553,872],[234,872],[847,872],[848,872],[381,872],[800,872],[723,872],[32,872],[921,872],[68,872],[173,872],[823,872],[730,872],[279,872],[167,872],[978,872],[273,872],[576,872],[880,872],[669,872],[268,872],[6,872],[348,872],[547,872],[15,872],[102,872],[552,872],[447,872],[461,872],[990,872],[59,872],[422,872],[901,872],[477,872],[387,872],[544,872],[869,872],[643,461],[674,872],[131,872],[617,872],[143,872],[1,502],[404,872],[212,872],[5,872],[491,872],[976,872],[924,872],[972,872],[877,872],[226,872],[625,872],[344,872],[474,872],[908,872],[504,872],[959,872],[772,872],[621,872],[259,872],[224,872],[791,872],[843,872],[954,872],[290,872],[405,872],[682,816],[635,872],[218,872],[783,872],[577,872],[564,872],[484,872],[747,872],[600,872],[955,421],[679,872],[970,872],[595,658],[411,872],[62,872],[689,872],[641,872],[938,872],[913,872],[109,872],[429,872],[813,872],[347,872],[308,872],[146,872],[257,872],[456,872],[752,872],[96,872],[339,872],[569,872],[812,872],[441,872],[844,156],[214,872],[775,872],[431,872],[71,872],[779,872],[194,872],[392,872],[924,658],[231,27],[509,872],[292,872],[755,872],[838,872],[73,872],[684,872],[929,872],[319,872],[203,872],[769,872],[553,732],[905,872],[210,872],[707,18],[300,872],[975,872],[837,872],[603,872],[302,872],[726,872],[508,872],[997,872],[123,872],[200,872],[291,872],[18,872],[315,872],[115,872],[706,872],[356,872],[445,872],[966,872],[543,872],[672,959],[184,872],[716,872],[659,872],[822,872],[67,872],[705,872],[481,872],[343,872],[618,599],[77,872],[158,872],[50,872],[357,872],[946,872],[475,872],[930,872],[911,872],[82,872],[174,872],[902,872],[41,872],[608,872],[874,872],[783,597],[728,872],[999,872],[565,872],[681,872],[53,872],[667,872],[230,872],[527,872],[284,872],[136,872],[835,872],[17,872],[790,872],[137,872],[742,872],[383,872],[593,872],[805,872],[787,872],[750,872],[448,872],[176,872],[964,872],[574,872],[980,872],[649,872],[22,872],[591,872],[397,872],[469,872],[646,872],[227,872],[595,872],[215,872],[51,698],[810,585],[632,872],[40,872],[588,872],[190,872],[561,872],[699,872],[199,872],[933,872],[221,872],[235,872],[399,872],[285,872],[862,872],[781,872],[530,872],[524,872],[948,872],[637,872],[841,872],[505,872],[693,872],[65,872],[113,872],[368,872],[611,872],[740,872],[495,872],[287,872],[690,872],[686,872],[895,872],[614,872],[789,872],[793,872],[281,872],[786,872],[220,872],[309,872],[612,872],[247,872],[179,872],[468,872],[936,872],[658,872],[384,872],[751,872],[881,872],[602,872],[318,872],[108,872],[567,872],[734,872],[849,872],[696,872],[695,872],[993,872],[385,872],[320,872],[140,872],[578,872],[868,872],[963,872],[24,872],[278,872],[968,5],[10,872],[628,872],[314,872],[171,872],[396,872],[630,872],[19,872],[472,872],[496,872],[514,872],[639,872],[240,270],[126,872],[803,872],[512,872],[451,872],[153,872],[443,872],[425,872],[378,143],[529,872],[223,872],[208,872],[338,872],[294,872],[542,872],[845,872],[362,872],[673,872],[242,872],[704,872],[483,872],[873,872],[125,872],[598,872],[249,872],[280,872],[161,872],[180,872],[4,872],[829,872],[513,872],[271,872],[39,872],[416,872],[482,872],[450,872],[189,872],[858,872],[154,489],[618,872],[168,872],[517,872],[629,872],[916,872],[458,872],[821,872],[715,872],[418,872],[680,872],[188,872],[340,872],[844,872],[31,622],[724,872],[38,872],[818,872],[765,872],[130,872],[394,872],[49,872],[487,872],[222,872],[606,872],[410,872],[98,961],[419,872],[720,872],[801,872],[299,872],[232,872],[870,872],[575,872],[957,872],[14,872],[334,872],[925,872],[98,872],[244,872],[677,872],[865,872],[736,872],[360,872],[850,872],[236,872],[156,872],[596,872],[878,872],[918,872],[846,872],[583,872],[892,872],[58,872],[692,872],[568,872],[187,872],[661,872],[192,872],[961,872],[23,872],[114,872],[455,872],[478,872],[597,872],[191,872],[253,872],[135,872],[819,872],[132,872],[710,872],[43,872],[507,872],[847,231],[99,872],[364,872],[609,872],[521,872],[133,872],[262,872],[928,872],[182,872],[931,872],[992,872],[440,872],[857,872],[80,872],[607,872],[47,872],[772,767],[697,872],[2,643],[898,872],[655,872],[157,872],[430,872],[941,872],[991,872],[163,872],[86,872],[366,872],[317,872],[555,872],[520,872],[667,393],[832,872],[250,872],[183,872],[263,872],[246,872],[175,872],[116,872],[149,872],[767,872],[332,872],[379,872],[21,872],[439,872],[205,872],[198,872],[454,872],[906,872],[499,832],[876,872],[653,872],[663,872],[142,872],[480,872],[889,872],[327,872],[729,872],[303,872],[762,872],[52,872],[409,872],[666,872],[98,796],[128,872],[181,872],[624,872],[944,872],[92,872],[926,872],[355,872],[421,872],[463,872],[562,872],[466,872],[197,872],[144,872],[393,872],[852,872],[945,872],[968,872],[288,872],[301,872],[388,872],[743,872],[599,872],[746,872],[989,872],[642,872],[636,872],[634,872],[486,872],[883,872],[965,872],[365,872],[927,872],[711,872],[436,872],[626,872],[503,872],[492,872],[955,872],[904,872]]