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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: H = None
        self.p: B = None
        self.x: C = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: G = None
        self.y: E = None
        self.z: B = None
        self.x: C = None
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: D = None
        self.u: I = None
        self.p: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: H = None
        self.p: B = None
        self.x: C = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: G = None
        self.y: E = None
        self.z: B = None
        self.x: C = None
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.r: D = None
        self.u: I = None
        self.p: C = None
        self.txt = txt

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

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

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

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