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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: F = None
        self.r: C = None
        self.x: E = None
        self.o: C = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: A = None
        self.u: B = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: B = None
        self.s: C = None
        self.o: D = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: B = None
        self.r: C = None
        self.w: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: F = None
        self.r: C = None
        self.x: E = None
        self.o: C = None
        self.v: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: A = None
        self.u: B = None
        self.y: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.r: B = None
        self.s: C = None
        self.o: D = None
        self.t: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.y: B = None
        self.r: C = None
        self.w: F = None
        self.txt = txt

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

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