xiaomianao666

小程序:哔嘀影视

Jun 18th, 2024
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 海阔视界规则分享,当前分享的是:小程序¥home_rule_v2¥base64://@哔嘀影视@eyJsYXN0X2NoYXB0ZXJfcnVsZSI6IiIsInRpdGxlIjoi5ZOU5ZiA5b2x6KeGIiwiYXV0aG9yIjoiIiwidXJsIjoiaGlrZXI6Ly9lbXB0eSMjZnlwYWdlIiwidmVyc2lvbiI6NSwiY29sX3R5cGUiOiJtb3ZpZV8zIiwiY2xhc3NfbmFtZSI6IiIsInR5cGUiOiJ2aWRlbyIsImNsYXNzX3VybCI6IiIsImFyZWFfbmFtZSI6IiIsImFyZWFfdXJsIjoiIiwic29ydF9uYW1lIjoiIiwieWVhcl9uYW1lIjoiIiwic29ydF91cmwiOiIiLCJ5ZWFyX3VybCI6IiIsImZpbmRfcnVsZSI6ImpzOlxudmFyIGQgPSBbXVxudmFyIHBhZ2UgPSBNWV9QQUdFXG4vL3ZhciBodG1sID0gZmV0Y2goY29uZmlnLmluZGV4ICsgYHMvYWxsLyR7cGFnZX1gKVxuXG5NWV9VUkwgPSBjb25maWcuaW5kZXggKyBgcy9hbGwvJHtwYWdlfWBcblxuLy9jbGVhclZhcihNWV9SVUxFLnRpdGxlICsgJ3VybCcpXG5cbnZhciBnZXRSYW5nZUNvbG9ycyA9IGZ1bmN0aW9uKCkge8KgwqDCoMKgwqDCoMKgXG4gICAgcmV0dXJuICcjJyArICgnMDAwMDAnICsgKE1hdGgucmFuZG9tKCkgKiAweDEwMDAwMDAgPDwgMCkudG9TdHJpbmcoMTYpKS5zdWJzdHIoLTYpO8KgwqDCoMKgwqBcbn1cblxuY29uc3Qg5YiG57G76aKc6ImyID0gZ2V0UmFuZ2VDb2xvcnMoKVxuY29uc3Qg5aSn57G75a6a5L2NID0gJ2JvZHkmJmRpdi5uYXZiYXItZXhwYW5kLW1kJiYubmF2YmFyLW5hdidcbmNvbnN0IOaLvOaOpeWIhu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ArICdcXFwiPicgKyB0aXRsZSArICc8L3NwYW4+PC9iPicgOiB0aXRsZSxcXG4gICAgICAgICAgICAgICAgICAgIHVybDogJChwZChpdGVtLCDliIbnsbvpk77mjqUpICsgJyNub0xvYWRpbmcjJykubGF6eVJ1bGUoKHBhcmFtcykgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBuZXdfY2F0ZSA9IFtdXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFyYW1zLmNhdGVfdGVtcC5mb3JFYWNoKChjYXRlLCBpbmRleCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBuZXdfY2F0ZS5wdXNoKGluZGV4ID09PSAwID8gcGFyYW1zLmtleS50b1N0cmluZygpIDogXFxcIjBcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudGl0bGUsIEpTT04uc3RyaW5naWZ5KG5ld19jYXRlKSlcXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoTVlfUlVMRS50aXRsZSsndXJsJywgaW5wdXQpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UodHJ1ZSlcXG4gICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcImhpa2VyOi8vZW1wdHlcXFwiXFxuICAgICAgICAgICAgICAgICAgICB9LCB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY2F0ZV90ZW1wOiBjYXRlX3RlbXAsXFxuICAgICAgICAgICAgICAgICAgICAgICAga2V5OiBrZXksXFxuICAgICAgICAgICAgICAgICAgICAgICAgcGFnZTogcGFnZSxcXG4gICAgICAgICAgICAgICAgICAgIH0pLFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdzY3JvbGxfYnV0dG9uJyxcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgICAgIGNvbF90eXBlOiBcXFwiYmxhbmtfYmxvY2tcXFwiXFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICB9IGVsc2UgaWYgKGZvbGQgPT09ICcxJykge1xcbiAgICAgICAgICAgIHN1Yl9jYXRlZ29yaWVzLmZvckVhY2goKGl0ZW0sIGtleSkgPT4ge1xcbiAgICAgICAgICAgICAgICBsZXQgdGl0bGUgPSBwZGZoKGl0ZW0sIOWIhuexu+agh+mimClcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiBrZXkudG9TdHJpbmcoKSA9PT0gY2F0ZV90ZW1wW2luZGV4XSA/ICfigJzigJzigJ3igJ08Yj48c3BhbiBzdHlsZT1cXFwiY29sb3I6ICcgKyDliIbnsbvpopzoibIgKyAnXFxcIj4nICsgdGl0bGUgKyAnPC9zcGFuPjwvYj4nIDogdGl0bGUsXFxuICAgICAgICAgICAgICAgICAgICB1cmw6ICQocGQoaXRlbSwg5YiG57G76ZO+5o6lKSArICcjbm9Mb2FkaW5nIycpLmxhenlSdWxlKChwYXJhbXMpID0+IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYXJhbXMuY2F0ZV90ZW1wW3BhcmFtcy5pbmRleF0gPSBwYXJhbXMua2V5LnRvU3RyaW5nKClcXG5cXG4gICAgICAgICAgICAgICAgICAgICAgICBwdXRWYXIoTVlfUlVMRS50aXRsZSwgSlNPTi5zdHJpbmdpZnkocGFyYW1zLmNhdGVfdGVtcCkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcHV0VmFyKE1ZX1JVTEUudGl0bGUrJ3VybCcsIGlucHV0KVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJlZnJlc2hQYWdlKHRydWUpXFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIFxcXCJoaWtlcjovL2VtcHR5XFxcIlxcbiAgICAgICAgICAgICAgICAgICAgfSwge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGNhdGVfdGVtcDogY2F0ZV90ZW1wLFxcbiAgICAgICAgICAgICAgICAgICAgICAgIGluZGV4OiBpbmRleCxcXG4gICAgICAgICAgICAgICAgICAgICAgICBrZXk6IGtleSxcXG4gICAgICAgICAgICAgICAgICAgICAgICBwYWdlOiBwYWdlLFxcbiAgICAgICAgICAgICAgICAgICAgfSksXFxuICAgICAgICAgICAgICAgICAgICBjb2xfdHlwZTogJ3Njcm9sbF9idXR0b24nLFxcbiAgICAgICAgICAgICAgICB9KVxcbiAgICAgICAgICAgIH0pXFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJibGFua19ibG9ja1xcXCJcXG4gICAgICAgICAgICB9KTtcXG4gICAgICAgIH1cXG4gICAgfSlcXG59XFxuXCJ9LHtcImNvbF90eXBlXCI6XCJtb3ZpZV8zXCIsXCJuYW1lXCI6XCLor6bmg4VcIixcInBhdGhcIjpcImRldGFpbHNcIixcInJ1bGVcIjpcImpzOlxcbnJlcXVpcmUoY29uZmlnLnVpKVxcbnZhciByZXMgPSB7fTtcXG52YXIgZCA9IFtdO1xcbnZhciBsaXN0cz1bXTtcXG52YXIgdGFic3M9W107XFxudmFyIGh0bWwgPSBnZXRSZXNDb2RlKCk7XFxudmFyIHRhYnMgPSBwZGZhKGh0bWwsICdib2R5JiZoNCcpO1xcbnZhciBjb250cyA9IHBkZmEoaHRtbCwgJ2JvZHkmJi5tdC0zOmhhcyg6bWF0Y2hlcyjmkq3mlL7liJfooah85LiL6L295Zyw5Z2AfOenjeWtkOS4i+i9vSkpJyk7XFxuXFxuLy9zZXRFcnJvcihjb250cy5sZW5ndGgpO1xcblxcbmZ1bmN0aW9uIGN1dHN0cihzdHIsIGxlbikge1xcbiAgICB2YXIgc3RyX2xlbmd0aCA9IDA7XFxuICAgIHZhciBzdHJfbGVuID0gMDtcXG4gICAgc3RyX2N1dCA9IG5ldyBTdHJ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IjpcIlxcbnZhciBsYXp5ID0gJCgnJykubGF6eVJ1bGUoKCkgPT4ge1xcbiAgICB2YXIgdXJsPWlucHV0O1xcbiAgICB2YXIgaG9tZSA9ICdiZHlzJztcXG4gICAgdmFyIGh0bWwgPSBmZXRjaCh1cmwsIHtcXG4gICAgICAgIGhlYWRlcnM6IHtcXG4gICAgICAgICAgICAnY29va2llJzogZ2V0SXRlbShob21lICsgJ0Nvb2tpZScsICcnKSxcXG4gICAgICAgIH1cXG4gICAgfSlcXG4gICAgaWYgKGh0bWwuaW5jbHVkZXMoJ1BsZWFzZSBjb21wbGV0ZSB0aGUgY2FwdGNoYScpKSB7XFxuICAgICAgICBjbGVhclZhcihob21lICsgJ0Nvb2tpZScpO1xcbiAgICAgICAgY2xlYXJJdGVtKGhvbWUgKyAnQ29va2llJyk7ICAgICAgICBcXG4gICAgICAgIHJldHVybiAkKCdoaWtlcjovL2VtcHR5JykucnVsZSgoaG9tZSwgdXJsKSA9PiB7XFxuICAgICAgICAgICAgdmFyIGQgPSBbXTtcXG4gICAgICAgICAgICB2YXIgY29va2llID0gZ2V0VmFyKGhvbWUgKyAnQ29va2llJywgJycpO1xcbiAgICAgICAgICAgIC8vbG9nKGNvb2tpZSlcXG4gICAgICAgICAgICBpZiAoY29va2llICE9ICcnKSB7XFxuICAgICAgICAgICAgICAgIHNldEl0ZW0oaG9tZSArICdDb29raWUnLCBjb29raWUpO1xcbiAgICAgICAgICAgICAgICBiYWNrKGZhbHNlKTtcXG4gICAgICAgICAgICAgICAgdG9hc3QoJ+mqjOivgeWujOaIkCcpXFxuICAgICAgICAgICAgICAgIHJlZnJlc2hYNVdlYlZpZXcoJ2hpa2VyOi8vZW1wdHknKTtcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgY29sX3R5cGU6IFxcXCJ4NV93ZWJ2aWV3X3NpbmdsZVxcXCIsXFxuICAgICAgICAgICAgICAgIHVybDogdXJsLFxcbiAgICAgICAgICAgICAgICBkZXNjOiBcXFwiZmxvYXQmJjEwMCVcXFwiLFxcbiAgICAgICAgICAgICAgICB0aXRsZTogXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgIGV4dHJhOiB7XFxuICAgICAgICAgICAgICAgICAgICBqczogJC50b1N0cmluZygoaG9tZSwgdXJsKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZWxlbWVudElkID0gXFxcIm1ldGFbcHJvcGVydHk9J29nOnR5cGUnXVxcXCI7IC8vIOW+heajgOafpeeahOWFg+e0oCBJRCBcXG4gICAgICAgICAgICAgICAgICAgICAgICBjb25zdCBpbnRlcnZhbFRpbWUgPSAxMDAwOyAvLyDmr4/pmpQgMSDnp5Lpkp/mo4Dmn6XkuIDmrKEgXFxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgdGltZXIgPSBzZXRJbnRlcnZhbCgoKSA9PiB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGVsZW1lbnQgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKGVsZW1lbnRJZCk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChlbGVtZW50KSB7IC8vIOWtmOWcqOivpeWFg+e0oO+8jOWPr+S7peaJp+ihjOafkOS6m+aTjeS9nCBcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vZmJhLmxvZygn5a2Y5ZyoJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZiYS5yZWZyZXNoWDVEZXNjKCdmbG9hdCYmMCcpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxlbWVudC5zdHlsZS5jb2xvciA9ICdyZWQnO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZmJhLnB1dFZhcihob21lICsgJ0Nvb2tpZScsIGZiYS5nZXRDb29raWUodXJsKSk7ICAgICAgICAgICAgICAgICAgICAgICAgIFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZnlfYnJpZGdlX2FwcC5yZWZyZXNoUGFnZSh0cnVlKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNsZWFySW50ZXJ2YWwodGltZXIpOyAvLyDmuIXpmaTlrprml7blmaggXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy9mYmEubG9nKCfkuI3lrZjlnKgnKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9LCBpbnRlcnZhbFRpbWUpO1xcbiAgICAgICAgICAgICAgICAgICAgfSwgaG9tZSwgdXJsKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfSk7XFxuICAgICAgICAgICAgc2V0SG9tZVJlc3VsdChkKVxcbiAgICAgICAgfSwgaG9tZSwgdXJsKVxcbiAgICB9XFxuICAgIGV2YWwoSlNPTi5wYXJzZShmZXRjaCgnaGlrZXI6Ly9wYWdlL3BhcnNlP3J1bGU95ZOU5ZiA5b2x6KeGJywge30pKS5ydWxlKTtcXG4gICAgcmV0dXJuIHVybDtcXG59KTtcIn0se1wiY29sX3R5cGVcIjpcIm1vdmllXzNcIixcIm5hbWVcIjpcIumqjOivgeeggVwiLFwicGF0aFwiOlwieXptXCIsXCJydWxlXCI6XCJpZihodG1sLmluZGV4T2YoXFxcIui+k+WFpemqjOivgeeggVxcXCIpKXtcXG52YXIgY29kZXVybCA9IGNvbmZpZy5pbmRleCArIHBkZmgoaHRtbCwgJyN2ZXJpZnlDb2RlJiZzcmMnKS5zbGljZSgxKTtcXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICfoh6rliqjor4bliKvlpLHotKXvvIzor7fliLfmlrDph43or5XmiJbogIXmiYvliqjpqozor4EnXFxuICAgICAgICB9KVxcbiAgICAgICAgXFxuICAgICAgICB2YXIgZGljdCA9IHtcXG4gICAgICAgICAgICBteXVybDogc3N1cmwsXFxuICAgICAgICAgICAgdmNvZGU6IGNvZGV1cmxcXG4gICAgICAgIH1cXG5cXG4gICAgICAgIGQucHVzaCh7XFxuICAgICAgICAgICAgdGl0bGU6ICfngrnmiJHmiYvliqjpqozor4EnLFxcbiAgICAgICAgICAgIHVybDogJCgnaGlrZXI6Ly9lbXB0eSMjJykucnVsZSgoZGljdCkgPT4ge1xcbiAgICAgICAgICAgICAgICBzZXRQYWdlVGl0bGUoJ+ivt+i+k+WFpeiuoeeul+e7k+aenCcpO1xcbiAgICAgICAgICAgICAgICB2YXIgZCA9IFtdO1xcbiAgICAgICAgICAgICAgICB2YXIgbXl1cmwgPSBkaWN0Lm15dXJsO1xcbiAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IGZldGNoKG15dXJsKTtcXG4gICAgICAgICAgICAgICAgdmFyIGNvZGV1cmwgPSBjb25maWcuaW5kZXggKyBwZGZoKGh0bWwsICcjdmVyaWZ5Q29kZSYmc3JjJykuc2xpY2UoMSk7XFxuICAgICAgICAgICAgICAgIHZhciBiNjQgPSBjb252ZXJ0QmFzZTY0SW1hZ2UoY29kZXVybClcXG5cXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIGltZzogYjY0LFxcbiAgICAgICAgICAgICAgICAgICAgY29sX3R5cGU6ICdwaWNfMV9mdWxsJyxcXG4gICAgICAgICAgICAgICAgfSlcXG4gICAgICAgICAgICAgICAgZC5wdXNoKHtcXG4gICAgICAgICAgICAgICAgICAgIHRpdGxlOiAn56Gu6K6kJyxcXG4gICAgICAgICAgICAgICAgICAgIGNvbF90eXBlOiAnaW5wdXQnLFxcbiAgICAgICAgICAgICAgICAgICAgdXJsOiAkLnRvU3RyaW5nKChteXVybCkgPT4ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHZhciBjdXJsID0gbXl1cmwgKyAnP2NvZGU9JyArIGlucHV0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vbG9nKGN1cmwpXFxuICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGhlYWRlcnMgPSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFxcXCJVc2VyLUFnZW50XFxcIjogTU9CSUxFX1VBLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBcXFwiUmVmZXJlclxcXCI6IG15dXJsXFxuICAgICAgICAgICAgICAgICAgICAgICAgfTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgaHRtbCA9IGZldGNoKGN1cmwsIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaGVhZGVyczogaGVhZGVycyxcXG4gICAgICAgICAgICAgICAgICAgICAgICB9KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoaHRtbC5pbmRleE9mKCfovpPlhaXpqozor4HnoIEnKSA9PSAtMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB2YXIgY29va2llID0gZ2V0Q29va2llKGN1cmwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBwdXRNeVZhcignY29va2llJywgY29va2llKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYmFjaygpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b2FzdCgn5oiQ5Yqf77yM6K+35Yiw5pCc57Si6aG15Yi35pawJylcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0b2FzdCgn6ZSZ6K+v6K+36YeN6K+VJylcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVmcmVzaFBhZ2UoKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL2VtcHR5J1xcbiAgICAgICAgICAgICAgICAgICAgfSwgbXl1cmwpLFxcbiAgICAgICAgICAgICAgICAgICAgZXh0cmE6IHtcXG4gICAgICAgICAgICAgICAgICAgICAgIC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gICAgICAgICBpZiAoIXQgJiYgYSkgcmV0dXJuIGEoZSwgITApO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGQpIHJldHVybiBkKGUsICEwKTtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBpID0gbmV3IEVycm9yKFxcXCJDYW5ub3QgZmluZCBtb2R1bGUgJ1xcXCIgKyBlICsgXFxcIidcXFwiKTtcXG4gICAgICAgICAgICAgICAgICAgIHRocm93IGkuY29kZSA9IFxcXCJNT0RVTEVfTk9UX0ZPVU5EXFxcIiwgaVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHZhciBuID0gb1tlXSA9IHtcXG4gICAgICAgICAgICAgICAgICAgIGV4cG9ydHM6IHt9XFxuICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgICAgIHNbZV1bMF0uY2FsbChuLmV4cG9ydHMsIGZ1bmN0aW9uKHQpIHtcXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiBoKHNbZV1bMV1bdF0gfHwgdClcXG4gICAgICAgICAgICAgICAgfSwgbiwgbi5leHBvcnRzLCByLCBzLCBvLCBsKVxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICByZXR1cm4gb1tlXS5leHBvcnRzXFxuICAgICAgICB9XFxuICAgICAgICBmb3IgKHZhciBkID0gXFxcImZ1bmN0aW9uXFxcIiA9PSB0eXBlb2YgcmVxdWlyZSAmJiByZXF1aXJlLCB0ID0gMDsgdCA8IGwubGVuZ3RoOyB0KyspIGgobFt0XSk7XFxuICAgICAgICByZXR1cm4gaFxcbiAgICB9KHtcXG4gICAgICAgIDE6IFtmdW5jdGlvbih0LCBlLCBhKSB7XFxuICAgICAgICAgICAgXFxcInVzZSBzdHJpY3RcXFwiO1xcbiAgICAgICAgICAgIHZhciBzID0gdChcXFwiLi96bGliL2RlZmxhdGVcXFwiKSxcXG4gICAgICAgICAgICAgICAgbyA9IHQoXFxcIi4vdXRpbHMvY29tbW9uXFxcIiksXFxuICAgICAgICAgICAgICAgIGwgPSB0KFxcXCIuL3V0aWxzL3N0cmluZ3NcXFwiKSxcXG4gICAgICAgICAgICAgICAgbiA9IHQoXFxcIi4vemxpYi9tZXNzYWdlc1xcXCIpLFxcbiAgICAgICAgICAgICAgICByID0gdChcXFwiLi96bGliL3pzdHJlYW1cXFwiKSxcXG4gICAgICAgICAgICAgICAgaCA9IE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmcsXFxuICAgICAgICAgICAgICAgIGQgPSAwLFxcbiAgICAgICAgICAgICAgICBmID0gLTEsXFxuICAgICAgICAgICAgICAgIF8gPSAwLFxcbiAgICAgICAgICAgICAgICB1ID0gODtcXG5cXG4gICAgICAgICAgICBmdW5jdGlvbiBjKHQpIHtcXG4gICAgICAgICAgICAgICAgaWYgKCEodGhpcyBpbnN0YW5jZW9mIGMpKSByZXR1cm4gbmV3IGModCk7XFxuICAgICAgICAgICAgICAgIHRoaXMub3B0aW9ucyA9IG8uYXNzaWduKHtcXG4gICAgICAgICAgICAgICAgICAgIGxldmVsOiBmLFxcbiAgICAgICAgICAgICAgICAgICAgbWV0aG9kOiB1LFxcbiAgICAgICAgICAgICAgICAgICAgY2h1bmtTaXplOiAxNjM4NCxcXG4gICAgICAgICAgICAgICAgICAgIHdpbmRvd0JpdHM6IDE1LFxcbiAgICAgICAgICAgICAgICAgICAgbWVtTGV2ZWw6IDgsXFxuICAgICAgICAgICAgICAgICAgICBzdHJhdGVneTogXyxcXG4gICAgICAgICAgICAgICAgICAgIHRvOiBcXFwiXFxcIlxcbiAgICAgICAgICAgICAgICB9LCB0IHx8IHt9KTtcXG4gICAgICAgICAgICAgICAgdmFyIGUgPSB0aGlzLm9wdGlvbnM7XFxuICAgICAgICAgICAgICAgIGUucmF3ICYmIDAgPCBlLndpbmRvd0JpdHMgPyBlLndpbmRvd0JpdHMgPSAtZS53aW5kb3dCaXRzIDogZS5nemlwICYmIDAgPCBlLndpbmRvd0JpdHMgJiYgZS53aW5kb3dCaXRzID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mdW5jdGlvbih0LCBlKSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiAoZSA9IGUgfHwge30pLnJhdyA9ICEwLCBpKHQsIGUpXFxuICAgICAgICAgICAgfSwgYS5nemlwID0gZnVuY3Rpb24odCwgZSkge1xcbiAgICAgICAgICAgICAgICByZXR1cm4gKGUgPSBlIHx8IHt9KS5nemlwID0gITAsIGkodCwgZSlcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgXFxcIi4vdXRpbHMvY29tbW9uXFxcIjogMyxcXG4gICAgICAgICAgICBcXFwiLi91dGlscy9zdHJpbmdzXFxcIjogNCxcXG4gICAgICAgICAgICBcXFwiLi96bGliL2RlZmxhdGVcXFwiOiA4LFxcbiAgICAgICAgICAgIFxcXCIuL3psaWIvbWVzc2FnZXNcXFwiOiAxMyxcXG4gICAgICAgICAgICBcXFwiLi96bGliL3pzdHJlYW1cXFwiOiAxNVxcbiAgICAgICAgfV0sXFxuICAgICAgICAyOiBbZnVuY3Rpb24odCwgZSwgYSkge1xcbiAgICAgICAgICAgIFxcXCJ1c2Ugc3RyaWN0XFxcIjtcXG4gICAgICAgICAgICB2YXIgZiA9IHQoXFxcIi4vemxpYi9pbmZsYXRlXFxcIiksXFxuICAgICAgICAgICAgICAgIF8gPSB0KFxcXCIuL3V0aWxzL2NvbW1vblxcXCIpLFxcbiAgICAgICAgICAgICAgICB1ID0gdChcXFwiLi91dGlscy9zdHJpbmdzXFxcIiksXFxuICAgICAgICAgICAgICAgIGMgPSB0KFxcXCIuL3psaWIvY29uc3RhbnRzXFxcIiksXFxuICAgICAgICAgICAgICAgIGkgPSB0KFxcXCIuL3psaWIvbWVzc2FnZXNcXFwiKSxcXG4gICAgICAgICAgICAgICAgbiA9IHQoXFxcIi4vemxpYi96c3RyZWFtXFxcIiksXFxuICAgICAgICAgICAgICAgIHIgPSB0KFxcXCIuL3psaWIvZ3poZWFkZXJcXFwiKSxcXG4gICAgICAgICAgICAgICAgYiA9IE9iamVjdC5wcm90b3R5cGUudG9TdHJpbmc7XFxuXFxuICAgICAgICAgICAgZnVuY3Rpb24gcyh0KSB7XFxuICAgICAgICAgICAgICAgIGlmICghKHRoaXMgaW5zdGFuY2VvZiBzKSkgcmV0dXJuIG5ldyBzKHQpO1xcbiAgICAgICAgICAgICAgICB0aGlzLm9wdGlvbnMgPSBfLmFzc2lnbih7XFxuICAgICAgICAgICAgICAgICAgICBjaHVua1NpemU6IDE2Mzg0LFxcbiAgICAgICAgICAgICAgICAgICAgd2luZG93Qml0czogMCxcXG4gICAgICAgICAgICAgICAgICAgIHRvOiBcXFwiXFxcIlxcbiAgICAgICAgICAgICAgICB9LCB0IHx8IHt9KTtcXG4gICAgICAgICAgICAgICAgdmFyIGUgPSB0aGlzLm9wdGlvbnM7XFxuICAgICAgICAgICAgICAgIGUucmF3ICYmIDAgPD0gZS53aW5kb3dCaXRzICYmIGUud2luZG93Qml0cyA8IDE2ICYmIChlLndpbmRvd0JpdHMgPSAtZS53aW5kb3dCaXRzLCAwID09PSBlLndpbmRvd0JpdHMgJiYgKGUud2luZG93Qml0cyA9IC0xNSkpLCAhKDAgPD0gZS53aW5kb3dCaXRzICYmIGUud2luZG93Qml0cyA8IDE2KSB8fCB0ICYmIHQud2luZG93Qml0cyB8fCAoZS53aW5kb3dCaXRzICs9IDMyKSwgMTUgPCBlLndpbmRvd0JpdHMgJiYgZS53aW5kb3dCaXRzIDwgNDggJiYgMCA9PSAoMTUgJiBlLndpbmRvd0JpdHMpICYmIChlLndpbmRvd0JpdHMgfD0gMTUpLCB0aGlzLmVyciA9IDAsIHRoaXMubXNnID0gXFxcIlxcXCIsIHRoaXMuZW5kZWQgPSAhMSwgdGhpcy5jaHVua3MgPSBbXSwgdGhpcy5zdHJtID0gbmV3IG4sIHRoaXMuc3RybS5hdmFpbF9vdXQgPSAwO1xcbiAgICAgICAgICAgICAgICB2YXIgYSA9IGYuaW5mbGF0ZUluaXQyKHRoaXMuc3RybSwgZS53a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ICAgICBoID0gdGhpcy5vcHRpb25zLmRpY3Rpb25hcnksXFxuICAgICAgICAgICAgICAgICAgICBkID0gITE7XFxuICAgICAgICAgICAgICAgIGlmICh0aGlzLmVuZGVkKSByZXR1cm4gITE7XFxuICAgICAgICAgICAgICAgIGkgPSBlID09PSB+fmUgPyBlIDogITAgPT09IGUgPyBjLlpfRklOSVNIIDogYy5aX05PX0ZMVVNILCBcXFwic3RyaW5nXFxcIiA9PSB0eXBlb2YgdCA/IG8uaW5wdXQgPSB1LmJpbnN0cmluZzJidWYodCkgOiBcXFwiW29iamVjdCBBcnJheUJ1ZmZlcl1cXFwiID09PSBiLmNhbGwodCkgPyBvLmlucHV0ID0gbmV3IFVpbnQ4QXJyYXkodCkgOiBvLmlucHV0ID0gdCwgby5uZXh0X2luID0gMCwgby5hdmFpbF9pbiA9IG8uaW5wdXQubGVuZ3RoO1xcbiAgICAgICAgICAgICAgICBkbyB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoMCA9PT0gby5hdmFpbF9vdXQgJiYgKG8ub3V0cHV0ID0gbmV3IF8uQnVmOChsKSwgby5uZXh0X291dCA9IDAsIG8uYXZhaWxfb3V0ID0gbCksIChhID0gZi5pbmZsYXRlKG8sIGMuWl9OT19GTFVTSCkpID09PSBjLlpfTkVFRF9ESUNUICYmIGggJiYgKGEgPSBmLmluZmxhdGVTZXREaWN0aW9uYXJ5KHRoaXMuc3RybSwgaCkpLCBhID09PSBjLlpfQlVGX0VSUk9SICYmICEwID09PSBkICYmIChhID0gYy5aX09LLCBkID0gITEpLCBhICE9PSBjLlpfU1RSRUFNX0VORCAmJiBhICE9PSBjLlpfT0spIHJldHVybiB0aGlzLm9uRW5kKGEpLCAhKHRoaXMuZW5kZWQgPSAhMCk7XFxuICAgICAgICAgICAgICAgICAgICBvLm5leHRfb3V0ICYmICgwICE9PSBvLmF2YWlsX291dCAmJiBhICE9PSBjLlpfU1RSRUFNX0VORCAmJiAoMCAhPT0gby5hdmFpbF9pbiB8f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cInVuZGVmaW5lZFxcXCIgIT0gdHlwZW9mIFVpbnQxNkFycmF5ICYmIFxcXCJ1bmRlZmluZWRcXFwiICE9IHR5cGVvZiBJbnQzMkFycmF5O1xcbiAgICAgICAgICAgIGEuYXNzaWduID0gZnVuY3Rpb24odCkge1xcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBlLCBhLCBpID0gQXJyYXkucHJvdG90eXBlLnNsaWNlLmNhbGwoYXJndW1lbnRzLCAxKTsgaS5sZW5ndGg7KSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgbiA9IGkuc2hpZnQoKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChuKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKFxcXCJvYmplY3RcXFwiICE9IHR5cGVvZiBuKSB0aHJvdyBuZXcgVHlwZUVycm9yKG4gKyBcXFwibXVzdCBiZSBub24tb2JqZWN0XFxcIik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh2YXIgciBpbiBuKSBlID0gbiwgYSA9IHIsIE9iamVjdC5wcm90b3R5cGUuaGFzT3duUHJvcGVydHkuY2FsbChlLCBhKSAmJiAodFtyXSA9IG5bcl0pXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRcXG4gICAgICAgICAgICB9LCBhLnNocmlua0J1ZiA9IGZ1bmN0aW9uKHQsIGUpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHQubGVuZ3RoID09PSBlID8gdCA6IHQuc3ViYXJyYXkgPyB0LnN1YmFycmF5KDAsIGUpIDogKHQubGVuZ3RoID0gZSwgdClcXG4gICAgICAgICAgICB9O1xcbiAgICAgICAgICAgIHZhciBuID0ge1xcbiAgICAgICAgICAgICAgICAgICAgYXJyYXlTZXQ6IGZ1bmN0aW9uKHQsIGUsIGEsIGksIG4pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoZS5zdWJhcnJheSAmJiB0LnN1YmFycmF5KSB0LnNldChlLnN1YmFycmF5KGEsIGEgKyBpKSwgbik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciByID0gMDsgciA8IGk7IHIrKykgdFtuICsgcl0gPSBlW2EgKyByXVxcbiAgICAgICAgICAgICAgICAgICAgfSxcXG4gICAgICAgICAgICAgICAgICAgIGZsYXR0ZW5DaHVua3M6IGZ1bmN0aW9uKHQpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICB2YXIgZSwgYSwgaSwgbiwgciwgcztcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGUgPSBpID0gMCwgYSA9IHQubGVuZ3RoOyBlIDwgYTsgZSsrKSBpICs9IHRbZV0ubGVuZ3RoO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAocyA9IG5ldyBVaW50OEFycmF5KGkpLCBlID0gbiA9IDAsIGEgPSB0Lmxlbmd0aDsgZSA8IGE7IGUrKykgciA9IHRbZV0sIHMuc2V0KHIsIG4pLCBuICs9IHIubGVuZ3RoO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBzXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0sXFxuICAgICAgICAgICAgICAgIHIgPSB7XFxuICAgICAgICAgICAgICAgICAgICBhcnJheVNldDogZnVuY3Rpb24odCwgZSwgYSwgaSwgbikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAodmFyIHIgPSAwOyByIDwgaTsgcisrKSB0W24gKyByXSA9IGVbYSArIHJdXFxuICAgICAgICAgICAgICAgICAgICB9LFxcbiAgICAgICAgICAgICAgICAgICAgZmxhdHRlbkNodW5rczogZnVuY3Rpb24odCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBbXS5jb25jYXQuYXBwbHkoW10sIHQpXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH07XFxuICAgICAgICAgICAgYS5zZXRUeXBlZCA9IGZ1bmN0aW9uKHQpIHtcXG4gICAgICAgICAgICAgICAgdCA/IChhLkJ1ZjggPSBVaW50OEFycmF5LCBhLkJ1ZjE2ID0gVWludDE2QXJyYXksIGEuQnVmMzIgPSBJbnQzMkFycmF5LCBhLmFzc2lnbihhLCBuKSkgOiAoYS5CdWY4ID0gQXJyYXksIGEuQnVmMTYgPSBBcnJheSwgYS5CdWYzMiA9IEFycmF5LCBhLmFzc2lnbihhLCByKSlcXG4gICAgICAgICAgICB9LCBhLnNldFR5cGVkKGkpXFxuICAgICAgICB9LCB7fV0sXFxuICAgICAgICA0OiBbZnVuY3Rpb24odCwgZSwgYSkge1xcbiAgICAgICAgICAgIFxcXCJ1c2Ugc3RyaWN0XFxcIjtcXG4gICAgICAgICAgICB2YXIgbCA9IHQoXFxcIi4vY29tbW9uXFxcIiksXFxuICAgICAgICAgICAgICAgIG4gPSAhMCxcXG4gICAgICAgICAgICAgICAgciA9ICEwO1xcbiAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgIFN0cmluZy5mcm9tQ2hhckNvZGUuYXBwbHkobnVsbCwgWzBdKVxcbiAgICAgICAgICAgIH0gY2F0Y2ggKHQpIHtcXG4gICAgICAgICAgICAgICAgbiA9ICExXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHRyeSB7XFxuICAgICAgICAgICAgICAgIFN0cmluZy5mcm9tQ2hhckNvZGUuYXBwbHkobnVsbCwgbmV3IFVpbnQ4QXJyYXkoMSkpXFxuICAgICAgICAgICAgfSBjYXRjaCAodCkge1xcbiAgICAgICAgICAgICAgICByID0gITFcXG4gICAgICAgICAgICB9XFxuICAgICAgICAgICAgZm9yICh2YXIgaCA9IG5ldyBsLkJ1ZjgoMjU2KSwgaSA9IDA7IGkgPCAyNTY7IGkrKykgaFtpXSA9IDI1MiA8PSBpID8gNiA6IDI0OCA8PSBpID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gaSA9IDA7IGEgPCBzOylcXG4gICAgICAgICAgICAgICAgICAgIGlmICgobiA9IHRbYSsrXSkgPCAxMjgpIG9baSsrXSA9IG47XFxuICAgICAgICAgICAgICAgICAgICBlbHNlIGlmICg0IDwgKHIgPSBoW25dKSkgb1tpKytdID0gNjU1MzMsIGEgKz0gciAtIDE7XFxuICAgICAgICAgICAgICAgIGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgZm9yIChuICY9IDIgPT09IHIgPyAzMSA6IDMgPT09IHIgPyAxNSA6IDc7IDEgPCByICYmIGEgPCBzOykgbiA9IG4gPDwgNiB8IDYzICYgdFthKytdLCByLS07XFxuICAgICAgICAgICAgICAgICAgICAxIDwgciA/IG9baSsrXSA9IDY1NTMzIDogbiA8IDY1NTM2ID8gb1tpKytdID0gbiA6IChuIC09IDY1NTM2LCBvW2krK10gPSA1NTI5NiB8IG4gPj4gMTAgJiAxMDIzLCBvW2krK10gPSA1NjMyMCB8IDEwMjMgJiBuKVxcbiAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIHJldHVybiBkKG8sIGkpXFxuICAgICAgICAgICAgfSwgYS51dGY4Ym9yZGVyID0gZnVuY3Rpb24odCwgZSkge1xcbiAgICAgICAgICAgICAgICB2YXIgYTtcXG4gICAgICAgICAgICAgICAgZm9yICgoZSA9IGUgfHwgdC5sZW5ndGgpID4gdC5sZW5ndGggJiYgKGUgPSB0Lmxlbmd0aCksIGEgPSBlIC0gMTsgMCA8PSBhICYmIDEyOCA9PSAoMTkyICYgdFthXSk7KSBhLS07XFxuICAgICAgICAgICAgICAgIHJldHVybiBhIDwgMCA/IGUgOiAwID09PSBhID8gZSA6IGEgKyBoW3RbYV1dID4gZSA/IGEgOiBlXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwge1xcbiAgICAgICAgICAgIFxcXCIuL2NvbW1vblxcXCI6IDNcXG4gICAgICAgIH1dLFxcbiAgICAgICAgNTogW2Z1bmN0aW9uKHQsIGUsIGEpIHtcXG4gICAgICAgICAgICBcXFwidXNlIHN0cmljdFxcXCI7XFxuICAgICAgICAgICAgZS5leHBvcnRzID0gZnVuY3Rpb24odCwgZSwgYSwgaSkge1xcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBuID0gNjU1MzUgJiB0IHwgMCwgciA9IHQgPj4+IDE2ICYgNjU1MzUgfCAwLCBzID0gMDsgMCAhPT0gYTspIHtcXG4gICAgICAgICAgICAgICAgICAgIGZvciAoYSAtPSBzID0gMmUzIDwgYSA/IDJlMyA6IGE7IHIgPSByICsgKG4gPSBuICsgZVtpKytdIHwgMCkgfCAwLCAtLXM7KTtcXG4gICAgICAgICAgICAgICAgICAgIG4gJT0gNjU1MjEsIHIgJT0gNjU1MjFcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXR1cm4gbiB8IHIgPDwgMTYgfCAwXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgfSwge31dLFxcbiAgICAgICAgNjogW2Z1bmN0aW9uKHQsIGUsIGEpIHtcXG4gICAgICAgICAgICBcXFwidXNlIHN0cmljdFxcXCI7XFxuICAgICAgICAgICAgZS5leHBvcnRzID0ge1xcbiAgICAgICAgICAgICAgICBaX05PX0ZMVVNIOiAwLFxcbiAgICAgICAgICAgICAgICBaX1BBUlRJQUxfRkxVU0g6IDEsXFxuICAgICAgICAgICAgICAgIFpfU1lOQ19GTFVTSDogMixcXG4gICAgICAgICAgICAgICAgWl9GVUxMX0ZMVVNIOiAzLFxcbiAgICAgICAgICAgICAgICBaX0ZJTklTSDogNCxcXG4gICAgICAgICAgICAgICAgWl9CTE9DSzogNSxcXG4gICAgICAgICAgICAgICAgWl9UUkVFUzogNixcXG4gICAgICAgICAgICAgICAgWl9PSzogMCxcXG4gICAgICAgICAgICAgICAgWl9TVFJFQU1fRU5EOiAxLFxcbiAgICAgICAgICAgICAgICBaX05FRURfRElDVDogMixcXG4gICAgICAgICAgICAgICAgWl9FUlJOTzogLTEsXFxuICAgICAgICAgICAgICAgIFpfU1RSRUFNX0VSUk9SOiAtMixcXG4gICAgICAgICAgICAgICAgWl9EQVRBX0VSUk9SOiAtMyxcXG4gICAgICAgICAgICAgICAgWl9CVUZfRVJST1I6IC01LFxcbiAgICAgICAgICAgICAgICBaX05PX0NPTVBSRVNTSU9OOiAwLFxcbiAgICAgICAgICAgICAgICBaX0JFU1RfU1BFRUQ6IDEsXFxuICAgICAgICAgICAgICAgIFpfQkVTVF9DT01QUkVTU0lPTjogOSxcXG4gICAgICAgICAgICAgICAgWl9ERUZBVUxUX0NPTVBSRVNTSU9OOiAtMSxcXG4gICAgICAgICAgICAgICAgWl9GSUxURVJFRDogMSxcXG4gICAgICAgICAgICAgICAgWl9IVUZGTUFOX09OTFk6IDIsXFxuICAgICAgICAgICAgICAgIFpfUkxFOiAzLFxcbiAgICAgICAgICAgICAgICBaX0ZJWEVEOiA0LFxcbiAgICAgICAgICAgICAgICBaX0RFRkFVTFRfU1RSQVRFR1k6IDAsXFxuICAgICAgICAgICAgICAgIFpfQklOQVJZOiAwLFxcbiAgICAgICAgICAgICAgICBaX1RFWFQ6IDEsXFxuICAgICAgICAgICAgICAgIFpfVU5LTk9XTjogMixcXG4gICAgICAgICAgICAgICAgWl9ERUZMQVRFRDogOFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIHt9XSxcXG4gICAgICAgIDc6IFtmdW5jdGlvbih0LCBlLCBhKSB7XFxuICAgICAgICAgICAgXFxcInVzZSBzdHJpY3RcXFwiO1xcbiAgICAgICAgICAgIHZhciBvID0gZnVuY3Rpb24oKSB7XFxuICAgICAgICAgICAgICAgIGZvciAodmFyIHQsIGUgPSBbXSwgYSA9IDA7IGEgPCAyNTY7IGErKykge1xcbiAgICAgICAgICAgICAgICAgICAgdCA9IGE7XFxuICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBpID0gMDsgaSA8IDg7IGkrKykgdCA9IDEgJiB0ID8gMzk4ODI5MjM4NCBeIHQgPj4+IDEgOiB0ID4+PiAxO1xcbiAgICAgICAgICAgICAgICAgICAgZVthXSA9IHRcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXR1cm4gZVxcbiAgICAgICAgICAgIH0oKTtcXG4gICAgICAgICAgICBlLmV4cG9ydHMgPSBmdW5jdGlvbih0LCBlLCBhLCBpKSB7XFxuICAgICAgICAgICAgICAgIHZhciBuID0gbyxcXG4gICAgICAgICAgICAgICAgICAgIHIgPSBpICsgYTtcXG4gICAgICAgICAgICAgICAgdCBePSAtMTtcXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgcyA9IGk7IHMgPCByOyBzKyspIHQgPSB0ID4+PiA4IF4gblsyNTUgJiAodCBeIGVbc10pXTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIC0xIF4gdFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIHt9XSxcXG4gICAgICAgIDg6IFtmdW5jdGlvbih0LCBlLCBhKSB7XFxuICAgICAgICAgICAgXFxcInVzZSBzdHJpY3RcXFwiO1xcbiAgICAgICAgICAgIHZhciBsLCBfID0gdChcXFwiLi4vdXRpbHMvY29tbW9uXFxcIiksXFxuICAgICAgICAgICAgICAgIGggPSB0KFxcXCIuL3RyZWVzXFxcIiksXFxuICAgICAgICAgICAgICAgIHUgPSB0KFxcXCIuL2FkbGVyMzJcXFwiKSxcXG4gICAgICAgICAgICAgICAgYyA9IHQoXFxcIi4vY3JjMzJcXFwiKSxcXG4gICAgICAgICAgICAgICAgaSA9IHQoXFxcIi4vbWVzc2FnZXNcXFwiKSxcXG4gICAgICAgICAgICAgICAgZCA9IDAsXFxuICAgICAgICAgICAgICAgIGYgPSA0LFxcbiAgICAgICAgICAgICAgICBiID0gMCxcXG4gICAgICAgICAgICAgICAgZyA9IC0yLFxcbiAgICAgICAgICAgICAgICBtID0gLTEsXFxuICAgICAgICAgICAgICAgIHcgPSA0LFxcbiAgICAgICAgICAgICAgICBuID0gMixcXG4gICAgICAgICAgICAgICAgcCA9IDgsXFxuICAgICAgICAgICAgICAgIHYgPSA5LFxcbiAgICAgICAgICAgICAgICByID0gMjg2LFxcbiAgICAgICAgICAgICAgICBzID0gMzAsXFxuICAgICAgICAgICAgICAgIG8gPSAxOSxcXG4gICAgICAgICAgICAgICAgayA9IDIgKiByICsgMSxcXG4gICAgICAgICAgICAgICAgeSA9IDE1LFxcbiAgICAgICAgICAgICAgICB4ID0gMyxcXG4gICAgICAgICAgICAgICAgeiA9IDI1OCxcXG4gICAgICAgICAgICAgICAgQiA9IHogKyB4ICsgMSxcXG4gICAgICAgICAgICAgICAgUyA9IDQyLFxcbiAgICAgICAgICAgICAgICBFID0gMTEzLFxcbiAgICAgICAgICAgICAgICBBID0gMSxcXG4gICAgICAgICAgICAgICAgWiA9IDIsXFxuICAgICAgICAgICAgICAgIFIgPSAzLFxcbiAgICAgICAgICAgICAgICBDID0gNDtcXG5cXG4gICAgICAgICAgICBmdW5jdGlvbiBOKHQsIGUpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHQubXNnID0gaVtlXSwgZVxcbiAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICBmdW5jdGlvbiBPKHQpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuICh0IDw8IDEpIC0gKDQgPCB0ID8gOSA6IDApXFxuICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIGZ1bmN0aW9uIEQodCkge1xcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBlID0gdC5sZW5ndGg7IDAgPD0gLS1lOykgdFtlXSA9IDBcXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgZnVuY3Rpb24gSSh0KSB7XFxuICAgICAgICAgICAgICAgIHZhciBlID0gdC5zdGF0ZSxcXG4gICAgICAgICAgICAgICAgICAgIGEgPSBlLnBlbmRpbmc7XFxuICAgICAgICAgICAgICAgIGEgPiB0LmF2YWlsX291dCAmJiAoYSA9IHQuYXZhaWxfb3V0KSwgMCAhPT0gYSAm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AgICAgICAgICAgICAgICAgbyA9IHQubmljZV9tYXRjaCxcXG4gICAgICAgICAgICAgICAgICAgIGwgPSB0LnN0cnN0YXJ0ID4gdC53X3NpemUgLSBCID8gdC5zdHJzdGFydCAtICh0Lndfc2l6ZSAtIEIpIDogMCxcXG4gICAgICAgICAgICAgICAgICAgIGggPSB0LndpbmRvdyxcXG4gICAgICAgICAgICAgICAgICAgIGQgPSB0LndfbWFzayxcXG4gICAgICAgICAgICAgICAgICAgIGYgPSB0LnByZXYsXFxuICAgICAgICAgICAgICAgICAgICBfID0gdC5zdHJzdGFydCArIHosXFxuICAgICAgICAgICAgICAgICAgICB1ID0gaFtyICsgcyAtIDFdLFxcbiAgICAgICAgICAgICAgICAgICAgYyA9IGhbciArIHNdO1xcbiAgICAgICAgICAgICAgICB0LnByZXZfbGVuZ3RoID49IHQuZ29vZF9tYXRjaCAmJiAobiA+Pj0gMiksIG8gPiB0Lmxvb2thaGVhZCAmJiAobyA9IHQubG9va2FoZWFkKTtcXG4gICAgICAgICAgICAgICAgZG8ge1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKGhbKGEgPSBlKSArIHNdID09PSBjICYmIGhbYSArIHMgLSAxXSA9PT0gdSAmJiBoW2FdID09PSBoW3JdICYmIGhbKythXSA9PT0gaFtyICsgMV0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICByICs9IDIsIGErKztcXG4gICAgICAgICAgICAgICAgICAgICAgICBkbyB7fSB3aGlsZSAoaFsrK3JdID09PSBoWysrYV0gJiYgaFsrK3JdID09PSBoWysrYV0gJiYgaFsrK3JdID09PSBoWysrYV0gJiYgaFsrK3JdID09PSBoWysrYV0gJiYgaFsrK3JdID09PSBoWysrYV0gJiYgaFsrK3JdID09PSBoWysrYV0gJiYgaFsrK3JdID09PSBoWysrYV0gJiYgaFsrK3JdID09PSBoWysrYV0gJiYgciA8IF8pO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpID0geiAtIChfIC0gciksIHIgPSBfIC0geiwgcyA8IGkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHQubWF0Y2hfc3RhcnQgPSBlLCBvIDw9IChzID0gaSkpIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB1ID0gaFtyICsgcyAtIDFdLCBjID0gaFtyICsgc11cXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgIH0gd2hpbGUgKChlID0gZltlICYgZF0pID4gbCAmJiAwICE9IC0tbik7XFxuICAgICAgICAgICAgICAgIHJldHVybiBzIDw9IHQubG9va2FoZWFkID8gcyA6IHQubG9va2FoZWFkXFxuICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIGZ1bmN0aW9uIEgodCkge1xcbiAgICAgICAgICAgICAgICB2YXIgZSwgYSwgaSwgbiwgciwgcywgbywgbCwgaCwgZCwgZiA9IHQud19zaXplO1xcbiAgICAgICAgICAgICAgICBkbyB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAobiA9IHQud2luZG93X3NpemUgLSB0Lmxvb2thaGVhZCAtIHQuc3Ryc3RhcnQsIHQuc3Ryc3RhcnQgPj0gZiArIChmIC0gQikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKF8uYXJyYXlTZXQodC53aW5kb3csIHQud2luZG93LCBmLCBmLCAwKSwgdC5tYXRjaF9zdGFydCAtPSBmLCB0LnN0cnN0YXJ0IC09IGYsIHQuYmxvY2tfc3RhcnQgLT0gZiwgZSA9IGEgPSB0Lmhhc2hfc2l6ZTsgaSA9IHQuaGVhZFstLWVdLCB0LmhlYWRbZV0gPSBmIDw9IGkgPyBpIC0gZiA6IDAsIC0tYTspO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoZSA9IGEgPSBmOyBpID0gdC5wcmV2Wy0tZV0sIHQucHJldltlXSA9IGYgPD0gaSA/IGkgLSBmIDogMCwgLS1hOyk7X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ZCA8PSAxKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKEgodCksIDAgPT09IHQubG9va2FoZWFkICYmIGUgPT09IGQpIHJldHVybiBBO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgwID09PSB0Lmxvb2thaGVhZCkgYnJlYWtcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgIHQuc3Ryc3RhcnQgKz0gdC5sb29rYWhlYWQsIHQubG9va2FoZWFkID0gMDtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBpID0gdC5ibG9ja19zdGFydCArIGE7XFxuICAgICAgICAgICAgICAgICAgICBpZiAoKDAgPT09IHQuc3Ryc3RhcnQgfHwgdC5zdHJzdGFydCA+PSBpKSAmJiAodC5sb29rYWhlYWQgPSB0LnN0cnN0YXJ0IC0gaSwgdC5zdHJzdGFydCA9IGksIFUodCwgITEpLCAwID09PSB0LnN0cm0uYXZhaWxfb3V0KSkgcmV0dXJuIEE7XFxuICAgICAgICAgICAgICAgICAgICBpZiAodC5zdHJzdGFydCAtIHQuYmxvY2tfc3RhcnQgPj0gdC53X3NpemUgLSBCICYmIChVKHQsICExKSwgMCA9PT0gdC5zdHJtLmF2YWlsX291dCkpIHJldHVybiBBXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuIHQuaW5zZXJ0ID0gMCwgZSA9PT0gZiA/IChVKHQsICEwKSwgMCA9PT0gdC5zdHJtLmF2YWlsX291dCA/IFIgOiBDKSA6ICh0LnN0cnN0YXJ0ID4gdC5ibG9ja19zdGFydCAmJiAoVSh0LCAhMSksIHQuc3RybS5hdmFpbF9vdXQpLCBBKVxcbiAgICAgICAgICAgIH0pLCBuZXcgTSg0LCA0LCA4LCA0LCBqKSwgbmV3IE0oNCwgNSwgMTYsIDgsIGopLCBuZXcgTSg0LCA2LCAzMiwgMzIsIGopLCBuZXcgTSg0LCA0LCAxNiwgMTYsIEspLCBuZXcgT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mRpbmcgPiBuICYmICh0LmFkbGVyID0gYyh0LmFkbGVyLCBpLnBlbmRpbmdfYnVmLCBpLnBlbmRpbmcgLSBuLCBuKSksIGkuZ3ppbmRleCA9PT0gaS5nemhlYWQuZXh0cmEubGVuZ3RoICYmIChpLmd6aW5kZXggPSAwLCBpLnN0YXR1cyA9IDczKVxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGkuc3RhdHVzID0gNzM7XFxuICAgICAgICAgICAgICAgIGlmICg3MyA9PT0gaS5zdGF0dXMpXFxuICAgICAgICAgICAgICAgICAgICBpZiAoaS5nemhlYWQubmFtZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG4gPSBpLnBlbmRpbmc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaS5wZW5kaW5nID09PSBpLnBlbmRpbmdfYnVmX3NpemUgJiYgKGkuZ3poZWFkLmhjcmMgJiYgaS5wZW5kaW5nID4gbiAmJiAodC5hZGxlciA9IGModC5hZGxlciwgaS5wZW5kaW5nX2J1ZiwgaS5wZW5kaW5nIC0gbiwgbikpLCBJKHQpLCBuID0gaS5wZW5kaW5nLCBpLnBlbmRpbmcgPT09IGkucGVuZGluZ19idWZfc2l6ZSkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIgPSAxO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBUKGksIHIgPSBpLmd6aW5kZXggPCBpLmd6aGVhZC5uYW1lLmxlbmd0aCA/IDI1NSAmIGkuZ3poZWFkLm5hbWUuY2hhckNvZGVBdChpLmd6aW5kZXgrKykgOiAwKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDAgIT09IHIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGkuZ3poZWFkLmhjcmMgJiYgaS5wZW5kaW5nID4gbiAmJiAodC5hZGxlciA9IGModC5hZGxlciwgaS5wZW5kaW5nX2J1ZiwgaS5wZW5kaW5nIC0gbiwgbikpLCAwID09PSByICYmIChpLmd6aW5kZXggPSAwLCBpLnN0YXR1cyA9IDkxKVxcbiAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGkuc3RhdHVzID0gOTE7XFxuICAgICAgICAgICAgICAgIGlmICg5MSA9PT0gaS5zdGF0dXMpXFxuICAgICAgICAgICAgICAgICAgICBpZiAoaS5nemhlYWQuY29tbWVudCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG4gPSBpLnBlbmRpbmc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaS5wZW5kaW5nID09PSBpLnBlbmRpbmdfYnVmX3NpemUgJiYgKGkuZ3poZWFkLmhjcmMgJiYgaS5wZW5kaW5nID4gbiAmJiAodC5hZGxlciA9IGModC5hZGxlciwgaS5wZW5kaW5nX2J1ZiwgaS5wZW5kaW5nIC0gbiwgbikpLCBJKHQpLCBuID0gaS5wZW5kaW5nLCBpLnBlbmRpbmcgPT09IGkucGVuZGluZ19idWZfc2l6ZSkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHIgPSAxO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBUKGksIHIgPSBpLmd6aW5kZXggPCBpLmd6aGVhZC5jb21tZW50Lmxlbmd0aCA/IDI1NSAmIGkuZ3poZWFkLmNvbW1lbnQuY2hhckNvZGVBdChpLmd6aW5kZXgrKykgOiAwKVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDAgIT09IHIpO1xcbiAgICAgICAgICAgICAgICAgICAgICAg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ICAgICAgICAgICAgICAgICAgIGZvciAodmFyIGE7Oykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoMCA9PT0gdC5sb29rYWhlYWQgJiYgKEgodCksIDAgPT09IHQubG9va2FoZWFkKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGUgPT09IGQpIHJldHVybiBBO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodC5tYXRjaF9sZW5ndGggPSAwLCBhID0gaC5fdHJfdGFsbHkodCwgMCwgdC53aW5kb3dbdC5zdHJzdGFydF0pLCB0Lmxvb2thaGVhZC0tLCB0LnN0cnN0YXJ0KyssIGEgJiYgKFUodCwgITEpLCAwID09PSB0LnN0cm0uYXZhaWxfb3V0KSkgcmV0dXJuIEFcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHQuaW5zZXJ0ID0gMCwgZSA9PT0gZiA/IChVKHQsICEwKSwgMCA9PT0gdC5zdHJtLmF2YWlsX291dCA/IFIgOiBDKSA6IHQubGFzdF9saXQgJiYgKFUodCwgITEpLCAwID09PSB0LnN0cm0uYXZhaWxfb3V0KSA/IEEgOiBaXFxuICAgICAgICAgICAgICAgICAgICB9KGksIGUpIDogMyA9PT0gaS5zdHJhdGVneSA/IGZ1bmN0aW9uKHQsIGUpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHZhciBhLCBpLCBuLCByLCBzID0gdC53aW5kb3c7Oykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodC5sb29rYWhlYWQgPD0geikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKEgodCksIHQubG9va2FoZWFkIDw9IHogJiYgZSA9PT0gZCkgcmV0dXJuIEE7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoMCA9PT0gdC5sb29rYWhlYWQpIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHQubWF0Y2hfbGVuZ3RoID0gMCwgdC5sb29rYWhlYWQgPj0geCAmJiAwIDwgdC5zdHJzdGFydCAmJiAoaSA9IHNbbiA9IHQuc3Ryc3RhcnQgLSAxXSkgPT09IHNbKytuXSAmJiBpID09PSBzWysrbl0gJiYgaSA9PT0gc1srK25dKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByID0gdC5zdHJzdGFydCArIHo7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkbyB7fSB3aGlsZSAoaSA9PT0gc1srK25dICYmIGkgPT09IHNbKytuXSAmJiBpID09PSBzWysrbl0gJiYgaSA9PT0gc1srK25dICYmIGkgPT09IHNbKytuXSAmJiBpID09PSBzWysrbl0gJiYgaSA9PT0gc1srK25dICYmIGkgPT09IHNbKytuXSAmJiBuIDwgcik7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0Lm1hdGNoX2xlbmd0aCA9IHogLSAociAtIG4pLCB0Lm1hdGNoX2xlbmd0aCA+IHQubG9va2FoZWFkICYmICh0Lm1hdGNoX2xlbmd0aCA9IHQubG9va2FoZWFkKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh0Lm1hdGNoX2xlbmd0aCA+PSB4ID8gKGEgPSBoLl90cl90YWxseSh0LCAxLCB0Lm1hdGNoX2xlbmd0aCAtIHgpLCB0Lmxvb2thaGVhZCAtPSB0Lm1hdGNoX2xlbmd0aCwgdC5zdHJzdGFydCArPSB0Lm1hdGNoX2xlbmd0aCwgdC5tYXRjaF9sZW5ndGggPSAwKSA6IChhID0gaC5fdHJfdGFsbHkodCwgMCwgdC53aW5kb3dbdC5zdHJzdGFydF0pLCB0Lmxvb2thaGVhZC0tLCB0LnN0cnN0YXJ0KyspLCBhICYmIChVKHQsICExKSwgMCA9PT0gdC5zdHJtLmF2YWlsX291dCkpIHJldHVybiBBXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiB0Lmluc2VydCA9IDAsIGUgPT09IGYgPyAoVSh0LCAhMCksIDAgPT09IHQuc3RybS5hdmFpbF9vdXQgPyBSIDogQykgOiB0Lmxhc3RfbGl0ICYmIChVKHQsICExKSwgMCA9PT0gdC5zdHJtLmF2YWlsX291dCkgPyBBIDogWlxcbiAgICAgICAgICAgICAgICAgICAgfShpLCBlKSA6IGxbaS5sZXZlbF0uZnVuYyhpLCBlKTtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChvICE9PSBSICYmIG8gIT09IEMgfHwgKGkuc3RhdHVzID0gNjY2KSwgbyA9PT0gQSB8fCBvID09PSBSKSByZXR1cm4gMCA9PT0gdC5hdmFpbF9vdXQgJiYgKGkubGFzdF9mbHVzaCA9IC0xKSwgYjtcXG4gICAgICAgICAgICAgICAgICAgIGlmIChvID09PSBaICYmICgxID09PSBlID8gaC5fdHJfYWxpZ24oaSkgOiA1ICE9PSBlICYmIChoLl90cl9zdG9yZWRfYmxvY2soaSwgMCwgMCwgITEpLCAzID09PSBlICYmIChEKGkuaGVhZCksIDAgPT09IGkubG9va2FoZWFkICYmIChpLnN0cnN0YXJ0ID0gMCwgaS5ibG9ja19zdGFydCA9IDAsIGkuaW5zZXJ0ID0gMCkpKSwgSSh0KSwgMCA9PT0gdC5hdmFpbF9vdXQpKSByZXR1cm4gaS5sYXN0X2ZsdXNoID0gLTEsIGJcXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXR1cm4gZSAhPT0gZiA/IGIgOiBpLndyYXAgPD0gMCA/IDEgOiAoMiA9PT0gaS53cmFwID8gKFQoaSwgMjU1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pb24odCwgZSkge1xcbiAgICAgICAgICAgICAgICB2YXIgYSwgaSwgbiwgciwgcywgbywgbCwgaCwgZCwgZiwgXywgdSwgYywgYiwgZywgbSwgdywgcCwgdiwgaywgeSwgeCwgeiwgQiwgUztcXG4gICAgICAgICAgICAgICAgYSA9IHQuc3RhdGUsIGkgPSB0Lm5leHRfaW4sIEIgPSB0LmlucHV0LCBuID0gaSArICh0LmF2YWlsX2luIC0gNSksIHIgPSB0Lm5leHRfb3V0LCBTID0gdC5vdXRwdXQsIHMgPSByIC0gKGUgLSB0LmF2YWlsX291dCksIG8gPSByICsgKHQuYXZhaWxfb3V0IC0gMjU3KSwgbCA9IGEuZG1heCwgaCA9IGEud3NpemUsIGQgPSBhLndoYXZlLCBmID0gYS53bmV4dCwgXyA9IGEud2luZG93LCB1ID0gYS5ob2xkLCBjID0gYS5iaXRzLCBiID0gYS5sZW5jb2RlLCBnID0gYS5kaXN0Y29kZSwgbSA9ICgxIDw8IGEubGVuYml0cykgLSAxLCB3ID0gKDEgPDwgYS5kaXN0Yml0cykgLSAxO1xcbiAgICAgICAgICAgICAgICB0OiBkbyB7XFxuICAgICAgICAgICAgICAgICAgICBjIDwgMTUgJiYgKHUgKz0gQltpKytdIDw8IGMsIGMgKz0gOCwgdSArPSBCW2krK10gPDwgYywgYyArPSA4KSwgcCA9IGJbdSAmIG1dO1xcbiAgICAgICAgICAgICAgICAgICAgZTogZm9yICg7Oykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1ID4+Pj0gdiA9IHAgPj4+IDI0LCBjIC09IHYsIDAgPT09ICh2ID0gcCA+Pj4gMTYgJiAyNTUpKSBTW3IrK10gPSA2NTUzNSAmIHA7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICghKDE2ICYgdikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgwID09ICg2NCAmIHYpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcCA9IGJbKDY1NTM1ICYgcCkgKyAodSAmICgxIDw8IHYpIC0gMSldO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlIGVcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgzMiAmIHYpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhLm1vZGUgPSAxMjtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayB0XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0Lm1zZyA9IFxcXCJpbnZhbGlkIGxpdGVyYWwvbGVuZ3RoIGNvZGVcXFwiLCBhLm1vZGUgPSAzMDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIHRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBrID0gNjU1MzUgJiBwLCAodiAmPSAxNSkgJiYgKGMgPCB2ICYmICh1ICs9IEJbaSsrXSA8PCBjLCBjICs9IDgpLCBrICs9IHUgJiAoMSA8PCB2KSAtIDEsIHUgPj4+PSB2LCBjIC09IHYpLCBjIDwgMTUgJiYgKHUgKz0gQltpKytdIDw8IGMsIGMgKz0gOCwgdSArPSBCW2krK10gPDwgYywgYyArPSA4KSwgcCA9IGdbdSAmIHddO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhOiBmb3IgKDs7KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodSA+Pj49IHYgPSBwID4+PiAyNCwgYyAtPSB2LCAhKDE2ICYgKHYgPSBwID4+PiAxNiAmIDI1NSkpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDAgPT0gKDY0ICYgdikpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcCA9IGdbKDY1NTM1ICYgcCkgKyAodSAmICgxIDw8IHYpIC0gMSldO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZSBhXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQubXNnID0gXFxcImludmFsaWQgZGlzdGFuY2UgY29kZVxcXCIsIGEubW9kZSA9IDMwO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIHRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh5ID0gNjU1MzUgJiBwLCBjIDwgKHYgJj0gMTUpICYmICh1ICs9IEJbaSsrXSA8PCBjLCAoYyArPSA4KSA8IHYgJiYgKHUgKz0gQltpKytdIDw8IGMsIGMgKz0gOCkpLCBsIDwgKHkgKz0gdSAmICgxIDw8IHYpIC0gMSkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0Lm1zZyA9IFxcXCJpbnZhbGlkIGRpc3RhbmNlIHRvbyBmYXIgYmFja1xcXCIsIGEubW9kZSA9IDMwO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIHRcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1ID4+Pj0gdiwgYyAtPSB2LCAodiA9IHIgLSBzKSA8IHkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoZCA8ICh2ID0geSAtIHYpICYmIGEuc2FuZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0Lm1zZyA9IFxcXCJpbnZhbGlkIGRpc3RhbmNlIHRvbyBmYXIgYmFja1xcXCIsIGEubW9kZSA9IDMwO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayB0XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICh6ID0gXywgKHggPSAwKSA9PT0gZikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoeCArPSBoIC0gdiwgdiA8IGspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoayAtPSB2OyBTW3IrK10gPSBfW3grK10sIC0tdjspO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeCA9IHIgLSB5LCB6ID0gU1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGlmIChmIDwgdikge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoeCArPSBoICsgZiAtIHYsICh2IC09IGYpIDwgaykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChrIC09IHY7IFNbcisrXSA9IF9beCsrXSwgLS12Oyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoeCA9IDAsIGYgPCBrKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChrIC09IHYgPSBmOyBTW3IrK10gPSBfW3grK10sIC0tdjspO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHggPSByIC0geSwgeiA9IFNcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoeCArPSBmIC0gdiwgdiA8IGspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChrIC09IHY7IFNbcisrXSA9IF9beCsrXSwgLS12Oyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHggPSByIC0geSwgeiA9IFNcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICg7IDIgPCBrOykgU1tyKytdID0gelt4KytdLCBTW3IrK10gPSB6W3grK10sIFNbcisrXSA9IHpbeCsrXSwgayAtPSAzO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGsgJiYgKFNbcisrXSA9IHpbeCsrXSwgMSA8IGsgJiYgKFNbcisrXSA9IHpbeCsrXSkpXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoeCA9IHIgLSB5OyBTW3IrK10gPSBTW3grK10sIFNbcisrXSA9IFNbeCsrXSwgU1tyKytdID0gU1t4KytdLCAyIDwgKGsgLT0gMyk7KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBrICYmIChTW3IrK10gPSBTW3grK10sIDEgPCBrICYmIChTW3IrK10gPSBTW3grK10pKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICB9IHdoaWxlIChpIDwgbiAmJiByIDwgbyk7XFxuICAgICAgICAgICAgICAgIGkgLT0gayA9IGMgPj4gMywgdSAmPSAoMSA8PCAoYyAtPSBrIDw8IDMpKSAtIDEsIHQubmV4dF9pbiA9IGksIHQubmV4dF9vdXQgPSByLCB0LmF2YWlsX2luID0gaSA8IG4gPyBuIC0gaSArIDUgOiA1IC0gKGkgLSBuKSwgdC5hdmFpbF9vdXQgPSByIDwgbyA/IG8gLSByICsgMjU3IDogMjU3IC0gKHIgLSBvKSwgYS5ob2xkID0gdSwgYS5iaXRzID0gY1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIHt9XSxcXG4gICAgICAgIDExOiBbZnVuY3Rpb24odCwgZSwgYSkge1xcbiAgICAgICAgICAgIFxcXCJ1c2Ugc3RyaWN0XFxcIjtcXG4gICAgICAgICAgICB2YXIgWiA9IHQoXFxcIi4uL3V0aWxzL2NvbW1vblxcXCIpLFxcbiAgICAgICAgICAgICAgICBSID0gdChcXFwiLi9hZGxlcjMyXFxcIiksXFxuICAgICAgICAgICAgICAgIEMgPSB0KFxcXCIuL2NyYzMyXFxcIiksXFxuICAgICAgICAgICAgICAgIE4gPSB0KFxcXCIuL2luZmZhc3RcXFwiKSxcXG4gICAgICAgICAgICAgICAgTyA9IHQoXFxcIi4vaW5mdHJlZXNcXFwiKSxcXG4gICAgICAgICAgICAgICAgRCA9IDEsXFxuICAgICAgICAgICAgICAgIEkgPSAyLFxcbiAgICAgICAgICAgICAgICBVID0gMCxcXG4gICAgICAgICAgICAgICAgVCA9IC0yLFxcbiAgICAgICAgICAgICAgICBGID0gMSxcXG4gICAgICAgICAgICAgICAgaSA9IDg1MixcXG4gICAgICAgICAgICAgICAgbiA9IDU5MjtcXG5cXG4gICAgICAgICAgICBmdW5jdGlvbiBMKHQ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IT09IGUgJiYgKGkud2luZG93ID0gbnVsbCksIGkud3JhcCA9IGEsIGkud2JpdHMgPSBlLCBvKHQpKSkgOiBUXFxuICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIGZ1bmN0aW9uIGgodCwgZSkge1xcbiAgICAgICAgICAgICAgICB2YXIgYSwgaTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHQgPyAoaSA9IG5ldyByLCAodC5zdGF0ZSA9IGkpLndpbmRvdyA9IG51bGwsIChhID0gbCh0LCBlKSkgIT09IFUgJiYgKHQuc3RhdGUgPSBudWxsKSwgYSkgOiBUXFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIHZhciBkLCBmLCBfID0gITA7XFxuXFxuICAgICAgICAgICAgZnVuY3Rpb24gSCh0KSB7XFxuICAgICAgICAgICAgICAgIGlmIChfKSB7XFxuICAgICAgICAgICAgICAgICAgICB2YXIgZTtcXG4gICAgICAgICAgICAgICAgICAgIGZvciAoZCA9IG5ldyBaLkJ1ZjMyKDUxMiksIGYgPSBuZXcgWi5CdWYzMigzMiksIGUgPSAwOyBlIDwgMTQ0OykgdC5sZW5zW2UrK10gPSA4O1xcbiAgICAgICAgICAgICAgICAgICAgZm9yICg7IGUgPCAyNTY7KSB0LmxlbnNbZSsrXSA9IDk7XFxuICAgICAgICAgICAgICAgICAgICBmb3IgKDsgZSA8IDI4MDspIHQubGVuc1tlKytdID0gNztcXG4gICAgICAgICAgICAgICAgICAgIGZvciAoOyBlIDwgMjg4OykgdC5sZW5zW2UrK10gPSA4O1xcbiAgICAgICAgICAgICAgICAgICAgZm9yIChPKEQsIHQubGVucywgMCwgMjg4LCBkLCAwLCB0LndvcmssIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYml0czogOVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pLCBlID0gMDsgZSA8IDMyOykgdC5sZW5zW2UrK10gPSA1O1xcbiAgICAgICAgICAgICAgICAgICAgTyhJLCB0LmxlbnMsIDAsIDMyLCBmLCAwLCB0LndvcmssIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBiaXRzOiA1XFxuICAgICAgICAgICAgICAgICAgICB9KSwgXyA9ICExXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgdC5sZW5jb2RlID0gZCwgdC5sZW5iaXRzID0gOSwgdC5kaXN0Y29kZSA9IGYsIHQuZGlzdGJpdHMgPSA1XFxuICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIGZ1bmN0aW9uIGoodCwgZSwgYSwgaSkge1xcbiAgICAgICAgICAgICAgICB2YXIgbiwgciA9IHQuc3RhdGU7XFxuICAgICAgICAgICAgICAgIHJldHVybiBudWxsID09PSByLndpbmRvdyAmJiAoci53c2l6ZSA9IDEgPDwgci53Yml0cywgci53bmV4dCA9IDAsIHIud2hhdmUgPSAwLCByLndpbmRvdyA9IG5ldyBaLkJ1Zjgoci53c2l6ZSkpLCBpID49IHIud3NpemUgPyAoWi5hcnJheVNldChyLndpbmRvdywgZSwgYSAtIHIud3NpemUsIHIud3NpemUsIDApLCByLnduZXh0ID0gMCwgci53aGF2ZSA9IHIud3NpemUpIDogKGkgPCAobiA9IHIud3NpemUgLSByLnduZXh0KSAmJiAobiA9IGkpLCBaLmFycmF5U2V0KHIud2luZG93LCBlLCBhIC0gaSwgbiwgci53bmV4dCksIChpIC09IG4pID8gKFouYXJyYXlTZXQoci53aW5kb3csIGUsIGEgLSBpLCBpLCAwKSwgci53bmV4dCA9IGksIHIud2hhdmUgPSByLndzaXplKSA6IChyLnduZXh0ICs9IG4sIHIud25leHQgPT09IHIud3NpemUgJiYgKHIud25leHQgPSAwKSwgci53aGF2ZSA8IHIud3NpemUgJiYgKHIud2hhdmUgKz0gbikpKSwgMFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBhLmluZmxhdGVSZXNldCA9IG8sIGEuaW5mbGF0ZVJlc2V0MiA9IGwsIGEuaW5mbGF0ZVJlc2V0S2VlcCA9IHMsIGEuaW5mbGF0ZUluaXQgPSBmdW5jdGlvbih0KSB7XFxuICAgICAgICAgICAgICAgIHJldHVybiBoKHQsIDE1KVxcbiAgICAgICAgICAgIH0sIGEuaW5mbGF0ZUluaXQyID0gaCwgYS5pbmZsYXRlID0gZnVuY3Rpb24odCwgZSkge1xcbiAgICAgICAgICAgICAgICB2YXIgYSwgaSwgbiwgciwgcywgbywgbCwgaCwgZCwgZiwgXywgdSwgYywgYiwgZywgbSwgdywgcCwgdiwgaywgeSwgeCwgeiwgQiwgUyA9IDAsXFxuICAgICAgICAgICAgICAgICAgICBFID0gbmV3IFouQnVmOCg0KSxcXG4gICAgICAgICAgICAgICAgICAgIEEgPSBbMTYsIDE3LCAxOCwgMCwgOCwgNywgOSwgNiwgMTAsIDUsIDExLCA0LCAxMiwgMywgMTMsIDIsIDE0LCAxLCAxNV07XFxuICAgICAgICAgICAgICAgIGlmICghdCB8fCAhdC5zdGF0ZSB8fCAhdC5vdXRwdXQgfHwgIXQuaW5wdXQgJiYgMCAhPT0gdC5hdmFpbF9pbikgcmV0dXJuIFQ7XFxuICAgICAgICAgICAgICAgIDEyID09PSAoYSA9IHQuc3RhdGUpLm1vZGUgJiYgKGEubW9kZSA9IDEzKSwgcyA9IHQubmV4dF9vdXQsIG4gPSB0Lm91dHB1dCwgbCA9IHQuYXZhaWxfb3V0LCByID0gdC5uZXh0X2luLCBpID0gdC5pbnB1dCwgbyA9IHQuYXZhaWxfaW4sIGggPSBhLmhvbGQsIGQgPSBhLmJpdHMsIGYgPSBvLCBfID0gbCwgeCA9IFU7XFxuICAgICAgICAgICAgICAgIHQ6IGZvciAoOzspIHN3aXRjaCAoYS5tb2RlKSB7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIEY6XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDAgPT09IGEud3JhcCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBhLm1vZGUgPSAxMztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yICg7IGQgPCAxNjspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDAgPT09IG8pIGJyZWFrIHQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8tLSwgaCArPSBpW3IrK10gPDwgZCwgZCArPSA4XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgyICYgYS53cmFwICYmIDM1NjE1ID09PSBoKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIEVbYS5jaGVjayA9IDBdID0gMjU1ICYgaCwgRVsxXSA9IGggPj4+IDggJiAyNTUsIGEuY2hlY2sgPSBDKGEuY2hlY2ssIEUsIDIsIDApLCBkID0gaCA9IDAsIGEubW9kZSA9IDI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhLmZsYWdzID0gMCwgYS5oZWFkICYmIChhLmhlYWQuZG9uZSA9ICExKSwgISgxICYgYS53cmFwKSB8fCAoKCgyNTUgJiBoKSA8PCA4KSArIChoID4+IDgpKSAlIDMxKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQubXNnID0gXFxcImluY29ycmVjdCBoZWFkZXIgY2hlY2tcXFwiLCBhLm1vZGUgPSAzMDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDggIT0gKDE1ICYgaCkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5tc2cgPSBcXFwidW5rbm93biBjb21wcmVzc2lvbiBtZXRob2RcXFwiLCBhLm1vZGUgPSAzMDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGQgLT0gNCwgeSA9IDggKyAoMTUgJiAoaCA+Pj49IDQpKSwgMCA9PT0gYS53Yml0cykgYS53Yml0cyA9IHk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSBpZiAoeSA+IGEud2JpdHMpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5tc2cgPSBcXFwiaW52YWxpZCB3aW5kb3cgc2l6ZVxcXCIsIGEubW9kZSA9IDMwO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBhLmRtYXggPSAxIDw8IHksIHQuYWRsZXIgPSBhLmNoZWNrID0gMSwgYS5tb2RlID0gNTEyICYgaCA/IDEwIDogMTIsIGQgPSBoID0gMDtcXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKDsgZCA8IDE2Oykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoMCA9PT0gbykgYnJlYWsgdDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgby0tLCBoICs9IGlbcisrXSA8PCBkLCBkICs9IDhcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGEuZmxhZ3MgPSBoLCA4ICE9ICgyNTUgJiBhLmZsYWdzKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0Lm1zZyA9IFxcXCJ1bmtub3duIGNvbXByZXNzaW9uIG1ldGhvZFxcXCIsIGEubW9kZSA9IDMwO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoNTczNDQgJiBhLmZsYWdzKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQubXNnID0gXFxcInVua25vd24gaGVhZGVyIGZsYWdzIHNldFxcXCIsIGEubW9kZSA9IDMwO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBhLmhlYWQgJiYgKGEuaGVhZC50ZXh0ID0gaCA+PiA4ICYgMSksIDUxMiAmIGEuZmxhZ3MgJiYgKEVbMF0gPSAyNTUgJiBoLCBFWzFdID0gaCA+Pj4gOCAmIDI1NSwgYS5jaGVjayA9IEMoYS5jaGVjaywgRSwgMiwgMCkpLCBkID0gaCA9IDAsIGEubW9kZSA9IDM7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIDM6XFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yICg7IGQgPCAzMjspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDAgPT09IG8pIGJyZWFrIHQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8tLSwgaCArPSBpW3IrK10gPDwgZCwgZCArPSA4XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGEuaGVhZCAmJiAoYS5oZWFkLnRpbWUgPSBoKSwgNTEyICYgYS5mbGFncyAmJiAoRVswXSA9IDI1NSAmIGgsIEVbMV0gPSBoID4+PiA4ICYgMjU1LCBFWzJdID0gaCA+Pj4gMTYgJiAyNTUsIEVbM10gPSBoID4+PiAyNCAmIDI1NSwgYS5jaGVjayA9IEMoYS5jaGVjaywgRSwgNCwgMCkpLCBkID0gaCA9IDAsIGEubW9kZSA9IDQ7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIDQ6XFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yICg7IGQgPCAxNjspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDAgPT09IG8pIGJyZWFrIHQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8tLSwgaCArPSBpW3IrK10gPDwgZCwgZCArPSA4XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGEuaGVhZCAmJiAoYS5oZWFkLnhmbGFncyA9IDI1NSAmIGgsIGEuaGVhZC5vcyA9IGggPj4gOCksIDUxMiAmIGEuZmxhZ3MgJiYgKEVbMF0gPSAyNTUgJiBoLCBFWzFdID0gaCA+Pj4gOCAmIDI1NSwgYS5jaGVjayA9IEMoYS5jaGVjaywgRSwgMiwgMCkpLCBkID0gaCA9IDAsIGEubW9kZSA9IDU7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIDU6XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDEwMjQgJiBhLmZsYWdzKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoOyBkIDwgMTY7KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoMCA9PT0gbykgYnJlYWsgdDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8tLSwgaCArPSBpW3IrK10gPDwgZCwgZCArPSA4XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYS5sZW5ndGggPSBoLCBhLmhlYWQgJiYgKGEuaGVhZC5leHRyYV9sZW4gPSBoKSwgNTEyICYgYS5mbGFncyAmJiAoRVswXSA9IDI1NSAmIGgsIEVbMV0gPSBoID4+PiA4ICYgMjU1LCBhLmNoZWNrID0gQyhhLmNoZWNrLCBFLCAyLCAwKSksIGQgPSBoID0gMFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBhLmhlYWQgJiYgKGEuaGVhZC5leHRyYSA9IG51bGwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGEubW9kZSA9IDY7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIDY6XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDEwMjQgJiBhLmZsYWdzICYmIChvIDwgKHUgPSBhLmxlbmd0aCkgJiYgKHUgPSBvKSwgdSAmJiAoYS5oZWFkICYmICh5ID0gYS5oZWFkLmV4dHJhX2xlbiAtIGEubGVuZ3RoLCBhLmhlYWQuZXh0cmEgfHwgKGEuaGVhZC5leHRyYSA9IG5ldyBBcnJheShhLmhlYWQuZXh0cmFfbGVuKSksIFouYXJyYXlTZXQoYS5oZWFkLmV4dHJhLCBpLCByLCB1LCB5KSksIDUxMiAmIGEuZmxhZ3MgJiYgKGEuY2hlY2sgPSBDKGEuY2hlY2ssIGksIHUsIHIpKSwgbyAtPSB1LCByICs9IHUsIGEubGVuZ3RoIC09IHUpLCBhLmxlbmd0aCkpIGJyZWFrIHQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYS5sZW5ndGggPSAwLCBhLm1vZGUgPSA3O1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSA3OlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgyMDQ4ICYgYS5mbGFncykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoMCA9PT0gbykgYnJlYWsgdDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICh1ID0gMDsgeSA9IGlbciArIHUrK10sIGEuaGVhZCAmJiB5ICYmIGEubGVuZ3RoIDwgNjU1MzYgJiYgKGEuaGVhZC5uYW1lICs9IFN0cmluZy5mcm9tQ2hhckNvZGUoeSkpLCB5ICYmIHUgPCBvOyk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICg1MTIgJiBhLmZsYWdzICYmIChhLmNoZWNrID0gQyhhLmNoZWNrLCBpLCB1LCByKSksIG8gLT0gdSwgciArPSB1LCB5KSBicmVhayB0XFxuICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIGEuaGVhZCAmJiAoYS5oZWFkLm5hbWUgPSBudWxsKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBhLmxlbmd0aCA9IDAsIGEubW9kZSA9IDg7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIDg6XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDQwOTYgJiBhLmZsYWdzKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgwID09PSBvKSBicmVhayB0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHUgPSAwOyB5ID0gaVtyICsgdSsrXSwgYS5oZWFkICYmIHkgJiYgYS5sZW5ndGggPCA2NTUzNiAmJiAoYS5oZWFkLmNvbW1lbnQgKz0gU3RyaW5nLmZyb21DaGFyQ29kZSh5KSksIHkgJiYgdSA8IG87KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDUxMiAmIGEuZmxhZ3MgJiYgKGEuY2hlY2sgPSBDKGEuY2hlY2ssIGksIHUsIHIpKSwgbyAtPSB1LCByICs9IHUsIHkpIGJyZWFrIHRcXG4gICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgYS5oZWFkICYmIChhLmhlYWQuY29tbWVudCA9IG51bGwpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGEubW9kZSA9IDk7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIDk6XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDUxMiAmIGEuZmxhZ3MpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICg7IGQgPCAxNjspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgwID09PSBvKSBicmVhayB0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgby0tLCBoICs9IGlbcisrXSA8PCBkLCBkICs9IDhcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaCAhPT0gKDY1NTM1ICYgYS5jaGVjaykpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQubXNnID0gXFxcImhlYWRlciBjcmMgbWlzbWF0Y2hcXFwiLCBhLm1vZGUgPSAzMDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IGggPSAwXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGEuaGVhZCAmJiAoYS5oZWFkLmhjcmMgPSBhLmZsYWdzID4+IDkgJiAxLCBhLmhlYWQuZG9uZSA9ICEwKSwgdC5hZGxlciA9IGEuY2hlY2sgPSAwLCBhLm1vZGUgPSAxMjtcXG4gICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMTA6XFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yICg7IGQgPCAzMjspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDAgPT09IG8pIGJyZWFrIHQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8tLSwgaCArPSBpW3IrK10gPDwgZCwgZCArPSA4XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHQuYWRsZXIgPSBhLmNoZWNrID0gTChoKSwgZCA9IGggPSAwLCBhLm1vZGUgPSAxMTtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMTE6XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDAgPT09IGEuaGF2ZWRpY3QpIHJldHVybiB0Lm5leHRfb3V0ID0gcywgdC5hdmFpbF9vdXQgPSBsLCB0Lm5leHRfaW4gPSByLCB0LmF2YWlsX2luID0gbywgYS5ob2xkID0gaCwgYS5iaXRzID0gZCwgMjtcXG4gICAgICAgICAgICAgICAgICAgICAgICB0LmFkbGVyID0gYS5jaGVjayA9IDEsIGEubW9kZSA9IDEyO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAxMjpcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoNSA9PT0gZSB8fCA2ID09PSBlKSBicmVhayB0O1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAxMzpcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYS5sYXN0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGggPj4+PSA3ICYgZCwgZCAtPSA3ICYgZCwgYS5tb2RlID0gMjc7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoOyBkIDwgMzspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDAgPT09IG8pIGJyZWFrIHQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8tLSwgaCArPSBpW3IrK10gPDwgZCwgZCArPSA4XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCAoYS5sYXN0ID0gMSAmIGgsIGQgLT0gMSwgMyAmIChoID4+Pj0gMSkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAwOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYS5tb2RlID0gMTQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxOlxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKEgoYSksIGEubW9kZSA9IDIwLCA2ICE9PSBlKSBicmVhaztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGggPj4+PSAyLCBkIC09IDI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhayB0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhLm1vZGUgPSAxNztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDM6XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0Lm1zZyA9IFxcXCJpbnZhbGlkIGJsb2NrIHR5cGVcXFwiLCBhLm1vZGUgPSAzMFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBoID4+Pj0gMiwgZCAtPSAyO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAxNDpcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKGggPj4+PSA3ICYgZCwgZCAtPSA3ICYgZDsgZCA8IDMyOykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoMCA9PT0gbykgYnJlYWsgdDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgby0tLCBoICs9IGlbcisrXSA8PCBkLCBkICs9IDhcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCg2NTUzNSAmIGgpICE9IChoID4+PiAxNiBeIDY1NTM1KSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0Lm1zZyA9IFxcXCJpbnZhbGlkIHN0b3JlZCBibG9jayBsZW5ndGhzXFxcIiwgYS5tb2RlID0gMzA7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhLmxlbmd0aCA9IDY1NTM1ICYgaCwgZCA9IGggPSAwLCBhLm1vZGUgPSAxNSwgNiA9PT0gZSkgYnJlYWsgdDtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMTU6XFxuICAgICAgICAgICAgICAgICAgICAgICAgYS5tb2RlID0gMTY7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIDE2OlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICh1ID0gYS5sZW5ndGgpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG8gPCB1ICYmICh1ID0gbyksIGwgPCB1ICYmICh1ID0gbCksIDAgPT09IHUpIGJyZWFrIHQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFouYXJyYXlTZXQobiwgaSwgciwgdSwgcyksIG8gLT0gdSwgciArPSB1LCBsIC09IHUsIHMgKz0gdSwgYS5sZW5ndGggLT0gdTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgYS5tb2RlID0gMTI7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIDE3OlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoOyBkIDwgMTQ7KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgwID09PSBvKSBicmVhayB0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvLS0sIGggKz0gaVtyKytdIDw8IGQsIGQgKz0gOFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYS5ubGVuID0gMjU3ICsgKDMxICYgaCksIGggPj4+PSA1LCBkIC09IDUsIGEubmRpc3QgPSAxICsgKDMxICYgaCksIGggPj4+PSA1LCBkIC09IDUsIGEubmNvZGUgPSA0ICsgKDE1ICYgaCksIGggPj4+PSA0LCBkIC09IDQsIDI4NiA8IGEubmxlbiB8fCAzMCA8IGEubmRpc3QpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5tc2cgPSBcXFwidG9vIG1hbnkgbGVuZ3RoIG9yIGRpc3RhbmNlIHN5bWJvbHNcXFwiLCBhLm1vZGUgPSAzMDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgYS5oYXZlID0gMCwgYS5tb2RlID0gMTg7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIDE4OlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoOyBhLmhhdmUgPCBhLm5jb2RlOykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKDsgZCA8IDM7KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoMCA9PT0gbykgYnJlYWsgdDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8tLSwgaCArPSBpW3IrK10gPDwgZCwgZCArPSA4XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYS5sZW5zW0FbYS5oYXZlKytdXSA9IDcgJiBoLCBoID4+Pj0gMywgZCAtPSAzXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoOyBhLmhhdmUgPCAxOTspIGEubGVuc1tBW2EuaGF2ZSsrXV0gPSAwO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhLmxlbmNvZGUgPSBhLmxlbmR5biwgYS5sZW5iaXRzID0gNywgeiA9IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpdHM6IGEubGVuYml0c1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB4ID0gTygwLCBhLmxlbnMsIDAsIDE5LCBhLmxlbmNvZGUsIDAsIGEud29yaywgeiksIGEubGVuYml0cyA9IHouYml0cywgeCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0Lm1zZyA9IFxcXCJpbnZhbGlkIGNvZGUgbGVuZ3RocyBzZXRcXFwiLCBhLm1vZGUgPSAzMDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgYS5oYXZlID0gMCwgYS5tb2RlID0gMTk7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIDE5OlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoOyBhLmhhdmUgPCBhLm5sZW4gKyBhLm5kaXN0Oykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKDsgbSA9IChTID0gYS5sZW5jb2RlW2ggJiAoMSA8PCBhLmxlbmJpdHMpIC0gMV0pID4+PiAxNiAmIDI1NSwgdyA9IDY1NTM1ICYgUywgISgoZyA9IFMgPj4+IDI0KSA8PSBkKTspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgwID09PSBvKSBicmVhayB0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgby0tLCBoICs9IGlbcisrXSA8PCBkLCBkICs9IDhcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAodyA8IDE2KSBoID4+Pj0gZywgZCAtPSBnLCBhLmxlbnNbYS5oYXZlKytdID0gdztcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoMTYgPT09IHcpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKEIgPSBnICsgMjsgZCA8IEI7KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgwID09PSBvKSBicmVhayB0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvLS0sIGggKz0gaVtyKytdIDw8IGQsIGQgKz0gOFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoaCA+Pj49IGcsIGQgLT0gZywgMCA9PT0gYS5oYXZlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQubXNnID0gXFxcImludmFsaWQgYml0IGxlbmd0aCByZXBlYXRcXFwiLCBhLm1vZGUgPSAzMDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgeSA9IGEubGVuc1thLmhhdmUgLSAxXSwgdSA9IDMgKyAoMyAmIGgpLCBoID4+Pj0gMiwgZCAtPSAyXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2UgaWYgKDE3ID09PSB3KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChCID0gZyArIDM7IGQgPCBCOykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoMCA9PT0gbykgYnJlYWsgdDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgby0tLCBoICs9IGlbcisrXSA8PCBkLCBkICs9IDhcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZCAtPSBnLCB5ID0gMCwgdSA9IDMgKyAoNyAmIChoID4+Pj0gZykpLCBoID4+Pj0gMywgZCAtPSAzXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoQiA9IGcgKyA3OyBkIDwgQjspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDAgPT09IG8pIGJyZWFrIHQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8tLSwgaCArPSBpW3IrK10gPDwgZCwgZCArPSA4XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQgLT0gZywgeSA9IDAsIHUgPSAxMSArICgxMjcgJiAoaCA+Pj49IGcpKSwgaCA+Pj49IDcsIGQgLT0gN1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGEuaGF2ZSArIHUgPiBhLm5sZW4gKyBhLm5kaXN0KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5tc2cgPSBcXFwiaW52YWxpZCBiaXQgbGVuZ3RoIHJlcGVhdFxcXCIsIGEubW9kZSA9IDMwO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKDsgdS0tOykgYS5sZW5zW2EuaGF2ZSsrXSA9IHlcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoMzAgPT09IGEubW9kZSkgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDAgPT09IGEubGVuc1syNTZdKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQubXNnID0gXFxcImludmFsaWQgY29kZSAtLSBtaXNzaW5nIGVuZC1vZi1ibG9ja1xcXCIsIGEubW9kZSA9IDMwO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYS5sZW5iaXRzID0gOSwgeiA9IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpdHM6IGEubGVuYml0c1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9LCB4ID0gTyhELCBhLmxlbnMsIDAsIGEubmxlbiwgYS5sZW5jb2RlLCAwLCBhLndvcmssIHopLCBhLmxlbmJpdHMgPSB6LmJpdHMsIHgpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5tc2cgPSBcXFwiaW52YWxpZCBsaXRlcmFsL2xlbmd0aHMgc2V0XFxcIiwgYS5tb2RlID0gMzA7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhLmRpc3RiaXRzID0gNiwgYS5kaXN0Y29kZSA9IGEuZGlzdGR5biwgeiA9IHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJpdHM6IGEuZGlzdGJpdHNcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSwgeCA9IE8oSSwgYS5sZW5zLCBhLm5sZW4sIGEubmRpc3QsIGEuZGlzdGNvZGUsIDAsIGEud29yaywgeiksIGEuZGlzdGJpdHMgPSB6LmJpdHMsIHgpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5tc2cgPSBcXFwiaW52YWxpZCBkaXN0YW5jZXMgc2V0XFxcIiwgYS5tb2RlID0gMzA7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhLm1vZGUgPSAyMCwgNiA9PT0gZSkgYnJlYWsgdDtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMjA6XFxuICAgICAgICAgICAgICAgICAgICAgICAgYS5tb2RlID0gMjE7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIDIxOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICg2IDw9IG8gJiYgMjU4IDw9IGwpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5uZXh0X291dCA9IHMsIHQuYXZhaWxfb3V0ID0gbCwgdC5uZXh0X2luID0gciwgdC5hdmFpbF9pbiA9IG8sIGEuaG9sZCA9IGgsIGEuYml0cyA9IGQsIE4odCwgXyksIHMgPSB0Lm5leHRfb3V0LCBuID0gdC5vdXRwdXQsIGwgPSB0LmF2YWlsX291dCwgciA9IHQubmV4dF9pbiwgaSA9IHQuaW5wdXQsIG8gPSB0LmF2YWlsX2luLCBoID0gYS5ob2xkLCBkID0gYS5iaXRzLCAxMiA9PT0gYS5tb2RlICYmIChhLmJhY2sgPSAtMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoYS5iYWNrID0gMDsgbSA9IChTID0gYS5sZW5jb2RlW2ggJiAoMSA8PCBhLmxlbmJpdHMpIC0gMV0pID4+PiAxNiAmIDI1NSwgdyA9IDY1NTM1ICYgUywgISgoZyA9IFMgPj4+IDI0KSA8PSBkKTspIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDAgPT09IG8pIGJyZWFrIHQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8tLSwgaCArPSBpW3IrK10gPDwgZCwgZCArPSA4XFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChtICYmIDAgPT0gKDI0MCAmIG0pKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAocCA9IGcsIHYgPSBtLCBrID0gdzsgbSA9IChTID0gYS5sZW5jb2RlW2sgKyAoKGggJiAoMSA8PCBwICsgdikgLSAxKSA+PiBwKV0pID4+PiAxNiAmIDI1NSwgdyA9IDY1NTM1ICYgUywgIShwICsgKGcgPSBTID4+PiAyNCkgPD0gZCk7KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoMCA9PT0gbykgYnJlYWsgdDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8tLSwgaCArPSBpW3IrK10gPDwgZCwgZCArPSA4XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaCA+Pj49IHAsIGQgLT0gcCwgYS5iYWNrICs9IHBcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGggPj4+PSBnLCBkIC09IGcsIGEuYmFjayArPSBnLCBhLmxlbmd0aCA9IHcsIDAgPT09IG0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYS5tb2RlID0gMjY7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgzMiAmIG0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYS5iYWNrID0gLTEsIGEubW9kZSA9IDEyO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoNjQgJiBtKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHQubXNnID0gXFxcImludmFsaWQgbGl0ZXJhbC9sZW5ndGggY29kZVxcXCIsIGEubW9kZSA9IDMwO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBhLmV4dHJhID0gMTUgJiBtLCBhLm1vZGUgPSAyMjtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMjI6XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGEuZXh0cmEpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChCID0gYS5leHRyYTsgZCA8IEI7KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoMCA9PT0gbykgYnJlYWsgdDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8tLSwgaCArPSBpW3IrK10gPDwgZCwgZCArPSA4XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYS5sZW5ndGggKz0gaCAmICgxIDw8IGEuZXh0cmEpIC0gMSwgaCA+Pj49IGEuZXh0cmEsIGQgLT0gYS5leHRyYSwgYS5iYWNrICs9IGEuZXh0cmFcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgYS53YXMgPSBhLmxlbmd0aCwgYS5tb2RlID0gMjM7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIDIzOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoOyBtID0gKFMgPSBhLmRpc3Rjb2RlW2ggJiAoMSA8PCBhLmRpc3RiaXRzKSAtIDFdKSA+Pj4gMTYgJiAyNTUsIHcgPSA2NTUzNSAmIFMsICEoKGcgPSBTID4+PiAyNCkgPD0gZCk7KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgwID09PSBvKSBicmVhayB0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBvLS0sIGggKz0gaVtyKytdIDw8IGQsIGQgKz0gOFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoMCA9PSAoMjQwICYgbSkpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChwID0gZywgdiA9IG0sIGsgPSB3OyBtID0gKFMgPSBhLmRpc3Rjb2RlW2sgKyAoKGggJiAoMSA8PCBwICsgdikgLSAxKSA+PiBwKV0pID4+PiAxNiAmIDI1NSwgdyA9IDY1NTM1ICYgUywgIShwICsgKGcgPSBTID4+PiAyNCkgPD0gZCk7KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoMCA9PT0gbykgYnJlYWsgdDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8tLSwgaCArPSBpW3IrK10gPDwgZCwgZCArPSA4XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaCA+Pj49IHAsIGQgLT0gcCwgYS5iYWNrICs9IHBcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGggPj4+PSBnLCBkIC09IGcsIGEuYmFjayArPSBnLCA2NCAmIG0pIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5tc2cgPSBcXFwiaW52YWxpZCBkaXN0YW5jZSBjb2RlXFxcIiwgYS5tb2RlID0gMzA7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGEub2Zmc2V0ID0gdywgYS5leHRyYSA9IDE1ICYgbSwgYS5tb2RlID0gMjQ7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIDI0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhLmV4dHJhKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoQiA9IGEuZXh0cmE7IGQgPCBCOykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDAgPT09IG8pIGJyZWFrIHQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvLS0sIGggKz0gaVtyKytdIDw8IGQsIGQgKz0gOFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGEub2Zmc2V0ICs9IGggJiAoMSA8PCBhLmV4dHJhKSAtIDEsIGggPj4+PSBhLmV4dHJhLCBkIC09IGEuZXh0cmEsIGEuYmFjayArPSBhLmV4dHJhXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhLm9mZnNldCA+IGEuZG1heCkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB0Lm1zZyA9IFxcXCJpbnZhbGlkIGRpc3RhbmNlIHRvbyBmYXIgYmFja1xcXCIsIGEubW9kZSA9IDMwO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBhLm1vZGUgPSAyNTtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMjU6XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDAgPT09IGwpIGJyZWFrIHQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHUgPSBfIC0gbCwgYS5vZmZzZXQgPiB1KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgodSA9IGEub2Zmc2V0IC0gdSkgPiBhLndoYXZlICYmIGEuc2FuZSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgdC5tc2cgPSBcXFwiaW52YWxpZCBkaXN0YW5jZSB0b28gZmFyIGJhY2tcXFwiLCBhLm1vZGUgPSAzMDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdSA+IGEud25leHQgPyAodSAtPSBhLnduZXh0LCBjID0gYS53c2l6ZSAtIHUpIDogYyA9IGEud25leHQgLSB1LCB1ID4gYS5sZW5ndGggJiYgKHUgPSBhLmxlbmd0aCksIGIgPSBhLndpbmRvd1xcbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBiID0gbiwgYyA9IHMgLSBhLm9mZnNldCwgdSA9IGEubGVuZ3RoO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvciAobCA8IHUgJiYgKHUgPSBsKSwgbCAtPSB1LCBhLmxlbmd0aCAtPSB1OyBuW3MrK10gPSBiW2MrK10sIC0tdTspO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIDAgPT09IGEubGVuZ3RoICYmIChhLm1vZGUgPSAyMSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIDI2OlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgwID09PSBsKSBicmVhayB0O1xcbiAgICAgICAgICAgICAgICAgICAgICAgIG5bcysrXSA9IGEubGVuZ3RoLCBsLS0sIGEubW9kZSA9IDIxO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgY2FzZSAyNzpcXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoYS53cmFwKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvciAoOyBkIDwgMzI7KSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoMCA9PT0gbykgYnJlYWsgdDtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG8tLSwgaCB8PSBpW3IrK10gPDwgZCwgZCArPSA4XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKF8gLT0gbCwgdC50b3RhbF9vdXQgKz0gXywgYS50b3RhbCArPSBfLCBfICYmICh0LmFkbGVyID0gYS5jaGVjayA9IGEuZmxhZ3MgPyBDKGEuY2hlY2ssIG4sIF8sIHMgLSBfKSA6IFIoYS5jaGVjaywgbiwgXywgcyAtIF8pKSwgXyA9IGwsIChhLmZsYWdzID8gaCA6IEwoaCkpICE9PSBhLmNoZWNrKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0Lm1zZyA9IFxcXCJpbmNvcnJlY3QgZGF0YSBjaGVja1xcXCIsIGEubW9kZSA9IDMwO1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkID0gaCA9IDBcXG4gICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgYS5tb2RlID0gMjg7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIDI4OlxcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChhLndyYXAgJiYgYS5mbGFncykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IgKDsgZCA8IDMyOykge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDAgPT09IG8pIGJyZWFrIHQ7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBvLS0sIGggKz0gaVtyKytdIDw8IGQsIGQgKz0gOFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChoICE9PSAoNDI5NDk2NzI5NSAmIGEudG90YWwpKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0Lm1zZyA9IFxcXCJpbmNvcnJlY3QgbGVuZ3RoIGNoZWNrXFxcIiwgYS5tb2RlID0gMzA7XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVha1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQgPSBoID0gMFxcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgICAgICAgICBhLm1vZGUgPSAyOTtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMjk6XFxuICAgICAgICAgICAgICAgICAgICAgICAgeCA9IDE7XFxuICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWsgdDtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMzA6XFxuICAgICAgICAgICAgICAgICAgICAgICAgeCA9IC0zO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrIHQ7XFxuICAgICAgICAgICAgICAgICAgICBjYXNlIDMxOlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAtNDtcXG4gICAgICAgICAgICAgICAgICAgIGNhc2UgMzI6XFxuICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OlxcbiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBUXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgcmV0dXJuIHQubmV4dF9vdXQgPSBzLCB0LmF2YWlsX291dCA9IGwsIHQubmV4dF9pbiA9IHIsIHQuYXZhaWxfaW4gPSBvLCBhLmhvbGQgPSBoLCBhLmJpdHMgPSBkLCAoYS53c2l6ZSB8fCBfICE9PSB0LmF2YWlsX291dCAmJiBhLm1vZGUgPCAzMCAmJiAoYS5tb2RlIDwgMjcgfHwgNCAhPT0gZSkpICYmIGoodCwgdC5vdXRwdXQsIHQubmV4dF9vdXQsIF8gLSB0LmF2YWlsX291dCkgPyAoYS5tb2RlID0gMzEsIC00KSA6IChmIC09IHQuYXZhaWxfaW4sIF8gLT0gdC5hdmFpbF9vdXQsIHQudG90YWxfaW4gKz0gZiwgdC50b3RhbF9vdXQgKz0gXywgYS50b3RhbCArPSBfLCBhLndyYXAgJiYgXyAmJiAodC5hZGxlciA9IGEuY2hlY2sgPSBhLmZsYWdzID8gQyhhLmNoZWNrLCBuLCBfLCB0Lm5leHRfb3V0IC0gXykgOiBSKGEuY2hlY2ssIG4sIF8sIHQubmV4dF9vdXQgLSBfKSksIHQuZGF0YV90eXBlID0gYS5iaXRzICsgKGEubGFzdCA/IDY0IDogMCkgKyAoMTIgPT09IGEubW9kZSA/IDEyOCA6IDApICsgKDIwID09PSBhLm1vZGUgfHwgMTUgPT09IGEubW9kZSA/IDI1NiA6IDApLCAoMCA9PT0gZiAmJiAwID09PSBfIHx8IDQgPT09IGUpICYmIHggPT09IFUgJiYgKHggPSAtNSksIHgpXFxuICAgICAgICAgICAgfSwgYS5pbmZsYXRlRW5kID0gZnVuY3Rpb24odCkge1xcbiAgICAgICAgICAgICAgICBpZiAoIXQgfHwgIXQuc3RhdGUpIHJldHVybiBUO1xcbiAgICAgICAgICAgICAgICB2YXIgZSA9IHQuc3RhdGU7XFxuICAgICAgICAgICAgICAgIHJldHVybiBlLndpbmRvdyAmJiAoZS53aW5kb3cgPSBudWxsKSwgdC5zdGF0ZSA9IG51bGwsIFVcXG4gICAgICAgICAgICB9LCBhLmluZmxhdGVHZXRIZWFkZXIgPSBmdW5jdGlvbih0LCBlKSB7XFxuICAgICAgICAgICAgICAgIHZhciBhO1xcbiAgICAgICAgICAgICAgICByZXR1cm4gdCAmJiB0LnN0YXRlID8gMCA9PSAoMiAmIChhID0gdC5zdGF0ZSkud3JhcCkgPyBUIDogKChhLmhlYWQgPSBlKS5kb25lID0gITEsIFUpIDogVFxcbiAgICAgICAgICAgIH0sIGEuaW5mbGF0ZVNldERpY3Rpb25hcnkgPSBmdW5jdGlvbih0LCBlKSB7XFxuICAgICAgICAgICAgICAgIHZh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gIEEgPSBudWxsLFxcbiAgICAgICAgICAgICAgICAgICAgWiA9IDAsXFxuICAgICAgICAgICAgICAgICAgICBSID0gbmV3IEQuQnVmMTYoMTYpLFxcbiAgICAgICAgICAgICAgICAgICAgQyA9IG5ldyBELkJ1ZjE2KDE2KSxcXG4gICAgICAgICAgICAgICAgICAgIE4gPSBudWxsLFxcbiAgICAgICAgICAgICAgICAgICAgTyA9IDA7XFxuICAgICAgICAgICAgICAgIGZvciAodyA9IDA7IHcgPD0gMTU7IHcrKykgUlt3XSA9IDA7XFxuICAgICAgICAgICAgICAgIGZvciAocCA9IDA7IHAgPCBpOyBwKyspIFJbZVthICsgcF1dKys7XFxuICAgICAgICAgICAgICAgIGZvciAoeSA9IG0sIGsgPSAxNTsgMSA8PSBrICYmIDAgPT09IFJba107IGstLSk7XFxuICAgICAgICAgICAgICAgIGlmIChrIDwgeSAmJiAoeSA9IGspLCAwID09PSBrKSByZXR1cm4gbltyKytdID0gMjA5NzE1MjAsIG5bcisrXSA9IDIwOTcxNTIwLCBvLmJpdHMgPSAxLCAwO1xcbiAgICAgICAgICAgICAgICBmb3IgKHYgPSAxOyB2IDwgayAmJiAwID09PSBSW3ZdOyB2KyspO1xcbiAgICAgICAgICAgICAgICBmb3IgKHkgPCB2ICYmICh5ID0gdiksIHcgPSBCID0gMTsgdyA8PSAxNTsgdysrKVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKEIgPDw9IDEsIChCIC09IFJbd10pIDwgMCkgcmV0dXJuIC0xO1xcbiAgICAgICAgICAgICAgICBpZiAoMCA8IEIgJiYgKDAgPT09IHQgfHwgMSAhPT0gaykpIHJldHVybiAtMTtcXG4gICAgICAgICAgICAgICAgZm9yIChDWzFdID0gMCwgdyA9IDE7IHcgPCAxNTsgdysrKSBDW3cgKyAxXSA9IENbd10gKyBSW3ddO1xcbiAgICAgICAgICAgICAgICBmb3IgKHAgPSAwOyBwIDwgaTsgcCsrKSAwICE9PSBlW2EgKyBwXSAmJiAoc1tDW2VbYSArIHBdXSsrXSA9IHApO1xcbiAgICAgICAgICAgICAgICBpZiAoMCA9PT0gdCA/IChBID0gTiA9IHMsIHUgPSAxOSkgOiAxID09PSB0ID8gKEEgPSBJLCBaIC09IDI1NywgTiA9IFUsIE8gLT0gMjU3LCB1ID0gMjU2KSA6IChBID0gVCwgTiA9IEYsIHUgPSAtMSksIHcgPSB2LCBfID0gciwgeiA9IHAgPSBFID0gMCwgZCA9IC0xLCBmID0gKFMgPSAxIDw8ICh4ID0geSkpIC0gMSwgMSA9PT0gdCAmJiA4NTIgPCBTIHx8IDIgPT09IHQgJiYgNTkyIDwgUykgcmV0dXJuIDE7XFxuICAgICAgICAgICAgICAgIGZvciAoOzspIHtcXG4gICAgICAgICAgICAgICAgICAgIGZvciAoYyA9IHcgLSB6LCBzW3BdIDwgdSA/IChiID0gMCwgZyA9IHNbcF0pIDogc1twXSA+IHUgPyAoYiA9IE5bTyArIHNbcF1dLCBnID0gQVtaICsgc1twXV0pIDogKGIgPSA5NiwgZyA9IDApLCBsID0gMSA8PCB3IC0geiwgdiA9IGggPSAxIDw8IHg7IG5bXyArIChFID4+IHopICsgKGggLT0gbCldID0gYyA8PCAyNCB8IGIgPDwgMTYgfCBnIHwgMCwgMCAhPT0gaDspO1xcbiAgICAgICAgICAgICAgICAgICAgZm9yIChsID0gMSA8PCB3IC0gMTsgRSAmIGw7KSBsID4+PSAxO1xcbiAgICAgICAgICAgICAgICAgICAgaWYgKDAgIT09IGwgPyAoRSAmPSBsIC0gMSwgRSArPSBsKSA6IEUgPSAwLCBwKyssIDAgPT0gLS1SW3ddKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKHcgPT09IGspIGJyZWFrO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHcgPSBlW2EgKyBzW3BdXVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgaWYgKHkgPCB3ICYmIChFICYgZikgIT09IGQpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKDAgPT09IHogJiYgKHogPSB5KSwgXyArPSB2LCBCID0gMSA8PCAoeCA9IHcgLSB6KTsgeCArIHogPCBrICYmICEoKEIgLT0gUlt4ICsgel0pIDw9IDApOykgeCsrLCBCIDw8PSAxO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChTICs9IDEgPDwgeCwgMSA9PT0gdCAmJiA4NTIgPCBTIHx8IDIgPT09IHQgJiYgNTkyIDwgUykgcmV0dXJuIDE7XFxuICAgICAgICAgICAgICAgICAgICAgICAgbltkID0gRSAmIGZdID0geSA8PCAyNCB8IHggPDwgMTYgfCBfIC0gciB8IDBcXG4gICAgICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICByZXR1cm4gMCAhPT0gRSAmJiAobltfICsgRV0gPSB3IC0geiA8PCAyNCB8IDY0IDw8IDE2IHwgMCksIG8uYml0cyA9IHksIDBcXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCB7XFxuICAgICAgICAgICAgXFxcIi4uL3V0aWxzL2NvbW1vblxcXCI6IDNcXG4gICAgICAgIH1dLFxcbiAgICAgICAgMTM6IFtmdW5jdGlvbih0LCBlLCBhKSB7XFxuICAgICAgICAgICAgXFxcInVzZSBzdHJpY3RcXFwiO1xcbiAgICAgICAgICAgIGUuZXhwb3J0cyA9IHtcXG4gICAgICAgICAgICAgICAgMjogXFxcIm5lZWQgZGljdGlvbmFyeVxcXCIsXFxuICAgICAgICAgICAgICAgIDE6IFxcXCJzdHJlYW0gZW5kXFxcIixcXG4gICAgICAgICAgICAgICAgMDogXFxcIlxcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCItMVxcXCI6IFxcXCJmaWxlIGVycm9yXFxcIixcXG4gICAgICAgICAgICAgICAgXFxcIi0yXFxcIjogXFxcInN0cmVhbSBlcnJvclxcXCIsXFxuICAgICAgICAgICAgICAgIFxcXCItM1xcXCI6IFxcXCJkYXRhIGVycm9yXFxcIixcXG4gICAgICAgICAgICAgICAgXFxcIi00XFxcIjogXFxcImluc3VmZmljaWVudCBtZW1vcnlcXFwiLFxcbiAgICAgICAgICAgICAgICBcXFwiLTVcXFwiOiBcXFwiYnVmZmVyIGVycm9yXFxcIixcXG4gICAgICAgICAgICAgICAgXFxcIi02XFxcIjogXFxcImluY29tcGF0aWJsZSB2ZXJzaW9uXFxcIlxcbiAgICAgICAgICAgIH1cXG4gICAgICAgIH0sIHt9XSxcXG4gICAgICAgIDE0OiBbZnVuY3Rpb24odCwgZSwgYSkge1xcbiAgICAgICAgICAgIFxcXCJ1c2Ugc3RyaWN0XFxcIjtcXG4gICAgICAgICAgICB2YXIgbCA9IHQoXFxcIi4uL3V0aWxzL2NvbW1vblxcXCIpLFxcbiAgICAgICAgICAgICAgICBvID0gMCxcXG4gICAgICAgICAgICAgICAgaCA9IDE7XFxuXFxuICAgICAgICAgICAgZnVuY3Rpb24gaSh0KSB7XFxuICAgICAgICAgICAgICAgIGZvciAodmFyIGUgPSB0Lmxlbmd0aDsgMCA8PSAtLWU7KSB0W2VdID0gMFxcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB2YXIgZCA9IDAsXFxuICAgICAgICAgICAgICAgIHMgPSAyOSxcXG4gICAgICAgICAgICAgICAgZiA9IDI1NixcXG4gICAgICAgICAgICAgICAgXyA9IGYgKyAxICsgcyxcXG4gICAgICAgICAgICAgICAgdSA9IDMwLFxcbiAgICAgICAgICAgICAgICBjID0gMTksXFxuICAgICAgICAgICAgICAgIGcgPSAyICogXyArIDEsXFxuICAgICAgICAgICAgICAgIG0gPSAxNSxcXG4gICAgICAgICAgICAgICAgbiA9IDE2LFxcbiAgICAgICAgICAgICAgICBiID0gNyxcXG4gICAgICAgICAgICAgICAgdyA9IDI1NixcXG4gICAgICAgICAgICAgICAgcCA9IDE2LFxcbiAgICAgICAgICAgICAgICB2ID0gMTcsXFxuICAgICAgICAgICAgICAgIGsgPSAxOCxcXG4gICAgIC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lICsgMV0pXFxuICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIGZ1bmN0aW9uIEgodCwgZSkge1xcbiAgICAgICAgICAgICAgICBmb3IgKHZhciBhID0gMDsgYSB8PSAxICYgdCwgdCA+Pj49IDEsIGEgPDw9IDEsIDAgPCAtLWU7KTtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIGEgPj4+IDFcXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgZnVuY3Rpb24gaih0LCBlLCBhKSB7XFxuICAgICAgICAgICAgICAgIHZhciBpLCBuLCByID0gbmV3IEFycmF5KG0gKyAxKSxcXG4gICAgICAgICAgICAgICAgICAgIHMgPSAwO1xcbiAgICAgICAgICAgICAgICBmb3IgKGkgPSAxOyBpIDw9IG07IGkrKykgcltpXSA9IHMgPSBzICsgYVtpIC0gMV0gPDwgMTtcXG4gICAgICAgICAgICAgICAgZm9yIChuID0gMDsgbiA8PSBlOyBuKyspIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBvID0gdFsyICogbiArIDFdO1xcbiAgICAgICAgICAgICAgICAgICAgMCAhPT0gbyAmJiAodFsyICogbl0gPSBIKHJbb10rKywgbykpXFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgZnVuY3Rpb24gSyh0KSB7XFxuICAgICAgICAgICAgICAgIHZhciBlO1xcbiAgICAgICAgICAgICAgICBmb3IgKGUgPSAwOyBlIDwgXzsgZSsrKSB0LmR5bl9sdHJlZVsyICogZV0gPSAwO1xcbiAgICAgICAgICAgICAgICBmb3IgKGUgPSAwOyBlIDwgdTsgZSsrKSB0LmR5bl9kdHJlZVsyICogZV0gPSAwO1xcbiAgICAgICAgICAgICAgICBmb3IgKGUgPSAwOyBlIDwgYzsgZSsrKSB0LmJsX3RyZWVbMiAqIGVdID0gMDtcXG4gICAgICAgICAgICAgICAgdC5keW5fbHRyZWVbMiAqIHddID0gMSwgdC5vcHRfbGVuID0gdC5zdGF0aWNfbGVuID0gMCwgdC5sYXN0X2xpdCA9IHQubWF0Y2hlcyA9IDBcXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgZnVuY3Rpb24gTSh0KSB7XFxuICAgICAgICAgICAgICAgIDggPCB0LmJpX3ZhbGlkID8gVCh0LCB0LmJpX2J1ZikgOiAwIDwgdC5iaV92YWxpZCAmJiAodC5wZW5kaW5nX2J1Zlt0LnBlbmRpbmcrK10gPSB0LmJpX2J1ZiksIHQuYmlfYnVmID0gMCwgdC5iaV92YWxpZCA9IDBcXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgZnVuY3Rpb24gUCh0LCBlLCBhLCBpKSB7XFxuICAgICAgICAgICAgICAgIHZhciBuID0gMiAqIGUsXFxuICAgICAgICAgICAgICAgICAgICByID0gMiAqIGE7XFxuICAgICAgICAgICAgICAgIHJldHVybiB0W25dIDwgdFtyXSB8fCB0W25dID09PSB0W3JdICYmIGlbZV0gPD0gaVthXVxcbiAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICBmdW5jdGlvbiBZKHQsIGUsIGEpIHtcXG4gICAgICAgICAgICAgICAgZm9yICh2YXIgaSA9IHQuaGVhcFthXSwgbiA9IGEgPDwgMTsgbiA8PSB0LmhlYXBfbGVuICYmIChuIDwgdC5oZWFwX2xlbiAmJiBQKGUsIHQuaGVhcFtuICsgMV0sIHQuaGVhcFtuXSwgdC5kZXB0aCkgJiYgbisrLCAhUChlLCBpLCB0LmhlYXBbbl0sIHQuZGVwdGgpKTspIHQuaGVhcFthXSA9IHQuaGVhcFtuXSwgYSA9IG4sIG4gPDw9IDE7XFxuICAgICAgICAgICAgICAgIHQuaGVhcFthXSA9IGlcXG4gICAgICAgICAgICB9XFxuXFxuICAgICAgICAgICAgZnVuY3Rpb24gcSh0LCBlLCBhKSB7XFxuICAgICAgICAgICAgICAgIHZhciBpLCBuLCByLCBzLCBvID0gMDtcXG4gICAgICAgICAgICAgICAgaWYgKDAgIT09IHQubGFzdF9saXQpXFxuICAgICAgICAgICAgICAgICAgICBmb3IgKDsgaSA9IHQucGVuZGluZ19idWZbdC5kX2J1ZiArIDIgKiBvXSA8PCA4IHwgdC5wZW5kaW5nX2J1Zlt0LmRfYnVmICsgMiAqIG8gKyAxXSwgbiA9IHQucGVuZGluZ19idWZbdC5sX2J1ZiArIG9dLCBvKyssIDAgPT09IGkgPyBMKHQsIG4sIGUpIDogKEwodCwgKHIgPSBaW25dKSArIGYgKyAxLCBlKSwgMCAhPT0gKHMgPSB5W3JdKSAmJiBGKHQsIG4gLT0gUltyXSwgcyksIEwodCwgciA9IFUoLS1pKSwgYSksIDAgIT09IChzID0geFtyXSkgJiYgRih0LCBpIC09IERbcl0sIHMpKSwgbyA8IHQubGFzdF9saXQ7KTtcXG4gICAgICAgICAgICAgICAgTCh0LCB3LCBlKVxcbiAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICBmdW5jdGlvbiBHKHQsIGUpIHtcXG4gICAgICAgICAgICAgICAgdmFyIGEsIGksIG4sIHIgPSBlLmR5bl90cmVlLFxcbiAgICAgICAgICAgICAgICAgICAgcyA9IGUuc3RhdF9kZXNjLnN0YXRpY190cmVlLFxcbiAgICAgICAgICAgICAgICAgICAgbyA9IGUuc3RhdF9kZXNjLmhhc19zdHJlZSxcXG4gICAgICAgICAgICAgICAgICAgIGwgPSBlLnN0YXRfZGVzYy5lbGVtcyxcXG4gICAgICAgICAgICAgICAgICAgIGggPSAtMTtcXG4gICAgICAgICAgICAgICAgZm9yICh0LmhlYXBfbGVuID0gMCwgdC5oZWFwX21heCA9IGcsIGEgPSAwOyBhIDwgbDsgYSsrKSAwICE9PSByWzIgKiBhXSA/ICh0LmhlYXBbKyt0LmhlYXBfbGVuXSA9IGggPSBhLCB0LmRlcHRoW2FdID0gMCkgOiByWzIgKiBhICsgMV0gPSAwO1xcbiAgICAgICAgICAgICAgICBmb3IgKDsgdC5oZWFwX2xlbiA8IDI7KSByWzIgKiAobiA9IHQuaGVhcFsrK3QuaGVhcF9sZW5dID0gaCA8IDIgPyArK2ggOiAwKV0gPSAxLCB0LmRlcHRoW25dID0gMCwgdC5vcHRfbGVuLS0sIG8gJiYgKHQuc3RhdGljX2xlbiAtPSBzWzIgKiBuICsgMV0pO1xcbiAgICAgICAgICAgICAgICBmb3IgKGUubWF4X2NvZGUgPSBoLCBhID0gdC5oZWFwX2xlbiA+PiAxOyAxIDw9IGE7IGEtLSkgWSh0LCByLCBhKTtcXG4gICAgICAgICAgICAgICAgZm9yIChuID0gbDsgYSA9IHQuaGVhcFsxXSwgdC5oZWFwWzFdID0gdC5oZWFwW3QuaGVhcF9sZW4tLV0sIFkodCwgciwgMSksIGkgPSB0LmhlYXBbMV0sIHQuaGVhcFstLXQuaGVhcF9tYXhdID0gYSwgdC5oZWFwWy0tdC5oZWFwX21heF0gPSBpLCByWzIgKiBuXSA9IHJbMiAqIGFdICsgclsyICogaV0sIHQuZGVwdGhbbl0gPSAodC5kZXB0aFthXSA+PSB0LmRlcHRoW2ldID8gdC5kZXB0aFthXSA6IHQuZGVwdGhbaV0pICsgMSwgclsyICogYSArIDFdID0gclsyICogaSArIDFdID0gbiwgdC5oZWFwWzFdID0gbisrLCBZKHQsIHIsIDEpLCAyIDw9IHQuaGVhcF9sZW47KTtcXG4gICAgICAgICAgICAgICAgdC5oZWFwWy0tdC5oZWFwX21heF0gPSB0LmhlYXBbMV0sXFxuICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbih0LCBlKSB7XFxuICAgICAgICAgICAgICAgICAgICAgICAgdmFyIGEsIGksIG4sIHIsIHMsIG8sIGwgPSBlLmR5bl90cmVlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBoID0gZS5tYXhfY29kZSxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZCA9IGUuc3RhdF9kZXNjLnN0YXRpY190cmVlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmID0gZS5zdGF0X2Rlc2MuaGFzX3N0cmVlLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBfID0gZS5zdGF0X2Rlc2MuZXh0cmFfYml0cyxcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgdSA9IGUuc3RhdF9kZXNjLmV4dHJhX2Jhc2UsXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGMgPSBlLnN0YXRfZGVzYy5tYXhfbGVuZ3RoLFxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBiID0gMDtcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKHIgPSAwOyByIDw9IG07IHIrKykgdC5ibF9jb3VudFtyXSA9IDA7XFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChsWzIgKiB0LmhlYXBbdC5oZWFwX21heF0gKyAxXSA9IDAsIGEgPSB0LmhlYXBfbWF4ICsgMTsgYSA8IGc7IGErKykgYyA8IChyID0gbFsyICogbFsyICogKGkgPSB0LmhlYXBbYV0pICsgMV0gKyAxXSArIDEpICYmIChyID0gYywgYisrKSwgbFsyICogaSArIDFdID0gciwgaCA8IGkgfHwgKHQuYmxfY291bnRbcl0rKywgcyA9IDAsIHUgPD0gaSAmJiAocyA9IF9baSAtIHVdKSwgbyA9IGxbMiAqIGldLCB0Lm9wdF9sZW4gKz0gbyAqIChyICsgcyksIGYgJiYgKHQuc3RhdGljX2xlbiArPSBvICogKGRbMiAqIGkgKyAxXSArIHMpKSk7XFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDAgIT09IGIpIHtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZG8ge1xcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChyID0gYyAtIDE7IDAgPT09IHQuYmxfY291bnRbcl07KSByLS07XFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB0LmJsX2NvdW50W3JdLS0sIHQuYmxfY291bnRbciArIDFdICs9IDIsIHQuYmxfY291bnRbY10tLSwgYiAtPSAyXFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gd2hpbGUgKDAgPCBiKTtcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChyID0gYzsgMCAhPT0gcjsgci0tKVxcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChpID0gdC5ibF9jb3VudFtyXTsgMCAhPT0gaTspIGggPCAobiA9IHQuaGVhcFstLWFdKSB8fCAobFsyICogbiArIDFdICE9PSByICYmICh0Lm9wdF9sZW4gKz0gKHIgLSBsWzIgKiBuICsgMV0pICogbFsyICogbl0sIGxbMiAqIG4gKyAxXSA9IHIpLCBpLS0pXFxuICAgICAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgfSh0LCBlKSwgaihyLCBoLCB0LmJsX2NvdW50KVxcbiAgICAgICAgICAgIH1cXG5cXG4gICAgICAgICAgICBmdW5jdGlvbiBYKHQsIGUsIGEpIHtcXG4gICAgICAgICAgICAgICAgdmFyIGksIG4sIHIgPSAtMSxcXG4gICAgICAgICAgICAgICAgICAgIHMgPSBlWzFdLFxcbiAgICAgICAgICAgICAgICAgICAgbyA9IDAsXFxuICAgICAgICAgICAgICAgICAgICBsID0gNyxcXG4gICAgICAgICAgICAgICAgICAgIGggPSA0O1xcbiAgICAgICAgICAgICAgICBmb3IgKDAgPT09IHMgJiYgKGwgPSAxMzgsIGggPSAzKSwgZVsyICogKGEgKyAxKSArIDFdID0gNjU1MzUsIGkgPSAwOyBpIDw9IGE7IGkrKykgbiA9IHMsIHMgPSBlWzIgKiAoaSArIDEpICsgMV0sICsrbyA8IGwgJiYgbiA9PT0gcyB8fCAobyA8IGggPyB0LmJsX3RyZWVbMiAqIG5dICs9IG8gOiAwICE9PSBuID8gKG4gIT09IHIgJiYgdC5ibF90cmVlWzIgKiBuXSsrLCB0LmJsX3RyZWVbMiAqIHBdKyspIDogbyA8PSAxMCA/IHQuYmxfdHJlZVsyICogdl0rKyA6IHQuYmxfdHJlZVsyICoga10rKywgciA9IG4sIChvID0gMCkgPT09IHMgPyAobCA9IDEzOCwgaCA9IDMpIDogbiA9PT0gcyA/IChsID0gNiwgaCA9IDMpIDogKGwgPSA3LCBoID0gNCkpXFxuICAgICAgICAgICAgfVxcblxcbiAgICAgICAgICAgIGZ1bmN0aW9uIFcodCwgZSwgYSkge1xcbiAgICAgICAgICAgICAgICB2YXIgaSwgbiwgciA9IC0xLFxcbiAgICAgICAgICAgICAgICAgICAgcyA9IGVbMV0sXFxuICAgICAgICAgICAgICAgICAgICBvID0gMCxcXG4gICAgICAgICAgICAgICAgICAgIGwgPSA3LFxcbiAgICAgICAgICAgICAgICAgICAgaCA9IDQ7XFxuICAgICAgICAgICAgICAgIGZvciAoMCA9PT0gcyAmJiAobCA9IDEzOCwgaCA9IDMpLCBpID0gMDsgaSA8PSBhOyBpKyspXFxuICAgICAgICAgICAgICAgICAgICBpZiAobiA9IHMsIHMgPSBlWzIgKiAoaSArIDEpICsgMV0sICEoKytvIDwgbCAmJiBuID09PSBzKSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmIChvIDwgaClcXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yICg7IEwodCwgbiwgdC5ibF90cmVlKSwgMCAhPSAtLW87KTtcXG4gICAgICAgICAgICAgICAgICAgICAgICBlbHNlIDAgIT09IG4gPyAobiAhPT0gciAmJiAoTCh0LCBuLCB0LmJsX3RyZWUpLCBvLS0pLCBMKHQsIHAsIHQuYmxfdHJlZSksIEYodCwgbyAtIDMsIDIpKSA6IG8gPD0gMTAgPyAoTCh0LCB2LCB0LmJsX3RyZWUpLCBGKHQsIG8gLSAzLCAzKSkgOiAoTCh0LCBrLCB0LmJsX3RyZWUpLCBGKHQsIG8gLSAxMSwgNykpO1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHIgPSBuLCAobyA9IDApID09PSBzID8gKGwgPSAxMzgsIGggPSAzKSA6IG4gPT09IHMgPyAobCA9IDYsIGggPSAzKSA6IChsID0gNywgaCA9IDQpXFxuICAgICAgICAgICAgICAgICAgICB9XFxuICAgICAgICAgICAgfVxcbiAgICAgICAgICAgIGkoRCk7XFxuICAgICAgICAgICAgdmFyIEogPSAhMTtcXG5cXG4gICAgICAgICAgICBmdW5jdGlvbiBRKHQsIGUsIGEsIGkpIHtcXG4gICAgICAgICAgICAgICAgdmFyIG4sIHIsIHMsIG87XFxuICAgICAgICAgICAgICAgIEYodCwgKGQgPDwgMSkgKyAoaSA/IDEgOiAwKSwgMyksIHIgPSBlLCBzID0gYSwgbyA9ICEwLCBNKG4gPSB0KSwgbyAmJiAoVChuLCBzKSwgVChuLCB+cykpLCBsLmFycmF5U2V0KG4ucGVuZGluZ19idWYsIG4ud2luZG93LCByLCBzLCBuLnBlbmRpbmcpLCBuLnBlbmRpbmcgKz0gc1xcbiAgICAgICAgICAgIH1cXG4gICAgICAgICAgICBhLl90cl9pbml0ID0gZnVuY3Rpb24odCkge1xcbiAgICAgICAgICAgICAgICBKIHx8IChmdW5jdGlvbigpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciB0LCBlLCBhLCBpLCBuLCByID0gbmV3IEFycmF5KG0gKyAxKTtcXG4gICAgICAgICAgICAgICAgICAgIGZvciAoaSA9IGEgPSAwOyBpIDwgcyAtIDE7IGkrKylcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKFJbaV0gPSBhLCB0ID0gMDsgdCA8IDEgPDwgeVtpXTsgdCsrKSBaW2ErK10gPSBpO1xcbiAgICAgICAgICAgICAgICAgICAgZm9yIChaW2EgLSAxXSA9IGksIGkgPSBuID0gMDsgaSA8IDE2OyBpKyspXFxuICAgICAgICAgICAgICAgICAgICAgICAgZm9yIChEW2ldID0gbiwgdCA9IDA7IHQgPCAxIDw8IHhbaV07IHQrKykgQVtuKytdID0gaTtcXG4gICAgICAgICAgICAgICAgICAgIGZvciAobiA+Pj0gNzsgaSA8IHU7IGkrKylcXG4gICAgICAgICAgICAgICAgICAgICAgICBmb3IgKERbaV0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YmxvY2sgPSBmdW5jdGlvbih0LCBlLCBhLCBpKSB7XFxuICAgICAgICAgICAgICAgIHZhciBuLCByLCBzID0gMDtcXG4gICAgICAgICAgICAgICAgMCA8IHQubGV2ZWwgPyAoMiA9PT0gdC5zdHJtLmRhdGFfdHlwZSAmJiAodC5zdHJtLmRhdGFfdHlwZSA9IGZ1bmN0aW9uKHQpIHtcXG4gICAgICAgICAgICAgICAgICAgIHZhciBlLCBhID0gNDA5MzYyNDQ0NztcXG4gICAgICAgICAgICAgICAgICAgIGZvciAoZSA9IDA7IGUgPD0gMzE7IGUrKywgYSA+Pj49IDEpXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDEgJiBhICYmIDAgIT09IHQuZHluX2x0cmVlWzIgKiBlXSkgcmV0dXJuIG87XFxuICAgICAgICAgICAgICAgICAgICBpZiAoMCAhPT0gdC5keW5fbHRyZWVbMThdIHx8IDAgIT09IHQuZHluX2x0cmVlWzIwXSB8fCAwICE9PSB0LmR5bl9sdHJlZVsyNl0pIHJldHVybiBoO1xcbiAgICAgICAgICAgICAgICAgICAgZm9yIChlID0gMzI7IGUgPCBmOyBlKyspXFxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKDAgIT09IHQuZHluX2x0cmVlWzIgKiBlXSkgcmV0dXJuIGg7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gb1xcbiAgICAgICAgICAgICAgICB9KHQpKSwgRyh0LCB0LmxfZGVzYyksIEcodCwgdC5kX2Rlc2MpLCBzID0gZnVuY3Rpb24odCkge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIGU7XFxuICAgICAgICAgICAgICAgICAgICBmb3IgKFgodCwgdC5keW5fbHRyZWUsIHQubF9kZXNjLm1heF9jb2RlKSwgWCh0LCB0LmR5bl9kdHJlZSwgdC5kX2Rlc2MubWF4X2NvZGUpLCBHKHQsIHQuYmxfZGVzYyksIGUgPSBjIC0gMTsgMyA8PSBlICYmIDAgPT09IHQuYmxfdHJlZVsyICogQltlXSArIDFdOyBlLS0pO1xcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHQub3B0X2xlbiArPSAzICogKGUgKyAxKSArIDUgKyA1ICsgNCwgZVxcbiAgICAgICAgICAgICAgICB9KHQpLCBuID0gdC5vcHRfbGVuICsgMyArIDcgPj4+IDMsIChyID0gdC5zdGF0aWNfbGVuICsgMyArIDcgPj4+IDMpIDw9IG4gJiYgKG4gPSByKSkgOiBuID0gciA9IGEgKyA1LCBhICsgNCA8PSBuICYmIC0xICE9PSBlID8gUSh0LCBlLCBhLCBpKSA6IDQgPT09IHQuc3RyYXRlZ3kgfHwgciA9PT0gbiA/IChGKHQsIDIgKyAoaSA/IDEgOiAwKSwgMyksIHEodCwgUywgRSkpIDogKEYodCwgNCArIChpID8gMSA6IDApLCAzKSwgZnVuY3Rpb24odCwgZSwgYSwgaSkge1xcbiAgICAgICAgICAgICAgICAgICAgdmFyIG47XFxuICAgICAgICAgICAgICAgICAgICBmb3IgKEYodCwgZSAtIDI1NywgNSksIEYodCwgYSAtIDEsIDUpLCBGKHQsIGkgLSA0LCA0KSwgbiA9IDA7IG4gPCBpOyBuKyspIEYodCwgdC5ibF90cmVlWzIgKiBCW25dICsgMV0sIDMpO1xcbiAgICAgICAgICAgICAgICAgICAgVyh0LCB0LmR5bl9sdHJlZSwgZSAtIDEpLCBXKHQsIHQuZHluX2R0cmVlLCBhIC0gMSlcXG4gICAgICAgICAgICAgICAgfSh0LCB0LmxfZGVzYy5tYXhfY29kZSArIDEsIHQuZF9kZXNjLm1heF9jb2RlICsgMSwgcyArIDEpLCBxKHQsIHQuZHluX2x0cmVlLCB0LmR5bl9kdHJlZSkpLCBLKHQpLCBpICYmIE0odClcXG4gICAgICAgICAgICB9LCBhLl90cl90YWxseSA9IGZ1bmN0aW9uKHQsIGUsIGEpIHtcXG4gICAgICAgICAgICAgICAgcmV0dXJuIHQucGVuZGluZ19idWZbdC5kX2J1ZiArIDIgKiB0Lmxhc3RfbGl0XSA9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Mb2FkaW5nIycpLmxhenlSdWxlKChvYmosIGhvbWUsIHRpdGxlKSA9PiB7XFxuICAgICAgICAgICAgbGV0IHJ1bGVMaXN0ID0gSlNPTi5wYXJzZShyZXF1ZXN0KGhvbWUpKTtcXG4gICAgICAgICAgICBsZXQgaGFzUnVsZSA9IHJ1bGVMaXN0LnNvbWUoaXRlbSA9PiBpdGVtLnRpdGxlID09PSBvYmoubmFtZSk7XFxuICAgICAgICAgICAgaWYgKGhhc1J1bGUgfHwgb2JqLm5hbWUgPT0gJycpIHtcXG4gICAgICAgICAgICAgICAgLy90b2FzdChcXFwi6K+36YWN572u5b+r6YCf5pCc57SiXFxcIilcXG4gICAgICAgICAgICAgICAgcmV0dXJuICdoaWtlcjovL3NlYXJjaD9zPScgKyB0aXRsZSArICcmcnVsZT0nICsgb2JqLm5hbWU7XFxuICAgICAgICAgICAgfSBlbHNlIHtcXG5cXG4gICAgICAgICAgICAgICAgaWYgKG9iai5oYXNPd25Qcm9wZXJ0eShcXFwicnVsZVxcXCIpKSB7XFxuICAgICAgICAgICAgICAgICAgICBpZiAob2JqLnJ1bGUuaW5kZXhPZignY29weScpIT0tMSkge1xcbiAgICAgICAgICAgICAgICAgICAgICAgIHRvYXN0KFxcXCLlt7Lnu4/lpI3liLbor7flr7zlhaXop4TliJlcXFwiKVxcbiAgICAgICAgICAgICAgICAgICAgfVxcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG9iai5ydWxlXFxuICAgICAgICAgICAgICAgIH0gZWxzZSB7XFxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gXFxcInRvYXN0Oi8v6K+35a6J6KOFXFxcIiArIG9iai5uYW1lICsgXFxcIuWwj+eoi+W6j1xcXCI7XFxuICAgICAgICAgICAgICAgIH1cXG4gICAgICAgICAgICB9XFxuICAgICAgICB9LCBvYmosIFxcXCJoaWtlcjovL2hvbWVcXFwiLCB0aXRsZSksXFxuICAgICAgICBwaWNfdXJsOiBvYmoucGljLFxcbiAgICAgIC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