class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: B = None
        self.w: E = None
        self.t: C = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: C = None
        self.z: C = None
        self.t: D = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: C = None
        self.o: B = None
        self.s: D = None
        self.r: A = None
        self.txt = txt

a = A("a")
b = B("b")
i = C("i")
l = D("l")
c = E("c")
h = C("h")
e = C("e")

a.r = i
a.z = i
a.v = b
a.w = c
a.t = e
b.u = h
b.z = h
b.x = i
b.t = l
b.q = a
i.y = e
i.v = c
l.z = h
l.o = h
l.y = a
c.y = l
c.s = l
c.v = h
c.o = b
c.r = a
h.y = e
h.v = c
e.y = i
e.v = c
assert e.y.y.y.txt == "
class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: B = None
        self.w: E = None
        self.t: C = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: C = None
        self.x: C = None
        self.z: C = None
        self.t: D = None
        self.q: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.v: C = None
        self.o: B = None
        self.s: D = None
        self.r: A = None
        self.txt = txt

a = A("a")
b = B("b")
i = C("i")
l = D("l")
c = E("c")
h = C("h")
e = C("e")

a.r = i
a.z = i
a.v = b
a.w = c
a.t = e
b.u = h
b.z = h
b.x = i
b.t = l
b.q = a
i.y = e
i.v = c
l.z = h
l.o = h
l.y = a
c.y = l
c.s = l
c.v = h
c.o = b
c.r = a
h.y = e
h.v = c
e.y = i
e.v = c
assert e.y.y.y.txt == "i"