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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: E = None
        self.x: C = None
        self.t: E = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: E = None
        self.x: C = None
        self.t: E = None
        self.txt = txt

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

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