class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: H = None
        self.w: H = None
        self.y: G = None
        self.z: H = None
        self.t: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: B = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: D = None
        self.p: G = None
        self.v: C = None
        self.q: C = None
        self.t: B = None
        self.x: H = None
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: H = None
        self.w: H = None
        self.y: G = None
        self.z: H = None
        self.t: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: H = None
        self.t: B = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: D = None
        self.p: G = None
        self.v: C = None
        self.q: C = None
        self.t: B = None
        self.x: H = None
        self.z: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

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

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