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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: I = None
        self.t: A = None
        self.w: E = None
        self.z: D = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: D = None
        self.p: D = None
        self.t: D = None
        self.y: F = None
        self.z: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: B = None
        self.s: H = None
        self.p: H = None
        self.q: E = None
        self.u: B = None
        self.x: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: F = None
        self.z: J = None
        self.r: A = None
        self.y: J = None
        self.w: J = None
        self.v: G = None
        self.u: H = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: A = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: I = None
        self.t: A = None
        self.w: E = None
        self.z: D = None
        self.o: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: D = None
        self.p: D = None
        self.t: D = None
        self.y: F = None
        self.z: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: B = None
        self.s: H = None
        self.p: H = None
        self.q: E = None
        self.u: B = None
        self.x: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: F = None
        self.z: J = None
        self.r: A = None
        self.y: J = None
        self.w: J = None
        self.v: G = None
        self.u: H = None
        self.p: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: A = None
        self.v: A = None
        self.txt = txt

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

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