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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: H = None
        self.t: F = None
        self.o: I = None
        self.w: G = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: F = None
        self.x: E = None
        self.v: H = None
        self.z: H = None
        self.p: J = None
        self.t: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: C = None
        self.v: C = None
        self.o: D = None
        self.q: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

h = A("h")
e = B("e")
j = C("j")
n = D("n")
b = E("b")
f = F("f")
c = G("c")
d = H("d")
l = I("l")
a = J("a")

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

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

class C:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: H = None
        self.t: F = None
        self.o: I = None
        self.w: G = None
        self.v: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: J = None
        self.s: F = None
        self.x: E = None
        self.v: H = None
        self.z: H = None
        self.p: J = None
        self.t: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: C = None
        self.v: C = None
        self.o: D = None
        self.q: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

h = A("h")
e = B("e")
j = C("j")
n = D("n")
b = E("b")
f = F("f")
c = G("c")
d = H("d")
l = I("l")
a = J("a")

h.x = f
h.y = e
h.u = l
h.w = c
h.v = d
e.z = d
e.p = d
e.o = d
e.y = j
e.q = j
e.v = h
e.s = n
e.w = a
e.t = b
j.u = e
j.x = d
j.v = d
j.t = f
j.o = l
j.w = c
n.w = a
n.p = a
n.s = f
n.x = b
n.v = d
n.z = d
n.t = j
b.o = h
b.w = h
b.t = f
b.z = d
b.s = l
b.p = l
b.x = e
b.v = e
f.s = d
f.w = d
c.t = b
d.o = c
l.y = c
l.p = j
l.v = j
l.o = n
l.q = n
a.z = d
assert n.t.w.t.t.s.o.t.z.o.txt == "c"