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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: B = None
        self.u: B = None
        self.o: E = None
        self.s: C = None
        self.z: G = None
        self.y: F = None
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: B = None
        self.u: B = None
        self.o: E = None
        self.s: C = None
        self.z: G = None
        self.y: F = None
        self.v: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

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

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