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