/* 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
{
{
System.
out.
println(check
("9+56")); System.
out.
println(check
("9+56sdwe")); System.
out.
println(check
("^^^")); }
{
if (Pattern.compile("\\p{L}").matcher(inputExpression).find()) {
return "ErrorType.ALPHABETIC_SYMBOL";
} else if (!Pattern.compile("[-+*/()0-9]").matcher(inputExpression).find()) {
return "ErrorType.UNKNOWN_SYMBOL";
}
return "Valid";
}
}
LyogcGFja2FnZSB3aGF0ZXZlcjsgLy8gZG9uJ3QgcGxhY2UgcGFja2FnZSBuYW1lISAqLwoKaW1wb3J0IGphdmEudXRpbC4qOwppbXBvcnQgamF2YS5sYW5nLio7CmltcG9ydCBqYXZhLmlvLio7CmltcG9ydCBqYXZhLnV0aWwucmVnZXguKjsKLyogTmFtZSBvZiB0aGUgY2xhc3MgaGFzIHRvIGJlICJNYWluIiBvbmx5IGlmIHRoZSBjbGFzcyBpcyBwdWJsaWMuICovCmNsYXNzIElkZW9uZQp7CglwdWJsaWMgc3RhdGljIHZvaWQgbWFpbiAoU3RyaW5nW10gYXJncykgdGhyb3dzIGphdmEubGFuZy5FeGNlcHRpb24KCXsKCQlTeXN0ZW0ub3V0LnByaW50bG4oY2hlY2soIjkrNTYiKSk7IAoJCVN5c3RlbS5vdXQucHJpbnRsbihjaGVjaygiOSs1NnNkd2UiKSk7IAoJCVN5c3RlbS5vdXQucHJpbnRsbihjaGVjaygiXl5eIikpOyAKCX0KCQoJcHJpdmF0ZSBzdGF0aWMgU3RyaW5nIGNoZWNrKFN0cmluZyBpbnB1dEV4cHJlc3Npb24pCgl7CgkJaWYgKFBhdHRlcm4uY29tcGlsZSgiXFxwe0x9IikubWF0Y2hlcihpbnB1dEV4cHJlc3Npb24pLmZpbmQoKSkgewoJICAgICAgICByZXR1cm4gIkVycm9yVHlwZS5BTFBIQUJFVElDX1NZTUJPTCI7CgkgICAgfSBlbHNlIGlmICghUGF0dGVybi5jb21waWxlKCJbLSsqLygpMC05XSIpLm1hdGNoZXIoaW5wdXRFeHByZXNzaW9uKS5maW5kKCkpIHsKCSAgICAgICAgcmV0dXJuICJFcnJvclR5cGUuVU5LTk9XTl9TWU1CT0wiOwoJICAgIH0KCSAgICByZXR1cm4gIlZhbGlkIjsKCX0KfQ==