class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: H = None
        self.z: I = None
        self.s: H = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: E = None
        self.r: D = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: B = None
        self.s: A = None
        self.v: F = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: G = None
        self.y: G = None
        self.o: A = None
        self.q: D = None
        self.v: G = None
        self.s: G = None
        self.txt = txt

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

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

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

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

d = A("d")
n = B("n")
c = C("c")
m = D("m")
l = E("l")
i = F("i")
k = G("k")
h = H("h")
j = I("j")

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: E = None
        self.r: D = None
        self.x: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: H = None
        self.z: B = None
        self.s: A = None
        self.v: F = None
        self.q: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: G = None
        self.y: G = None
        self.o: A = None
        self.q: D = None
        self.v: G = None
        self.s: G = None
        self.txt = txt

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

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

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

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

d = A("d")
n = B("n")
c = C("c")
m = D("m")
l = E("l")
i = F("i")
k = G("k")
h = H("h")
j = I("j")

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