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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: C = None
        self.x: A = None
        self.z: I = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: B = None
        self.o: G = None
        self.r: D = None
        self.y: A = None
        self.t: J = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.t: I = None
        self.r: C = None
        self.v: C = None
        self.q: G = None
        self.s: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: H = None
        self.p: F = None
        self.o: E = None
        self.s: G = None
        self.v: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: C = None
        self.x: A = None
        self.z: I = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: B = None
        self.o: G = None
        self.r: D = None
        self.y: A = None
        self.t: J = None
        self.v: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.t: I = None
        self.r: C = None
        self.v: C = None
        self.q: G = None
        self.s: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.r: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: H = None
        self.p: F = None
        self.o: E = None
        self.s: G = None
        self.v: A = None
        self.txt = txt

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

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