import java.util.Scanner;
class InvalidStringException extends Exception
{
InvalidStringException(String msg)
{
super(msg);
}
}
class StringCheck
{
public static void main(String args[])
{
Scanner sc = new Scanner(System.in);
try
{
System.out.print("Enter a string: ");
String str = sc.nextLine();
if(str.length() < 5)
{
throw new InvalidStringException("Invalid String");
}
System.out.println("Uppercase String: " + str.toUpperCase());
}
catch(Exception e)
{
System.out.println("Exception: " + e.getMessage());
}
sc.close();
}
}




