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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: D = None
        self.p: I = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: C = None
        self.x: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: G = None
        self.q: C = None
        self.p: D = None
        self.v: E = None
        self.y: J = None
        self.u: H = None
        self.t: D = None
        self.x: D = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: J = None
        self.q: H = None
        self.r: C = None
        self.u: B = None
        self.t: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.o: J = None
        self.z: E = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: D = None
        self.p: I = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: C = None
        self.x: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: G = None
        self.q: C = None
        self.p: D = None
        self.v: E = None
        self.y: J = None
        self.u: H = None
        self.t: D = None
        self.x: D = None
        self.r: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: J = None
        self.q: H = None
        self.r: C = None
        self.u: B = None
        self.t: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: J = None
        self.o: J = None
        self.z: E = None
        self.q: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: D = None
        self.txt = txt

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

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