class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: C = None
        self.u: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: A = None
        self.p: F = None
        self.u: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: F = None
        self.w: E = None
        self.u: E = None
        self.s: H = None
        self.p: D = None
        self.z: H = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: A = None
        self.w: E = None
        self.p: E = None
        self.r: C = None
        self.o: D = None
        self.y: F = None
        self.s: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: A = None
        self.p: F = None
        self.u: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: F = None
        self.w: E = None
        self.u: E = None
        self.s: H = None
        self.p: D = None
        self.z: H = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: A = None
        self.w: E = None
        self.p: E = None
        self.r: C = None
        self.o: D = None
        self.y: F = None
        self.s: D = None
        self.txt = txt

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

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