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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: H = None
        self.v: H = None
        self.z: I = None
        self.w: D = None
        self.s: A = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: H = None
        self.u: I = None
        self.w: E = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: H = None
        self.t: D = None
        self.s: I = None
        self.y: B = None
        self.x: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: I = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: C = None
        self.p: D = None
        self.x: G = None
        self.s: D = None
        self.q: F = None
        self.w: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.x: H = None
        self.v: H = None
        self.z: I = None
        self.w: D = None
        self.s: A = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.p: H = None
        self.u: I = None
        self.w: E = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.p: H = None
        self.t: D = None
        self.s: I = None
        self.y: B = None
        self.x: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.p: I = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: C = None
        self.p: D = None
        self.x: G = None
        self.s: D = None
        self.q: F = None
        self.w: E = None
        self.txt = txt

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

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