class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: C = None
        self.x: E = None
        self.r: C = None
        self.o: H = None
        self.v: C = None
        self.s: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: C = None
        self.q: C = None
        self.w: H = None
        self.y: A = None
        self.t: C = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: F = None
        self.v: C = None
        self.p: C = None
        self.y: B = None
        self.o: F = None
        self.x: F = None
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: E = None
        self.y: D = None
        self.u: D = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: F = None
        self.s: D = None
        self.t: G = None
        self.y: D = None
        self.u: A = None
        self.q: F = None
        self.txt = txt

d = A("d")
m = B("m")
n = C("n")
b = D("b")
g = E("g")
i = F("i")
e = G("e")
h = H("h")
c = B("c")
j = C("j")

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: C = None
        self.q: C = None
        self.w: H = None
        self.y: A = None
        self.t: C = None
        self.u: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: F = None
        self.v: C = None
        self.p: C = None
        self.y: B = None
        self.o: F = None
        self.x: F = None
        self.s: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.p: E = None
        self.y: D = None
        self.u: D = None
        self.x: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: F = None
        self.s: D = None
        self.t: G = None
        self.y: D = None
        self.u: A = None
        self.q: F = None
        self.txt = txt

d = A("d")
m = B("m")
n = C("n")
b = D("b")
g = E("g")
i = F("i")
e = G("e")
h = H("h")
c = B("c")
j = C("j")

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