class A:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: F = None
        self.p: C = None
        self.o: J = None
        self.u: G = None
        self.s: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: D = None
        self.x: C = None
        self.t: C = None
        self.w: C = None
        self.o: C = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: B = None
        self.o: G = None
        self.p: H = None
        self.y: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: D = None
        self.x: C = None
        self.t: C = None
        self.w: C = None
        self.o: C = None
        self.r: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.r: B = None
        self.o: G = None
        self.p: H = None
        self.y: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

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

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

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

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

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