class A:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: H = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: I = None
        self.u: E = None
        self.x: H = None
        self.p: A = None
        self.w: J = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: H = None
        self.t: J = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: I = None
        self.w: C = None
        self.u: J = None
        self.y: C = None
        self.q: G = None
        self.v: C = None
        self.r: B = None
        self.s: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: E = None
        self.z: I = None
        self.p: H = None
        self.x: D = None
        self.q: G = None
        self.t: B = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: C = None
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: I = None
        self.u: E = None
        self.x: H = None
        self.p: A = None
        self.w: J = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.x: H = None
        self.t: J = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: I = None
        self.w: C = None
        self.u: J = None
        self.y: C = None
        self.q: G = None
        self.v: C = None
        self.r: B = None
        self.s: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: E = None
        self.z: I = None
        self.p: H = None
        self.x: D = None
        self.q: G = None
        self.t: B = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: C = None
        self.y: E = None
        self.txt = txt

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

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