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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: A = None
        self.u: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: E = None
        self.y: J = None
        self.v: A = None
        self.o: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: J = None
        self.o: F = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: C = None
        self.p: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: A = None
        self.r: E = None
        self.u: D = None
        self.o: B = None
        self.y: I = None
        self.x: C = None
        self.s: F = None
        self.q: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.s: A = None
        self.u: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: E = None
        self.y: J = None
        self.v: A = None
        self.o: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: J = None
        self.o: F = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: C = None
        self.p: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: A = None
        self.r: E = None
        self.u: D = None
        self.o: B = None
        self.y: I = None
        self.x: C = None
        self.s: F = None
        self.q: I = None
        self.txt = txt

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

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