class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.p: B = None
        self.y: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: D = None
        self.v: A = None
        self.z: F = None
        self.q: H = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: F = None
        self.s: H = None
        self.x: A = None
        self.z: H = None
        self.y: H = None
        self.r: A = None
        self.v: H = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: H = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.r: D = None
        self.v: A = None
        self.z: F = None
        self.q: H = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: F = None
        self.s: H = None
        self.x: A = None
        self.z: H = None
        self.y: H = None
        self.r: A = None
        self.v: H = None
        self.txt = txt

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

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

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