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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: C = None
        self.txt = txt

f = A("f")
b = B("b")
m = C("m")
k = D("k")
i = E("i")
e = E("e")
h = D("h")

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.o: C = None
        self.txt = txt

f = A("f")
b = B("b")
m = C("m")
k = D("k")
i = E("i")
e = E("e")
h = D("h")

f.o = i
f.t = b
f.w = e
f.x = e
f.v = m
b.r = e
m.y = b
m.x = h
k.z = b
k.u = b
k.w = m
k.r = i
k.q = f
i.s = f
i.o = m
e.s = f
e.o = m
h.z = b
h.u = b
h.w = m
h.r = e
h.q = f
assert i.o.x.u.r.txt == "e"