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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: F = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: H = None
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: C = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: F = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: H = None
        self.o: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: C = None
        self.r: C = None
        self.txt = txt

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

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

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