class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.v: C = None
        self.w: E = None
        self.r: B = None
        self.q: J = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: D = None
        self.o: B = None
        self.p: C = None
        self.y: J = None
        self.r: D = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: A = None
        self.r: B = None
        self.p: I = None
        self.y: E = None
        self.q: I = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: A = None
        self.x: D = None
        self.p: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: A = None
        self.s: A = None
        self.w: I = None
        self.x: D = None
        self.z: B = None
        self.r: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: D = None
        self.o: B = None
        self.p: C = None
        self.y: J = None
        self.r: D = None
        self.q: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: A = None
        self.r: B = None
        self.p: I = None
        self.y: E = None
        self.q: I = None
        self.v: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: A = None
        self.x: D = None
        self.p: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: H = None
        self.p: A = None
        self.s: A = None
        self.w: I = None
        self.x: D = None
        self.z: B = None
        self.r: H = None
        self.txt = txt

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

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