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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: F = None
        self.p: C = None
        self.x: F = None
        self.z: D = None
        self.q: F = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

m = A("m")
a = B("a")
k = C("k")
d = D("d")
n = E("n")
e = F("e")
l = G("l")
b = H("b")
c = G("c")
g = F("g")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: F = None
        self.p: C = None
        self.x: F = None
        self.z: D = None
        self.q: F = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

m = A("m")
a = B("a")
k = C("k")
d = D("d")
n = E("n")
e = F("e")
l = G("l")
b = H("b")
c = G("c")
g = F("g")

m.t = n
m.w = k
a.y = b
a.z = b
a.w = b
a.v = k
a.t = n
k.q = g
k.w = e
d.q = k
d.x = g
d.w = c
n.t = m
n.s = b
e.p = d
e.q = m
l.o = c
l.u = g
l.x = g
l.p = k
l.z = d
l.t = d
l.q = e
b.o = m
c.o = l
c.u = g
c.q = g
c.p = k
c.x = e
c.z = d
c.t = d
g.p = d
g.q = m
assert a.z.o.w.txt == "k"