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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: E = None
        self.u: B = None
        self.p: B = None
        self.s: C = None
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: J = None
        self.q: I = None
        self.x: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: F = None
        self.w: A = None
        self.t: G = None
        self.x: B = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: H = None
        self.y: C = None
        self.r: F = None
        self.p: E = None
        self.o: J = None
        self.q: J = None
        self.v: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: I = None
        self.v: A = None
        self.x: D = None
        self.r: C = None
        self.q: E = None
        self.txt = txt

n = A("n")
c = B("c")
h = C("h")
e = D("e")
l = E("l")
m = F("m")
d = G("d")
k = H("k")
i = I("i")
j = J("j")

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.x: E = None
        self.u: B = None
        self.p: B = None
        self.s: C = None
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.y: J = None
        self.q: I = None
        self.x: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: F = None
        self.w: A = None
        self.t: G = None
        self.x: B = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: H = None
        self.y: C = None
        self.r: F = None
        self.p: E = None
        self.o: J = None
        self.q: J = None
        self.v: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: I = None
        self.v: A = None
        self.x: D = None
        self.r: C = None
        self.q: E = None
        self.txt = txt

n = A("n")
c = B("c")
h = C("h")
e = D("e")
l = E("l")
m = F("m")
d = G("d")
k = H("k")
i = I("i")
j = J("j")

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