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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: J = None
        self.v: F = None
        self.x: D = None
        self.y: F = None
        self.q: F = None
        self.t: D = None
        self.p: C = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: E = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: C = None
        self.o: A = None
        self.t: A = None
        self.s: B = None
        self.w: G = None
        self.v: I = None
        self.r: I = None
        self.z: B = None
        self.p: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: E = None
        self.z: G = None
        self.t: H = None
        self.w: J = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: E = None
        self.s: B = None
        self.y: B = None
        self.o: E = None
        self.z: E = None
        self.q: I = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: D = None
        self.o: F = None
        self.s: F = None
        self.w: E = None
        self.v: A = None
        self.y: B = None
        self.q: J = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: J = None
        self.v: F = None
        self.x: D = None
        self.y: F = None
        self.q: F = None
        self.t: D = None
        self.p: C = None
        self.z: A = None
        self.r: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: E = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: C = None
        self.o: A = None
        self.t: A = None
        self.s: B = None
        self.w: G = None
        self.v: I = None
        self.r: I = None
        self.z: B = None
        self.p: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: E = None
        self.z: G = None
        self.t: H = None
        self.w: J = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: E = None
        self.s: B = None
        self.y: B = None
        self.o: E = None
        self.z: E = None
        self.q: I = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: D = None
        self.o: F = None
        self.s: F = None
        self.w: E = None
        self.v: A = None
        self.y: B = None
        self.q: J = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

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

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