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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: E = None
        self.z: B = None
        self.y: A = None
        self.x: H = None
        self.t: E = None
        self.r: A = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: C = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: E = None
        self.q: H = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: D = None
        self.s: J = None
        self.p: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: F = None
        self.txt = txt

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

d.r = k
d.t = n
d.y = a
d.z = f
d.w = l
d.u = g
m.s = g
m.z = d
m.x = l
m.y = n
l.o = n
l.u = k
l.t = k
l.z = m
l.y = d
l.r = d
l.x = c
l.w = i
i.s = a
i.z = l
i.y = c
k.p = a
n.z = l
a.v = g
a.r = k
a.q = c
a.p = i
c.o = n
c.z = i
c.s = f
c.p = m
g.x = a
g.s = i
g.q = n
f.p = n
f.z = n
assert m.z.z.p.z.txt == "
class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: F = None
        self.y: G = None
        self.z: J = None
        self.w: C = None
        self.u: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: E = None
        self.z: B = None
        self.y: A = None
        self.x: H = None
        self.t: E = None
        self.r: A = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: C = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: I = None
        self.r: E = None
        self.q: H = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.z: D = None
        self.s: J = None
        self.p: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: F = None
        self.txt = txt

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

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