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JfMTAwMSA9IGZpbGVfcHRyXzEwMDEgKyBzdHJsZW4oZmlsZV9wdHJfMTAwMSkgLSAxOyAgIFwNCisgICAgICAgIGNoYXIgbGluZV8xMDAxWzEwXSA9IHswfTsgXA0KKyAgICAgICAgc3ByaW50ZihsaW5lXzEwMDEsICIlZCIsIF9fTElORV9fKTsgXA0KKyAgICAgICAgd2hpbGUocHRyXzEwMDEgPj0gZmlsZV9wdHJfMTAwMSAmJiAqcHRyXzEwMDEpeyBcDQorICAgICAgICAgICAgaWYoKnB0cl8xMDAxID09ICcvJykgXA0KKyAgICAgICAgICAgICAgICAgYnJlYWs7IFwNCisgICAgICAgICAgICBwdHJfMTAwMS0tOyBcDQorICAgICAgICB9IFwNCisgICAgICAgIGZ1bl9wdHJfbG9nKExPR19JTkZPX0xFVkVMLCAiJXMjJXM6IFtsb2dfY2hlY2tdIiBmbXQsIHB0cl8xMDAxICsgMSwgbGluZV8xMDAxLCAjI2FyZ3MpOyBcDQorICAgIH0gd2hpbGUoMCkNCisNCisjZGVmaW5lIExPR1coZm10LCBhcmdzLi4uKSBcDQorICAgIGRveyBcDQorICAgICAgICBjaGFyICpmaWxlX3B0cl8xMDAxID0gX19GSUxFX187IFwNCisgICAgICAgIGNoYXIgKnB0cl8xMDAxID0gZmlsZV9wdHJfMTAwMSArIHN0cmxlbihmaWxlX3B0cl8xMDAxKSAtIDE7ICAgXA0KKyAgICAgICAgY2hhciBsaW5lXzEwMDFbMTBdID0gezB9OyBcDQorICAgICAgICBzcHJpbnRmKGxpbmVfMTAwMSwgIiVkIiwgX19MSU5FX18pOyBcDQorICAgICAgICB3aGlsZShwdHJfMTAwMSA+PSBmaWxlX3B0cl8xMDAxICYmICpwdHJfMTAwMSl7IFwNCisgICAgICAgICAgICBpZigqcHRyXzEwMDEgPT0gJy8nKSBcDQorICAgICAgICAgICAgICAgICBicmVhazsgXA0KKyAgICAgICAgICAgIHB0cl8xMDAxLS07IFwNCisgICAgICAgIH0gXA0KKyAgICAgIC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