class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.z: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: A = None
        self.p: F = None
        self.o: E = None
        self.u: C = None
        self.v: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: E = None
        self.w: B = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: A = None
        self.p: F = None
        self.o: E = None
        self.u: C = None
        self.v: A = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: E = None
        self.w: B = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: D = None
        self.txt = txt

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

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