class A:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: E = None
        self.q: B = None
        self.x: G = None
        self.u: B = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: D = None
        self.t: B = None
        self.p: E = None
        self.v: E = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: F = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: B = None
        self.s: D = None
        self.w: I = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: I = None
        self.p: D = None
        self.q: E = None
        self.z: A = None
        self.v: G = None
        self.u: G = None
        self.t: B = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: A = None
        self.p: B = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: B = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: C = None
        self.v: D = None
        self.o: F = None
        self.txt = txt

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

e = A("e")
j = B("j")
a = C("a")
g = D("g")
k = E("k")
m = F("m")
h = G("h")
c = H("c")
d = I("d")
b = J("b")

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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: D = None
        self.t: B = None
        self.p: E = None
        self.v: E = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.z: F = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.r: B = None
        self.s: D = None
        self.w: I = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.r: I = None
        self.p: D = None
        self.q: E = None
        self.z: A = None
        self.v: G = None
        self.u: G = None
        self.t: B = None
        self.w: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: A = None
        self.p: B = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: B = None
        self.q: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.z: C = None
        self.v: D = None
        self.o: F = None
        self.txt = txt

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

e = A("e")
j = B("j")
a = C("a")
g = D("g")
k = E("k")
m = F("m")
h = G("h")
c = H("c")
d = I("d")
b = J("b")

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