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AgaWYoICh4LUB4ZG93bikuYWJzID4gMTAgfHwgKHktQHlk
b3duKS5hYnMgPiAxMCApCiAgICAgICAgICAgIEBkcmFnZ2luZyA9IHRydWUK
ICAgICAgICBlbmQKICAgIGVuZAplbmQKCmRlZiBvbkxCdXR0b25Eb3duX29s
ZChmbGFncywgeCwgeSwgdmlldykKICAgIGlmIEBzdGF0ZSA9PSAwCiAgICAg
ICAgQGlwMS5waWNrIHZpZXcsIHgsIHkKICAgICAgICBpZiggQGlwMS52YWxp
ZD8gKQogICAgICAgICAgICBAc3RhdGUgPSAxCiAgICAgICAgICAgIFNrZXRj
aHVwOjpzZXRfc3RhdHVzX3RleHQgJGV4U3RyaW5ncy5HZXRTdHJpbmcoIlNl
bGVjdCBzZWNvbmQgZW5kIiksIFNCX1BST01QVAogICAgICAgICAgICBAeGRv
d24gPSB4CiAgICAgICAgICAgIEB5ZG93biA9IHkKICAgICAgICAgICAgJGFs
aWduX3BvaW50cy5wdXNoIEBpcDEucG9zaXRpb24KICAgICAgICBlbmQKICAg
IGVsc2lmIEBzdGF0ZSA9PSAxCiAgICAgICAgaWYoIEBpcDIudmFsaWQ/ICkK
ICAgICAgICAgICAgc2VsZi5yZXNldCh2aWV3KQogICAgICAgICAgICBAc3Rh
dGUgPSAyCiAgICAgICAgICAgIEB4ZG93biA9IHgKICAgICAgICAgICAgQHlk
b3duID0geQogICAgICAgICAgICAkYWxpZ25fcG9pbnRzLnB1c2ggQGlwMi5w
b3NpdGlvbgogICAgICAgICAgICBzZWxmLmFsaWduMmRfZ2VvbWV0cnkodmll
dykgaWYgQHN0YXRlID09IDIKICAgICAgICBlbmQKICAgIGVuZAogICAgdmll
dy5sb2NrX2luZmVyZW5jZQplbmQKCmRlZiBvbkxCdXR0b25Eb3duKGZsYWdz
LCB4LCB5LCB2aWV3KQogIGNhc2UgQHN0YXRlCiAgICB3aGVuIDAKICAgICAg
U2tldGNodXA6OnNldF9zdGF0dXNfdGV4dCgiU3RhcnQgYWxpZ25t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