public class Main {
public static void main
(String[] args
) {
char lastLetter = 0;
boolean isDigit = false;
int digit = 0;
for(char c : s.toCharArray()) {
isDigit = true;
digit = digit*10 + (c-'0');
continue;
}
if(isDigit) {
for(int i = 0; i < digit-1; i++) {
}
isDigit = false;
digit = 0;
}
lastLetter = c;
}
}
}
cHVibGljIGNsYXNzIE1haW4gewogICAgcHVibGljIHN0YXRpYyB2b2lkIG1haW4oU3RyaW5nW10gYXJncykgewogICAgICAgIFN0cmluZyBzID0gImgxMGp2MnNmIjsKCiAgICAgICAgY2hhciBsYXN0TGV0dGVyID0gMDsKICAgICAgICBib29sZWFuIGlzRGlnaXQgPSBmYWxzZTsKICAgICAgICBpbnQgZGlnaXQgPSAwOwogICAgICAgIGZvcihjaGFyIGMgOiBzLnRvQ2hhckFycmF5KCkpIHsKICAgICAgICAgICAgaWYoQ2hhcmFjdGVyLmlzRGlnaXQoYykpIHsKICAgICAgICAgICAgICAgIGlzRGlnaXQgPSB0cnVlOwogICAgICAgICAgICAgICAgZGlnaXQgPSBkaWdpdCoxMCArIChjLScwJyk7CiAgICAgICAgICAgICAgICBjb250aW51ZTsKICAgICAgICAgICAgfQogICAgICAgICAgICBpZihpc0RpZ2l0KSB7CiAgICAgICAgICAgICAgICBmb3IoaW50IGkgPSAwOyBpIDwgZGlnaXQtMTsgaSsrKSB7CiAgICAgICAgICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludChsYXN0TGV0dGVyKTsKICAgICAgICAgICAgICAgIH0KICAgICAgICAgICAgICAgIGlzRGlnaXQgPSBmYWxzZTsKICAgICAgICAgICAgICAgIGRpZ2l0ID0gMDsKICAgICAgICAgICAgfQogICAgICAgICAgICBTeXN0ZW0ub3V0LnByaW50KGxhc3RMZXR0ZXIpOwogICAgICAgICAgICBsYXN0TGV0dGVyID0gYzsKICAgICAgICB9CiAgICAgICAgU3lzdGVtLm91dC5wcmludChsYXN0TGV0dGVyKTsKICAgIH0KfQ==