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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: A = None
        self.z: G = None
        self.p: F = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: C = None
        self.v: A = None
        self.x: A = None
        self.y: G = None
        self.z: B = None
        self.w: F = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: A = None
        self.z: G = None
        self.p: F = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: C = None
        self.v: A = None
        self.x: A = None
        self.y: G = None
        self.z: B = None
        self.w: F = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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