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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: E = None
        self.y: C = None
        self.t: B = None
        self.p: B = None
        self.q: D = None
        self.r: E = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: D = None
        self.t: C = None
        self.z: F = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: D = None
        self.p: F = None
        self.s: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.x: E = None
        self.y: C = None
        self.t: B = None
        self.p: B = None
        self.q: D = None
        self.r: E = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.q: D = None
        self.t: C = None
        self.z: F = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.z: D = None
        self.p: F = None
        self.s: F = None
        self.txt = txt

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

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