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sID0gc2NhbGFyKEBhcnJheSk7Cm15ICRmbnNvdXJjZSA9ICRhcnJheVskbC0xXTsKJGZuc291cmNlID1+IHMvKFswLTldWzAtOV1bMC05XVswLTldKVwueG1sJC8vOwoKbXkgJGZueWVhciA9ICQxOyAgICMgJDEgY29udGFpbnMgc3Vic3RyaW5nIGluIGZpcnN0IGJyYWNrZXQgaW4gcmVnZXggYWJvdmUKbXkgJGZuWVkgICA9IHN1YnN0cigkZm55ZWFyLCAyLCAyKTsKCgojIG1vbnRocwpteSAlbW9udGhzID0gKAogICAgICIwMSIgPT4gIkpBTiIsCiAgICAgIjAyIiA9PiAiRkVCIiwKICAgICAiMDMiID0+ICJNQVIiLAogICAgICIwNCIgPT4gIkFQUiIsCiAgICAgIjA1IiA9PiAiTUFZIiwKICAgICAiMDYiID0+ICJKVU4iLAogICAgICIwNyIgPT4gIkpVTCIsCiAgICAgIjA4IiA9PiAiQVVHIiwKICAgICAiMDkiID0+ICJTRVAiLAogICAgICIxMCIgPT4gIk9DVCIsCiAgICAgIjExIiA9PiAiTk9WIiwKICAgICAiMTIiID0+ICJERUMiLAogICAgICk7CgpteSAlbW9udGhuYW1lcyA9ICgKICAgICAiMDEiID0+ICJKYW51YXJ5IiwKICAgICAiMDIiID0+ICJGZWJydWFyeSIsCiAgICAgIjAzIiA9PiAiTWFyY2giLAogICAgICIwNCIgPT4gIkFwcmlsIiwKICAgICAiMDUiID0+ICJNYXkiLAogICAgICIwNiIgPT4gIkp1bmUiLAogICAgICIwNyIgPT4gIkp1bHkiLAogICAgICIwOCIgPT4gIkF1Z3VzdCIsCiAgICAgIjA5IiA9PiAiU2VwdGVtYmVyIiwKICAgICAiMTAiID0+ICJPY3RvYmVyIiwKICAgICAiMTEiID0+ICJOb3ZlbWJlciIsCiAgICAgIjEyIiA9PiAiRGVjZW1iZXIiLAogICAgICk7CgpteSAlbWFwcGluZyA9ICgpOwokbWFwcGluZ3siYWlrYWthdXNpIn0gICA9ICJaZWl0c2NocmlmdC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gQ1JFQVRJTkcgVEVJSEVBREVSCiAgICAjLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0KICAgIAp9CgpzdWIgc2V0UCB7CiAgICBteSAoJHBhcmFncmFwaCkgPSBAXzsKICAgIAogICAgJHBhcmFncmFwaC0+c2V0X2dpKCdwJyk7CiAgICAKICAgICMgPHBhcmFncmFwaCBpZD0icC1iY2QwZjNmYS1iYmQzZGFjNC04MTVlYWQ3YSIgc3VtX2xhbmc9InxmaW46MXwiPgogICAgIyBhdHRzIG9mIDxwYXJhZ3JhcGg+OgogICAgIyAgICBAaWQgICAgICAgIFVTRQogICAgIyAgICBAc3VtX2xhbmcgIFVTRTogcHV0IGluIHhtbDpsYW5nIGFuZCBwcmVmaXggdGhlIHZhbHVlIHdpdGggIngtIiBmb3IgcHJpdmF0ZSB2YWx1ZQogICAgCiAgICAkcGFyYWdyYXBoLT5zZXRfYXR0KCJ4bWw6bGFuZyIsICJ4LSIgLiAkcGFyYWdyYXBoLT5hdHQoInN1bV9sYW5nIikpOwogICAgJHBhcmFncmFwaC0+ZGVsX2F0dCgic3VtX2xhbmciKTsKICAgICMgJHBhcmFncmFwaC0+Y2hhbmdlX2F0dF9uYW1lKCdpZCcsICd4bWw6aWQnKTsKICAgICRwYXJhZ3JhcGgtPmRlbF9hdHQoImlkIik7ICAgICAgICAgICAgICAjIGRpZXNlIGlkIGlzdCBhdWNoIG5pY2h0IGVpbmRldXRpZyEhCn0gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKc3ViIHNldFMgewogICAgbXkgKCRzZW50ZW5jZSkgPSBAXzsKICAgIAogICAgJHNlbnRlbmNlLT5zZXRfZ2koJ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