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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: F = None
        self.p: G = None
        self.z: F = None
        self.o: F = None
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: E = None
        self.q: G = None
        self.x: B = None
        self.u: F = None
        self.w: G = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: F = None
        self.t: D = None
        self.x: F = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: F = None
        self.p: G = None
        self.z: F = None
        self.o: F = None
        self.x: A = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: E = None
        self.q: G = None
        self.x: B = None
        self.u: F = None
        self.w: G = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: F = None
        self.t: D = None
        self.x: F = None
        self.z: G = None
        self.txt = txt

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

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

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

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

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