import java.util.*;
import java.util.regex.*;
class rTest {
public static void main
(String[] args
) {
String s
= "I have been stuck on this problem forever quick brown fox jumps over"; String r
= s.
replaceAll("(?<=(?:^|\\G)\\S*\\s\\S*\\s\\S*)\\s",
"_");
String x
= "I have been stuck on this problem forever quick brown fox jumps over"; String m
= x.
replaceAll("(?<=(^|\\G)\\S{0,100}\\s\\S{0,100}\\s\\S{0,100})\\s",
"_");
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS51dGlsLnJlZ2V4Lio7CgoKY2xhc3MgclRlc3QgewogIHB1YmxpYyBzdGF0aWMgdm9pZCBtYWluIChTdHJpbmdbXSBhcmdzKSB7CgpTdHJpbmcgcyA9ICJJIGhhdmUgYmVlbiBzdHVjayBvbiB0aGlzIHByb2JsZW0gZm9yZXZlciBxdWljayBicm93biBmb3gganVtcHMgb3ZlciI7ClN0cmluZyByID0gcy5yZXBsYWNlQWxsKCIoPzw9KD86XnxcXEcpXFxTKlxcc1xcUypcXHNcXFMqKVxccyIsICJfIik7ClN5c3RlbS5vdXQucHJpbnRsbihyKTsKClN0cmluZyB4ID0gIkkgaGF2ZSBiZWVuIHN0dWNrIG9uIHRoaXMgcHJvYmxlbSBmb3JldmVyIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIjsKU3RyaW5nIG0gPSB4LnJlcGxhY2VBbGwoIig/PD0oXnxcXEcpXFxTezAsMTAwfVxcc1xcU3swLDEwMH1cXHNcXFN7MCwxMDB9KVxccyIsICJfIik7ClN5c3RlbS5vdXQucHJpbnRsbihtKTsKCiAgfQp9