package laba7;

class A {
    public char a;

    public A(char a) {
        this.a = a;
    }

    public A(A other) {
        this.a = other.a;
    }
}

class B extends A {
    public String b;

    public B(char a, String b) {
        super(a);
        this.b = b;
    }

    public B(B other) {
        super(other);
        this.b = other.b;
    }
}

class C extends B {
    public int c;

    public C(char a, String b, int c) {
        super(a, b);
        this.c = c;
    }

    public C(C other) {
        super(other);
        this.c = other.c;
    }
}

public class example4 {
    public static void main(String[] args) {
        C obj1 = new C('A', "Hello", 10);
        C obj2 = new C(obj1);

        System.out.println(obj2.a + " " + obj2.b + " " + obj2.c);
    }
}