class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: D = None
        self.p: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: F = None
        self.s: F = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: B = None
        self.w: F = None
        self.r: F = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: F = None
        self.u: F = None
        self.v: G = None
        self.w: F = None
        self.y: C = None
        self.z: E = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: F = None
        self.v: C = None
        self.q: C = None
        self.s: B = None
        self.r: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: F = None
        self.s: F = None
        self.y: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: B = None
        self.w: F = None
        self.r: F = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: F = None
        self.u: F = None
        self.v: G = None
        self.w: F = None
        self.y: C = None
        self.z: E = None
        self.t: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.t: F = None
        self.v: C = None
        self.q: C = None
        self.s: B = None
        self.r: H = None
        self.txt = txt

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

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