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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: A = None
        self.y: F = None
        self.z: B = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: H = None
        self.t: D = None
        self.s: H = None
        self.p: E = None
        self.z: D = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: A = None
        self.y: F = None
        self.z: B = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: H = None
        self.t: D = None
        self.s: H = None
        self.p: E = None
        self.z: D = None
        self.v: F = None
        self.txt = txt

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

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

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