/* package whatever; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
import java.util.regex.*;
/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
{
String strs
[] = {"000001010016C02AB 111*",
"000001010016C02 111H",
"000001010016C 111 ",
"901509010012V 154 "}; Pattern p = Pattern.compile("(.{11})[0-9](.{5}).{5}(.*)");
Matcher m = p.matcher(s);
if (m.matches()) {
m.appendReplacement(result, m.group(1) + "," + m.group(2).trim() + "," + m.group(3));
}
System.
out.
println(result.
toString()); }
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnV0aWwucmVnZXguKjsKLyogTmFtZSBvZiB0aGUgY2xhc3MgaGFzIHRvIGJlICJNYWluIiBvbmx5IGlmIHRoZSBjbGFzcyBpcyBwdWJsaWMuICovCmNsYXNzIElkZW9uZQp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQlTdHJpbmcgc3Ryc1tdICA9IHsiMDAwMDAxMDEwMDE2QzAyQUIgIDExMSoiLCAiMDAwMDAxMDEwMDE2QzAyICAgIDExMUgiLCAiMDAwMDAxMDEwMDE2QyAgICAgIDExMSAiLCAiOTAxNTA5MDEwMDEyViAgICAgIDE1NCAifTsKCQlQYXR0ZXJuIHAgPSBQYXR0ZXJuLmNvbXBpbGUoIiguezExfSlbMC05XSguezV9KS57NX0oLiopIik7CgkJZm9yIChTdHJpbmcgczogc3RycykgewoJCQlTdHJpbmdCdWZmZXIgcmVzdWx0ID0gbmV3IFN0cmluZ0J1ZmZlcigpOwoJCQlNYXRjaGVyIG0gPSBwLm1hdGNoZXIocyk7CgkJCWlmIChtLm1hdGNoZXMoKSkgewoJICAgIAkJCW0uYXBwZW5kUmVwbGFjZW1lbnQocmVzdWx0LCBtLmdyb3VwKDEpICsgIiwiICsgbS5ncm91cCgyKS50cmltKCkgICsgIiwiICsgbS5ncm91cCgzKSk7CgkJCX0KCQkJU3lzdGVtLm91dC5wcmludGxuKHJlc3VsdC50b1N0cmluZygpKTsKCQl9CgoJfQp9