class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: D = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: B = None
        self.x: D = None
        self.p: I = None
        self.u: H = None
        self.w: B = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: H = None
        self.v: E = None
        self.q: E = None
        self.x: E = None
        self.r: F = None
        self.y: G = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: A = None
        self.z: F = None
        self.v: H = None
        self.s: A = None
        self.x: D = None
        self.t: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.w: J = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: B = None
        self.t: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: B = None
        self.x: D = None
        self.p: I = None
        self.u: H = None
        self.w: B = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: H = None
        self.v: E = None
        self.q: E = None
        self.x: E = None
        self.r: F = None
        self.y: G = None
        self.s: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: A = None
        self.z: F = None
        self.v: H = None
        self.s: A = None
        self.x: D = None
        self.t: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: J = None
        self.w: J = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.s: B = None
        self.t: D = None
        self.txt = txt

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

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