@@ -0,0 +1,848 @@
+package com.javarush.task.task14.task1406;%0A%0A/* %0A%D0%91%D0%B5%D0%B7 %D0%BE%D1%88%D0%B8%D0%B1%D0%BE%D0%BA%0A*/%0A%0Apublic class Solution %7B%0A    public static void main(String%5B%5D args) %7B%0A        Object obj = new Jerry();%0A%0A                Mouse mouse = (Mouse) obj;%0A        GreyMouse greyMouse = (GreyMouse) mouse;%0A        Jerry jerry = (Jerry) greyMouse;%0A%0A        printClasses(obj, mouse, greyMouse, jerry);%0A%0A    %7D%0A%0A    public static void printClasses(Object obj, Mouse mouse, GreyMouse greyMouse, Jerry jerry) %7B%0A        System.out.println(jerry.getClass().getSimpleName());%0A        System.out.println(greyMouse.getClass().getSimpleName());%0A        System.out.println(mouse.getClass().getSimpleName());%0A        System.out.println(obj.getClass().getSimpleName());%0A    %7D%0A%0A    static class Mouse %7B%0A    %7D%0A%0A    static class GreyMouse extends Mouse %7B%0A    %7D%0A%0A    static class Jerry extends GreyMouse %7B%0A    %7D%0A%7D%0A

Complete task1406