class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: A = None
        self.v: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: C = None
        self.txt = txt

i = A("i")
c = B("c")
j = C("j")
n = D("n")
k = D("k")
e = A("e")
l = D("l")
b = C("b")

i.t = e
i.r = e
i.v = e
c.v = n
c.o = k
j.z = c
j.o = b
n.w = c
n.y = b
k.w = c
k.y = b
e.t = i
e.r = i
e.v = i
l.w = c
l.y = b
b.z = c
b.o = j
assert n.y.o.z.v.y.z.o.txt == "
class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: A = None
        self.v: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: C = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: C = None
        self.txt = txt

i = A("i")
c = B("c")
j = C("j")
n = D("n")
k = D("k")
e = A("e")
l = D("l")
b = C("b")

i.t = e
i.r = e
i.v = e
c.v = n
c.o = k
j.z = c
j.o = b
n.w = c
n.y = b
k.w = c
k.y = b
e.t = i
e.r = i
e.v = i
l.w = c
l.y = b
b.z = c
b.o = j
assert n.y.o.z.v.y.z.o.txt == "k"