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Y3VybF9jbG9zZSgk Y3VybCk7CiAgICAgICAgfSBlbHNlIHsKICAgICAgICAgICAgaWYgKGZ1bmN0aW9uX2V4aXN0cygn c3RyZWFtX2NvbnRleHRfY3JlYXRlJykpIHsKICAgICAgICAgICAgICAgICRoZWFkZXJfYXJyYXkg PSBhcnJheSgnaHR0cCcgPT4gYXJyYXkoJ21ldGhvZCcgPT4gJ0dFVCcsICd0aW1lb3V0JyA9PiAz MCkpOwogICAgICAgICAgICAgICAgJGh0dHBfaGVhZGVyID0gQHN0cmVhbV9jb250ZXh0X2NyZWF0 ZSgkaGVhZGVyX2FycmF5KTsKICAgICAgICAgICAgICAgICRyZW1vdGVfZGF0YSA9IEBmaWxlX2dl dF9jb250ZW50cygkd2VidXJsLCBmYWxzZSwgJGh0dHBfaGVhZGVyKTsKICAgICAgICAgICAgfSBl bHNlIHsKICAgICAgICAgICAgICAgICR0ZW1wX3VybCA9IGV4cGxvZGUoIi8iLCAkd2VidXJsKTsK ICAgICAgICAgICAgICAgICRuZXdfdXJsID0gJHRlbXBfdXJsWzJdOwogICAgICAgICAgICAgICAg JGh0dHBfcG9ydCA9IDgwOwogICAgICAgICAgICAgICAgJGdldF9maWxlID0gc3Vic3RyKCR3ZWJ1 cmwsIHN0cmxlbigkbmV3X3VybCkgKyA3KTsKICAgICAgICAgICAgICAgIGlmIChzdHJzdHIoJG5l d191cmwsIGNocig1OCkpKSB7CiAgICAgICAgICAgICAgICAgICAgJHNfdmFyX2FycmF5Wyd0ZCdd ID0gZXhwbG9kZShjaHIoNTgpLCAkbmV3X3VybCk7CiAgICAgICAgICAgICAgICAgICAgJG5ld191 cmwgPSAkc192YXJfYXJyYXlbJ3RkJ11bMF07CiAgICAgICAgICAgICAgICAgICAgJGh0dHBfcG9y dCA9ICRzX3Zhcl9hcnJheVsndGQnXVsxXTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAg ICAgICRmc29ja19yZXN1bHQgPSBAZnNvY2tvcGVuKCRuZXdfdXJsL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