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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: F = None
        self.y: A = None
        self.s: E = None
        self.r: E = None
        self.t: G = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: B = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: B = None
        self.u: C = None
        self.t: F = None
        self.y: B = None
        self.q: F = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: C = None
        self.s: G = None
        self.txt = txt

b = A("b")
g = B("g")
n = C("n")
h = D("h")
d = E("d")
a = F("a")
e = G("e")
f = H("f")
m = A("m")

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.q: F = None
        self.y: A = None
        self.s: E = None
        self.r: E = None
        self.t: G = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: B = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: B = None
        self.u: C = None
        self.t: F = None
        self.y: B = None
        self.q: F = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: C = None
        self.s: G = None
        self.txt = txt

b = A("b")
g = B("g")
n = C("n")
h = D("h")
d = E("d")
a = F("a")
e = G("e")
f = H("f")
m = A("m")

b.x = g
b.v = d
b.z = n
b.y = m
b.t = h
g.u = e
g.q = n
g.t = m
n.u = h
n.q = a
n.y = b
n.s = d
n.r = d
n.t = e
n.z = e
h.x = a
h.q = g
h.w = f
d.o = f
d.w = g
d.y = g
d.x = g
d.u = n
d.t = a
d.q = a
a.q = h
e.y = b
e.z = h
f.w = n
f.r = n
f.s = e
m.x = g
m.v = d
m.z = n
m.y = b
m.t = h
assert e.y.z.u.txt == "h"