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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: C = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: F = None
        self.y: A = None
        self.s: A = None
        self.w: F = None
        self.r: H = None
        self.p: D = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: A = None
        self.s: C = None
        self.t: B = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: C = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.u: F = None
        self.y: A = None
        self.s: A = None
        self.w: F = None
        self.r: H = None
        self.p: D = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: A = None
        self.s: C = None
        self.t: B = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

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

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