class A:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: F = None
        self.s: F = None
        self.p: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: F = None
        self.t: F = None
        self.z: H = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: F = None
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: F = None
        self.p: A = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: E = None
        self.p: F = None
        self.v: A = None
        self.z: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: F = None
        self.t: F = None
        self.z: H = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: F = None
        self.w: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: F = None
        self.p: A = None
        self.o: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: E = None
        self.p: F = None
        self.v: A = None
        self.z: D = None
        self.txt = txt

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

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