/* package whatever; // don't place package name! */

import java.util.*;
import java.util.regex.*;
import java.lang.*;
import java.io.*;

/* Name of the class has to be "Main" only if the class is public. */
class Ideone
{
    static Pattern pattAlphaNum = Pattern.compile("[A-Z|a-z|\\d+]");
    static Pattern pattAlpha = Pattern.compile("[A-Z|a-z]");
	static Pattern pattNum = Pattern.compile("[\\d+]");
	
	static Pattern alternativo = Pattern.compile("([A-Za-z]|\\d+)");
	static Pattern semParenteses = Pattern.compile("[A-Za-z]|\\d+");
	
	static void testar(String s) {
		 System.out.print(s + "\t\t\t");
		 
		 System.out.print(pattAlphaNum.matcher(s).matches() + "\t\t");
		 System.out.print(pattAlpha.matcher(s).matches() + "\t");
		 System.out.print(pattNum.matcher(s).matches() + "\t\t");

		 System.out.print(alternativo.matcher(s).matches() + "\t\t");
		 System.out.print(semParenteses.matcher(s).matches() + "\n");
	}
		 
	public static void main (String[] args) throws java.lang.Exception
	{
		 System.out.println("String\t\tAlphaNum\tAlpha\tNum\t\t\tSugestão\tSem Parênteses");
		 testar("A");
		 testar("a");
		 testar("0");
		 testar("aa");
		 testar("10");
		 testar("+");
		 testar("|");
	}
}