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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: C = None
        self.u: C = None
        self.s: B = None
        self.x: D = None
        self.q: E = None
        self.o: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: C = None
        self.u: C = None
        self.s: B = None
        self.x: D = None
        self.q: E = None
        self.o: D = None
        self.txt = txt

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

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

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