class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: B = None
        self.t: B = None
        self.p: C = None
        self.s: J = None
        self.q: D = None
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: A = None
        self.w: C = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: F = None
        self.o: C = None
        self.t: F = None
        self.v: E = None
        self.u: A = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: J = None
        self.t: J = None
        self.w: J = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: H = None
        self.t: A = None
        self.z: C = None
        self.s: H = None
        self.y: J = None
        self.p: H = None
        self.q: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: G = None
        self.r: A = None
        self.p: A = None
        self.x: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: E = None
        self.z: A = None
        self.q: A = None
        self.s: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: A = None
        self.w: C = None
        self.v: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: F = None
        self.o: C = None
        self.t: F = None
        self.v: E = None
        self.u: A = None
        self.p: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.u: J = None
        self.t: J = None
        self.w: J = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: H = None
        self.t: A = None
        self.z: C = None
        self.s: H = None
        self.y: J = None
        self.p: H = None
        self.q: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.y: G = None
        self.r: A = None
        self.p: A = None
        self.x: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.y: E = None
        self.z: A = None
        self.q: A = None
        self.s: H = None
        self.txt = txt

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

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