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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: D = None
        self.s: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: F = None
        self.y: F = None
        self.p: G = None
        self.txt = txt

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

d = A("d")
f = B("f")
n = C("n")
m = D("m")
a = E("a")
h = F("h")
i = G("i")
l = H("l")
b = I("b")
e = G("e")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: D = None
        self.s: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: F = None
        self.y: F = None
        self.p: G = None
        self.txt = txt

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

d = A("d")
f = B("f")
n = C("n")
m = D("m")
a = E("a")
h = F("h")
i = G("i")
l = H("l")
b = I("b")
e = G("e")

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