class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: B = None
        self.t: I = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: C = None
        self.y: I = None
        self.o: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: G = None
        self.z: F = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: J = None
        self.s: J = None
        self.z: F = None
        self.v: H = None
        self.r: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: C = None
        self.q: C = None
        self.o: I = None
        self.x: D = None
        self.y: B = None
        self.v: I = None
        self.r: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: J = None
        self.p: H = None
        self.w: A = None
        self.x: J = None
        self.txt = txt

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

m = A("m")
c = B("c")
b = C("b")
l = D("l")
e = E("e")
a = F("a")
f = G("f")
d = H("d")
k = I("k")
i = J("i")

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

class B:
    def __init__(self, txt: str):
        self.w: J = None
        self.p: C = None
        self.y: I = None
        self.o: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: G = None
        self.z: F = None
        self.s: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: J = None
        self.s: J = None
        self.z: F = None
        self.v: H = None
        self.r: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: C = None
        self.q: C = None
        self.o: I = None
        self.x: D = None
        self.y: B = None
        self.v: I = None
        self.r: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: J = None
        self.p: H = None
        self.w: A = None
        self.x: J = None
        self.txt = txt

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

m = A("m")
c = B("c")
b = C("b")
l = D("l")
e = E("e")
a = F("a")
f = G("f")
d = H("d")
k = I("k")
i = J("i")

m.z = a
m.o = a
m.w = c
m.t = k
c.w = i
c.o = i
c.p = b
c.y = k
b.y = f
b.x = f
b.z = a
b.s = c
l.y = k
l.z = k
l.x = d
l.s = i
l.q = f
l.r = f
e.w = c
e.y = i
e.s = i
e.z = a
e.v = d
e.r = k
a.p = k
a.x = c
f.z = d
f.p = b
f.q = b
f.o = k
f.v = k
f.x = l
f.y = c
f.r = i
d.z = a
d.s = f
d.v = m
k.r = l
k.o = i
k.x = i
k.p = d
k.w = m
i.w = k
i.t = c
i.x = b
i.y = m
assert c.p.s.o.w.r.txt == "l"