class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: F = None
        self.q: B = None
        self.t: E = None
        self.v: J = None
        self.z: J = None
        self.o: I = None
        self.p: D = None
        self.r: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: C = None
        self.z: G = None
        self.r: A = None
        self.p: A = None
        self.s: F = None
        self.x: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: E = None
        self.t: G = None
        self.p: J = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: A = None
        self.q: A = None
        self.z: H = None
        self.u: D = None
        self.v: B = None
        self.t: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: G = None
        self.q: B = None
        self.y: E = None
        self.p: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: C = None
        self.z: G = None
        self.r: A = None
        self.p: A = None
        self.s: F = None
        self.x: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: E = None
        self.t: G = None
        self.p: J = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.w: A = None
        self.q: A = None
        self.z: H = None
        self.u: D = None
        self.v: B = None
        self.t: F = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: G = None
        self.q: B = None
        self.y: E = None
        self.p: H = None
        self.txt = txt

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

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