class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: I = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: I = None
        self.y: E = None
        self.q: H = None
        self.s: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: E = None
        self.v: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: B = None
        self.p: H = None
        self.x: F = None
        self.u: F = None
        self.w: H = None
        self.r: A = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: E = None
        self.s: B = None
        self.r: F = None
        self.p: B = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.q: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: I = None
        self.y: E = None
        self.q: H = None
        self.s: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: E = None
        self.v: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: B = None
        self.p: H = None
        self.x: F = None
        self.u: F = None
        self.w: H = None
        self.r: A = None
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: E = None
        self.s: B = None
        self.r: F = None
        self.p: B = None
        self.q: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: J = None
        self.txt = txt

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

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

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