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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: D = None
        self.z: I = None
        self.u: G = None
        self.p: G = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: I = None
        self.q: I = None
        self.w: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: B = None
        self.p: C = None
        self.y: B = None
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: C = None
        self.x: I = None
        self.v: G = None
        self.txt = txt

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

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

m.s = d
m.v = d
m.q = g
m.p = h
m.w = c
m.z = k
l.w = c
l.u = c
l.p = c
l.q = d
l.r = d
l.z = n
k.t = n
k.s = n
k.q = n
k.w = c
d.o = h
h.o = d
h.r = k
a.t = h
a.u = f
a.y = f
a.p = k
a.w = k
c.u = n
c.v = a
g.s = h
g.p = k
g.x = n
g.v = c
n.x = m
n.z = k
f.w = c
f.u = c
f.p = c
f.q = d
f.r = d
f.z = n
assert n.x.v.o.r.w.u.z.w.v.t.txt == "
class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: D = None
        self.q: H = None
        self.p: E = None
        self.w: G = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: D = None
        self.z: I = None
        self.u: G = None
        self.p: G = None
        self.r: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: I = None
        self.q: I = None
        self.w: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: B = None
        self.p: C = None
        self.y: B = None
        self.w: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.p: C = None
        self.x: I = None
        self.v: G = None
        self.txt = txt

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

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

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