import java.util.StringTokenizer;
class Ideone {
public static void main
(String[] args
) { }
}
//https://pt.stackoverflow.com/q/311376/101
aW1wb3J0IGphdmEudXRpbC5TdHJpbmdUb2tlbml6ZXI7CgpjbGFzcyBJZGVvbmUgewogICAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4gKFN0cmluZ1tdIGFyZ3MpIHsKICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4obmV3IFN0cmluZ1Rva2VuaXplcigiICIpLmNvdW50VG9rZW5zKCkgPiAxKTsKICAgICAgICBTeXN0ZW0ub3V0LnByaW50bG4obmV3IFN0cmluZ1Rva2VuaXplcigiIGEiKS5jb3VudFRva2VucygpID4gMSk7CiAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKG5ldyBTdHJpbmdUb2tlbml6ZXIoImEgIikuY291bnRUb2tlbnMoKSA+IDEpOwogICAgICAgIFN5c3RlbS5vdXQucHJpbnRsbihuZXcgU3RyaW5nVG9rZW5pemVyKCIgYSAiKS5jb3VudFRva2VucygpID4gMSk7CiAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKG5ldyBTdHJpbmdUb2tlbml6ZXIoImEiKS5jb3VudFRva2VucygpID4gMSk7CiAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKG5ldyBTdHJpbmdUb2tlbml6ZXIoIiBhIGIiKS5jb3VudFRva2VucygpID4gMSk7CiAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKG5ldyBTdHJpbmdUb2tlbml6ZXIoImEgYiIpLmNvdW50VG9rZW5zKCkgPiAxKTsKICAgIH0KfQoKLy9odHRwczovL3B0LnN0YWNrb3ZlcmZsb3cuY29tL3EvMzExMzc2LzEwMQ==