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

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

class C:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: B = None
        self.t: F = None
        self.q: B = None
        self.u: E = None
        self.s: B = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: G = None
        self.z: J = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: B = None
        self.s: B = None
        self.x: G = None
        self.v: C = None
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: D = None
        self.t: E = None
        self.x: I = None
        self.y: D = None
        self.s: I = None
        self.r: A = None
        self.u: A = None
        self.o: D = None
        self.p: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: B = None
        self.t: F = None
        self.q: B = None
        self.u: E = None
        self.s: B = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: G = None
        self.z: J = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: B = None
        self.s: B = None
        self.x: G = None
        self.v: C = None
        self.p: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: D = None
        self.t: E = None
        self.x: I = None
        self.y: D = None
        self.s: I = None
        self.r: A = None
        self.u: A = None
        self.o: D = None
        self.p: B = None
        self.txt = txt

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

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