class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: C = None
        self.s: I = None
        self.z: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: B = None
        self.u: C = None
        self.q: F = None
        self.p: G = None
        self.z: B = None
        self.w: F = None
        self.t: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: A = None
        self.y: C = None
        self.o: J = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: A = None
        self.x: E = None
        self.u: G = None
        self.z: I = None
        self.q: E = None
        self.p: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: B = None
        self.u: C = None
        self.q: F = None
        self.p: G = None
        self.z: B = None
        self.w: F = None
        self.t: B = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: B = None
        self.v: A = None
        self.y: C = None
        self.o: J = None
        self.q: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: A = None
        self.x: E = None
        self.u: G = None
        self.z: I = None
        self.q: E = None
        self.p: E = None
        self.txt = txt

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

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

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

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