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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: F = None
        self.o: D = None
        self.v: A = None
        self.w: A = None
        self.q: E = None
        self.u: A = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: E = None
        self.p: C = None
        self.y: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: F = None
        self.o: D = None
        self.v: A = None
        self.w: A = None
        self.q: E = None
        self.u: A = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: E = None
        self.p: C = None
        self.y: A = None
        self.txt = txt

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

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