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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: H = None
        self.v: D = None
        self.z: D = None
        self.r: B = None
        self.txt = txt

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

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

c = A("c")
n = B("n")
g = C("g")
m = D("m")
j = E("j")
i = F("i")
b = G("b")
d = H("d")
f = A("f")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: H = None
        self.v: D = None
        self.z: D = None
        self.r: B = None
        self.txt = txt

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

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

c = A("c")
n = B("n")
g = C("g")
m = D("m")
j = E("j")
i = F("i")
b = G("b")
d = H("d")
f = A("f")

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