import java.util.*;
import java.lang.*;
import java.io.*;
class Main
{
public static void main
(String[] args
) {
Scanner in
= new Scanner
(System.
in); for (int i = 0; i < c.length(); i++) {
if (c.charAt(i) <= 'z' && c.charAt(i) >= 'a')
else
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CgpjbGFzcyBNYWluCnsKCXB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKQoJewoJCVNjYW5uZXIgaW4gPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwoJCVN0cmluZyBjID0gaW4ubmV4dExpbmUoKTsKCQlTdHJpbmcgc3RyID0gIiI7CiAgICAgICAgZm9yIChpbnQgaSA9IDA7IGkgPCBjLmxlbmd0aCgpOyBpKyspIHsKICAgICAgICAgICAgaWYgKGMuY2hhckF0KGkpIDw9ICd6JyAmJiBjLmNoYXJBdChpKSA+PSAnYScpCiAgICAgICAgICAgICAgICBzdHIgKz0gQ2hhcmFjdGVyLnRvVXBwZXJDYXNlKGMuY2hhckF0KGkpKTsKICAgICAgICAgICAgZWxzZQogICAgICAgICAgICAgICAgc3RyICs9IENoYXJhY3Rlci50b0xvd2VyQ2FzZShjLmNoYXJBdChpKSk7CiAgICAgICAgfQogICAgICAgIFN5c3RlbS5vdXQucHJpbnQoc3RyKTsKCX0KfQ==