class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: E = None
        self.r: C = None
        self.t: F = None
        self.o: B = None
        self.s: E = None
        self.p: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: G = None
        self.t: A = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: H = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: A = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

h = A("h")
k = B("k")
i = C("i")
f = D("f")
l = E("l")
d = F("d")
m = G("m")
b = H("b")
n = A("n")
c = H("c")

h.q = b
h.x = l
h.s = l
h.r = i
h.t = d
h.p = d
h.o = k
k.r = h
k.x = m
i.u = l
i.w = m
i.t = h
i.p = c
f.s = c
f.y = c
f.z = m
l.o = i
l.y = i
l.r = h
l.t = h
l.z = f
d.q = l
m.y = f
m.o = h
m.x = c
b.u = m
n.q = c
n.x = l
n.s = l
n.r = i
n.t = d
n.p = d
n.o = k
c.u = m
assert h.t.q.y.u.z.y.u.txt == "
class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: E = None
        self.r: C = None
        self.t: F = None
        self.o: B = None
        self.s: E = None
        self.p: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: G = None
        self.t: A = None
        self.p: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: H = None
        self.z: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: A = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

h = A("h")
k = B("k")
i = C("i")
f = D("f")
l = E("l")
d = F("d")
m = G("m")
b = H("b")
n = A("n")
c = H("c")

h.q = b
h.x = l
h.s = l
h.r = i
h.t = d
h.p = d
h.o = k
k.r = h
k.x = m
i.u = l
i.w = m
i.t = h
i.p = c
f.s = c
f.y = c
f.z = m
l.o = i
l.y = i
l.r = h
l.t = h
l.z = f
d.q = l
m.y = f
m.o = h
m.x = c
b.u = m
n.q = c
n.x = l
n.s = l
n.r = i
n.t = d
n.p = d
n.o = k
c.u = m
assert h.t.q.y.u.z.y.u.txt == "m"