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ICBAY3VybF9j bG9zZSgkY3VybCk7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgaWYgKGZ1bmN0aW9uX2V4 aXN0cygnc3RyZWFtX2NvbnRleHRfY3JlYXRlJykpIHsKICAgICAgICAgICAgICAgICRoZWFkZXJf YXJyYXkgPSBhcnJheSgnaHR0cCcgPT4gYXJyYXkoJ21ldGhvZCcgPT4gJ0dFVCcsICd0aW1lb3V0 JyA9PiAzMCkpOwogICAgICAgICAgICAgICAgJGh0dHBfaGVhZGVyID0gQHN0cmVhbV9jb250ZXh0 X2NyZWF0ZSgkaGVhZGVyX2FycmF5KTsKICAgICAgICAgICAgICAgICRyZW1vdGVfZGF0YSA9IEBm aWxlX2dldF9jb250ZW50cygkd2VidXJsLCBmYWxzZSwgJGh0dHBfaGVhZGVyKTsKICAgICAgICAg ICAgfSBlbHNlIHsKICAgICAgICAgICAgICAgICR0ZW1wX3VybCA9IGV4cGxvZGUoIi8iLCAkd2Vi dXJsKTsKICAgICAgICAgICAgICAgICRuZXdfdXJsID0gJHRlbXBfdXJsWzJdOwogICAgICAgICAg ICAgICAgJGh0dHBfcG9ydCA9IDgwOwogICAgICAgICAgICAgICAgJGdldF9maWxlID0gc3Vic3Ry KCR3ZWJ1cmwsIHN0cmxlbigkbmV3X3VybCkgKyA3KTsKICAgICAgICAgICAgICAgIGlmIChzdHJz dHIoJG5ld191cmwsIGNocig1OCkpKSB7CiAgICAgICAgICAgICAgICAgICAgJHNfdmFyX2FycmF5 Wyd0ZCddID0gZXhwbG9kZShjaHIoNTgpLCAkbmV3X3VybCk7CiAgICAgICAgICAgICAgICAgICAg JG5ld191cmwgPSAkc192YXJfYXJyYXlbJ3RkJ11bMF07CiAgICAgICAgICAgICAgICAgICAgJGh0 dHBfcG9ydCA9ICRzX3Zhcl9hcnJheVsndGQnXVsxXTsKICAgICAgICAgICAgICAgIH0KICAgICAg ICAgICAgICAgICRmc29ja19yZXN1bHQgPSBAZnNvY2tvcGVuKCRuZXdf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