class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: C = None
        self.w: C = None
        self.q: F = None
        self.r: D = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: A = None
        self.u: A = None
        self.q: B = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: F = None
        self.s: F = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: D = None
        self.w: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: A = None
        self.u: A = None
        self.q: B = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: F = None
        self.s: F = None
        self.w: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: D = None
        self.w: A = None
        self.txt = txt

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

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

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