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ID0gInIiCisgIGxldCBpY2hvaWNlID0gMQorIGVuZGlmCisKKyB3aGlsZSBpY2hvaWNlIDw9IGE6MAorCisgICIgYXR0ZW1wdCB0byByZXBlYXQgd2l0aCBwcmV2aW91cyBob3N0LWZpbGUtZXRjCisgIGlmIGV4aXN0cygiYjpuZXRyd19sYXN0ZmlsZSIpICYmIGE6MCA9PSAwCisiICAgY2FsbCBEZWNobygidXNpbmcgYjpuZXRyd19sYXN0ZmlsZTwiIC4gYjpuZXRyd19sYXN0ZmlsZSAuICI+IikKKyAgIGxldCBjaG9pY2UgPSBiOm5ldHJ3X2xhc3RmaWxlCisgICBsZXQgaWNob2ljZT0gaWNob2ljZSArIDEKKworICBlbHNlCisgICBleGUgImxldCBjaG9pY2U9IGE6IiAuIGljaG9pY2UKKyIgICBjYWxsIERlY2hvKCJOZXRSZWFkMTogY2hvaWNlPCIgLiBjaG9pY2UgLiAiPiIpCisKKyAgICIgUmVjb25zdHJ1Y3QgQ2hvaWNlIGlmIGNob2ljZSBzdGFydHMgd2l0aCAnIicKKyAgIGlmIG1hdGNoKGNob2ljZSwiPyIpID09IDAKKyAgICBlY2hvICdOZXRSZWFkIFVzYWdlOicKKyAgICBlY2hvICc6TnJlYWQgbWFjaGluZTpwYXRoICAgICAgICAgICAgICAgICAgICAgICAgIHVzZXMgcmNwJworICAgIGVjaG8gJzpOcmVhZCAibWFjaGluZSBwYXRoIiAgICAgICAgICAgICAgICAgICAgICAgdXNlcyBmdHAgICB3aXRoIDwubmV0cmM+JworICAgIGVjaG8gJzpOcmVhZCAibWFjaGluZSBpZCBwYXNzd29yZCBwYXRoIiAgICAgICAgICAgdXNlcyBmdHAnCisgICAgZWNobyAnOk5yZWFkIGRhdjovL21hY2hpbmVbOnBvcnRdL3BhdGggICAgICAgICAgICB1c2VzIGNhZGF2ZXInCisgICAgZWNobyAnOk5yZWFkIGZldGNoOi8vbWFjaGluZS9wYXRoICAgICAgICAgICAgICAgICB1c2VzIGZldGNoJworICAgIGVj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