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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: E = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: A = None
        self.y: H = None
        self.s: A = None
        self.z: D = None
        self.o: B = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: G = None
        self.s: F = None
        self.v: B = None
        self.p: F = None
        self.x: F = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: F = None
        self.q: F = None
        self.x: E = None
        self.z: E = None
        self.u: F = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: G = None
        self.x: E = None
        self.t: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: A = None
        self.y: H = None
        self.s: A = None
        self.z: D = None
        self.o: B = None
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.w: G = None
        self.s: F = None
        self.v: B = None
        self.p: F = None
        self.x: F = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.p: F = None
        self.q: F = None
        self.x: E = None
        self.z: E = None
        self.u: F = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.t: H = None
        self.txt = txt

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

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

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