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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: C = None
        self.y: A = None
        self.v: I = None
        self.o: A = None
        self.z: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: I = None
        self.y: D = None
        self.q: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: C = None
        self.y: A = None
        self.v: I = None
        self.o: A = None
        self.z: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: I = None
        self.y: D = None
        self.q: I = None
        self.txt = txt

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

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