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hbWUoJ2lkJywgJ3htbDppZCcpOwogICAgJHBhcmFncmFwaC0+ZGVsX2F0dCgiaWQiKTsgICAgICAgICAgICAgICMgZGllc2UgaWQgaXN0IGF1Y2ggbmljaHQgZWluZGV1dGlnISEKfSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIApzdWIgc2V0UyB7CiAgICBteSAoJHNlbnRlbmNlKSA9IEBfOwogICAgCiAgICAkc2VudGVuY2UtPnNldF9naSgncycpOwoJICAgIAogICAgIyB0aGUgYXR0cyBvZiA8c2VudGVuY2U+OgogICAgIyAgICBVU0UgICAxIEBpZD0icy1iY2QwZjNmYS1iYmQzZGFjNC1mNzQyOTA5MCIKICAgICMgICAgVVNFICAgMiBAbGFuZz0iZmluIiAtPiB4bWw6bGFuZyAKICAgICMgICAgPyAgICAgMyBAbGFuZ19jb25mPSIwLjY3MzQ4NTMiPiAtPiBUb0RvIEBjZXJ0ID8JICAgIAogICAgCiAgICAjIHNldCBhdHRycyBvZiA8cz4KICAgICRzZW50ZW5jZS0+c2V0X2F0dCgieG1sOmxhbmciLCAkc2VudGVuY2UtPmF0dCgibGFuZyIpKTsgICMgVG9EbzogY29udmVydCB0aGUgdmFsdWUgLyBpbnRyb2R1Y2UgYSBoYXNoIGZvciBsb29rdXAgKGlucHV0IHZhbHVlczogImZpbiIsICJ4eHgiLCAuLi4uKQogICAgIyAkc2VudGVuY2UtPmNoYW5nZV9hdHRfbmFtZSgnaWQnLCAneG1sOmlkJyk7ICAgICAgICAgICAgIyBuaWNodCBlaW5kZXV0aWcKICAgICRzZW50ZW5jZS0+ZGVsX2F0dCgnaWQnKTsKICAgICRzZW50ZW5jZS0+ZGVsX2F0dCgibGFuZyI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vZiBkZXBoZWFkKQogICAgIyAgVVNFIFsyXSBsZW1tYQogICAgIyAgPyAgIFszXSBsZW1tYWNvbXAgICAobGVtbWEgd2l0aCBjb21wb3VuZCBpbmZvIC0gY291bGQgZ28gaW4gQG5vcm0sIGFzIHRhZyBhYnVzZT8pCiAgICAjICBVU0UgWzRdIHBvcyAKICAgICMgIFVTRSBbNV0gbXNkIAogICAgIyAgVVNFIFs2XSBkZXBoZWFkCiAgICAjICBVU0UgWzddIGRlcHJlbCAKICAgICMgICAgICBbOF0gY29udGVudCAgIChvY3ItcHJvY2VzcykKICAgICMgICAgICBbOV0gdnBvcyAgICAgIChvY3ItcHJvY2VzcykKICAgICMgICAgIFsxMF0gb2NyICAgICAgIChvY3ItcHJvY2VzcykKICAgICMgICAgIFsxMV0gY2MgICAgICAgIChvY3ItcHJvY2VzcykKICAgICMgICAgIFsxMl0gaHlwaCAgICAgIChvY3ItcHJvY2VzcykKICAgICMgICAgIFsxM10gc3R5bGUgICAgIChvY3ItcHJvY2VzcykKICAgICMgICAgIFsxNF0gbGV4ICAgICAgIChrb3JwIHNlbWFudGljIGRpc2FtYmlndWF0aW9uIGZyb20gRyJvdGVib3JnKQogICAgCiAgICAjIHNldCB0aGUgYXR0cmlidXRlcyBvZiA8dz46CiAgICAkd19lbGVtZW50LT5zZXRfYXR0KCJuIiwgICAgICAkdGFnc1sxXSk7CiAgICAKICAgICMgJHdfZWxlbWVudC0+c2V0X2F0dCgiaWQiLCAgICAgIndfIiAuICRuYW1lYXJyYXlbNF0gLiAkc2VudGVuY2UtPmF0dCgieG1sOmlkIikgLiAiXyIgLiAkdGFnc1sxXSk7CiAgICAjIHNvIHp1c2FtbWVuZ2ViYXV0ZSBJRCBpc3QgYXVjaCBuaWNodCBlaW5kZXV0aWcuLi4KICAgICR3X2VsZW1lbnQtPmRlbF9hdHQoImlkIik7CgogICAgJHdfZWxlbWVudC0+c2V0X2F0dCgibGVtbWEiLCAgJGxfc3RyaW5nKTsKCiAgICAjIC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