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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: D = None
        self.x: G = None
        self.o: F = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: B = None
        self.r: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: J = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: C = None
        self.o: C = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: G = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.o: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: F = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: D = None
        self.x: G = None
        self.o: F = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: B = None
        self.r: J = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: J = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: C = None
        self.o: C = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.r: G = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.o: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.x: F = None
        self.v: D = None
        self.txt = txt

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

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