import java.util.*;
import java.util.regex.*;
import java.lang.*;
import java.io.*;
class Ideone
{
{
Pattern versionPattern = Pattern.compile("([1-9]\\d*)\\.(\\d+)\\.(\\d+)(?:-([a-zA-Z0-9]+))?");
Matcher matcher = versionPattern.matcher(version);
if (matcher.matches()) {
System.
out.
println("matching version is: " + matcher.
group(0)); System.
out.
println("major #: " + matcher.
group(1)); System.
out.
println("minor #: " + matcher.
group(2)); System.
out.
println("patch #: " + matcher.
group(3)); System.
out.
println("qualifier: " + matcher.
group(4) + "\n\n\n");
}
}
}
aW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS51dGlsLnJlZ2V4Lio7CmltcG9ydCBqYXZhLmxhbmcuKjsKaW1wb3J0IGphdmEuaW8uKjsKCmNsYXNzIElkZW9uZQp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQlTdHJpbmcgdmVyc2lvbiA9ICIxLjAuMS1SQyI7CgkJUGF0dGVybiB2ZXJzaW9uUGF0dGVybiA9IFBhdHRlcm4uY29tcGlsZSgiKFsxLTldXFxkKilcXC4oXFxkKylcXC4oXFxkKykoPzotKFthLXpBLVowLTldKykpPyIpOwoJCU1hdGNoZXIgbWF0Y2hlciA9IHZlcnNpb25QYXR0ZXJuLm1hdGNoZXIodmVyc2lvbik7CgkJCgkJaWYgKG1hdGNoZXIubWF0Y2hlcygpKSB7CgkJCgkJICAgIFN5c3RlbS5vdXQucHJpbnRsbigibWF0Y2hpbmcgdmVyc2lvbiBpczogIiArIG1hdGNoZXIuZ3JvdXAoMCkpOwoJCSAgICBTeXN0ZW0ub3V0LnByaW50bG4oIm1ham9yICM6ICIgKyBtYXRjaGVyLmdyb3VwKDEpKTsKCQkgICAgU3lzdGVtLm91dC5wcmludGxuKCJtaW5vciAjOiAiICsgbWF0Y2hlci5ncm91cCgyKSk7CgkJICAgIFN5c3RlbS5vdXQucHJpbnRsbigicGF0Y2ggIzogIiArIG1hdGNoZXIuZ3JvdXAoMykpOwoJCSAgICBTeXN0ZW0ub3V0LnByaW50bG4oInF1YWxpZmllcjogIiArIG1hdGNoZXIuZ3JvdXAoNCkgKyAiXG5cblxuIik7CgkJCgkJfQoJfQp9