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

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

i = A("i")
n = B("n")
a = C("a")
f = D("f")
d = E("d")
c = E("c")
b = C("b")

i.t = b
n.u = b
n.z = f
n.o = i
n.y = c
a.w = f
f.z = d
d.r = b
d.v = b
d.t = f
d.w = i
d.o = c
c.r = b
c.v = b
c.t = f
c.w = i
c.o = d
b.w = f
assert a.w.z.t.z.r.txt == "
class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

i = A("i")
n = B("n")
a = C("a")
f = D("f")
d = E("d")
c = E("c")
b = C("b")

i.t = b
n.u = b
n.z = f
n.o = i
n.y = c
a.w = f
f.z = d
d.r = b
d.v = b
d.t = f
d.w = i
d.o = c
c.r = b
c.v = b
c.t = f
c.w = i
c.o = d
b.w = f
assert a.w.z.t.z.r.txt == "b"