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

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

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

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

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

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

e.u = f
e.w = k
e.t = b
g.t = e
g.z = e
g.v = b
g.w = b
g.o = c
c.z = h
c.u = h
c.o = g
c.r = g
c.v = f
k.v = e
k.t = b
k.y = b
k.w = c
k.u = h
h.o = c
h.z = c
f.v = e
f.t = g
f.y = g
f.w = c
f.u = h
b.t = e
b.z = e
b.v = g
b.w = g
b.o = c
assert b.z.w.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: D = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

e.u = f
e.w = k
e.t = b
g.t = e
g.z = e
g.v = b
g.w = b
g.o = c
c.z = h
c.u = h
c.o = g
c.r = g
c.v = f
k.v = e
k.t = b
k.y = b
k.w = c
k.u = h
h.o = c
h.z = c
f.v = e
f.t = g
f.y = g
f.w = c
f.u = h
b.t = e
b.z = e
b.v = g
b.w = g
b.o = c
assert b.z.w.u.txt == "h"