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

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: G = None
        self.x: A = None
        self.r: F = None
        self.q: B = None
        self.p: F = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: G = None
        self.o: G = None
        self.z: B = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: B = None
        self.s: D = None
        self.w: A = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: G = None
        self.x: A = None
        self.r: F = None
        self.q: B = None
        self.p: F = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.p: G = None
        self.o: G = None
        self.z: B = None
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: B = None
        self.s: D = None
        self.w: A = None
        self.u: A = None
        self.txt = txt

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

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

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