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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: B = None
        self.o: D = None
        self.y: A = None
        self.v: G = None
        self.u: B = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: E = None
        self.p: G = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: D = None
        self.v: C = None
        self.p: G = None
        self.x: A = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: B = None
        self.o: D = None
        self.y: A = None
        self.v: G = None
        self.u: B = None
        self.t: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: E = None
        self.p: G = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: D = None
        self.v: C = None
        self.p: G = None
        self.x: A = None
        self.r: D = None
        self.txt = txt

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

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

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