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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: C = None
        self.w: C = None
        self.r: G = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: A = None
        self.r: H = None
        self.u: B = None
        self.x: H = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: F = None
        self.p: F = None
        self.r: F = None
        self.v: B = None
        self.y: D = None
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: E = None
        self.p: H = None
        self.y: A = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: B = None
        self.txt = txt

m = A("m")
b = B("b")
k = C("k")
h = D("h")
a = E("a")
c = F("c")
n = G("n")
l = H("l")
j = E("j")

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: C = None
        self.w: C = None
        self.r: G = None
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: A = None
        self.r: H = None
        self.u: B = None
        self.x: H = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: F = None
        self.p: F = None
        self.r: F = None
        self.v: B = None
        self.y: D = None
        self.u: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: E = None
        self.p: H = None
        self.y: A = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.t: B = None
        self.txt = txt

m = A("m")
b = B("b")
k = C("k")
h = D("h")
a = E("a")
c = F("c")
n = G("n")
l = H("l")
j = E("j")

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