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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: B = None
        self.w: J = None
        self.r: D = None
        self.u: D = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: J = None
        self.r: G = None
        self.t: I = None
        self.y: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: H = None
        self.t: B = None
        self.v: D = None
        self.z: F = None
        self.r: E = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: J = None
        self.w: B = None
        self.s: B = None
        self.u: I = None
        self.p: E = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: F = None
        self.s: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.z: B = None
        self.w: J = None
        self.r: D = None
        self.u: D = None
        self.o: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: J = None
        self.r: G = None
        self.t: I = None
        self.y: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: H = None
        self.t: B = None
        self.v: D = None
        self.z: F = None
        self.r: E = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.q: J = None
        self.w: B = None
        self.s: B = None
        self.u: I = None
        self.p: E = None
        self.r: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: F = None
        self.s: E = None
        self.txt = txt

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

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

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