class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: A = None
        self.w: H = None
        self.u: A = None
        self.x: E = None
        self.q: C = None
        self.txt = txt

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

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

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

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

j = A("j")
d = B("d")
l = C("l")
g = D("g")
b = E("b")
e = F("e")
i = G("i")
n = H("n")
f = G("f")
m = H("m")

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: A = None
        self.w: H = None
        self.u: A = None
        self.x: E = None
        self.q: C = None
        self.txt = txt

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

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

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

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

j = A("j")
d = B("d")
l = C("l")
g = D("g")
b = E("b")
e = F("e")
i = G("i")
n = H("n")
f = G("f")
m = H("m")

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