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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: H = None
        self.z: G = None
        self.r: G = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: D = None
        self.x: F = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: I = None
        self.y: D = None
        self.t: A = None
        self.r: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: D = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: H = None
        self.z: G = None
        self.r: G = None
        self.o: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.r: D = None
        self.x: F = None
        self.w: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: I = None
        self.y: D = None
        self.t: A = None
        self.r: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: D = None
        self.q: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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