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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: B = None
        self.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: A = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: H = None
        self.o: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: J = None
        self.z: B = None
        self.o: G = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: H = None
        self.q: H = None
        self.v: F = None
        self.s: C = None
        self.u: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.v: B = None
        self.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: A = None
        self.w: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: H = None
        self.o: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: J = None
        self.z: B = None
        self.o: G = None
        self.v: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.y: H = None
        self.q: H = None
        self.v: F = None
        self.s: C = None
        self.u: C = None
        self.txt = txt

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

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

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