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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: G = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: J = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: C = None
        self.s: C = None
        self.u: C = None
        self.r: E = None
        self.q: E = None
        self.w: A = None
        self.y: G = None
        self.o: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: G = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: J = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: C = None
        self.s: C = None
        self.u: C = None
        self.r: E = None
        self.q: E = None
        self.w: A = None
        self.y: G = None
        self.o: F = None
        self.txt = txt

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

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

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