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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: A = None
        self.txt = txt

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

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

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