class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: I = None
        self.s: A = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.s: G = None
        self.u: F = None
        self.z: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: F = None
        self.s: C = None
        self.x: D = None
        self.t: F = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.w: G = None
        self.v: I = None
        self.y: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.p: I = None
        self.s: A = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.s: G = None
        self.u: F = None
        self.z: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: F = None
        self.s: C = None
        self.x: D = None
        self.t: F = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: E = None
        self.w: G = None
        self.v: I = None
        self.y: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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