import java.util.Random;

public class Main {

    public static void main(String[] args) {
        int i = 0;
        try {
            Random random = new Random();
            i = random.nextInt(20);
            if (i > 10) throw new IntegerOutOfRangeException();
            System.out.printf("Your input value %d is in the specified range.\n", i);
        } catch (IntegerOutOfRangeException ex) {
            System.out.printf("Your input value %d is not in the specified range.\n", i);
        } finally {
            System.out.println("System terminated.");
        }
    }
}

class IntegerOutOfRangeException extends Exception {
}