class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: B = None
        self.p: B = None
        self.v: H = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: G = None
        self.z: F = None
        self.x: A = None
        self.y: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: G = None
        self.q: B = None
        self.z: I = None
        self.r: G = None
        self.t: B = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: D = None
        self.t: A = None
        self.p: I = None
        self.x: I = None
        self.s: D = None
        self.q: H = None
        self.u: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: G = None
        self.z: F = None
        self.x: A = None
        self.y: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: G = None
        self.q: B = None
        self.z: I = None
        self.r: G = None
        self.t: B = None
        self.s: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: D = None
        self.t: A = None
        self.p: I = None
        self.x: I = None
        self.s: D = None
        self.q: H = None
        self.u: H = None
        self.txt = txt

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

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

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

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