class A:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: E = None
        self.x: C = None
        self.s: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: A = None
        self.t: F = None
        self.q: D = None
        self.s: A = None
        self.y: F = None
        self.x: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: G = None
        self.p: A = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: B = None
        self.x: F = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: A = None
        self.o: B = None
        self.z: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: A = None
        self.t: F = None
        self.q: D = None
        self.s: A = None
        self.y: F = None
        self.x: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.w: G = None
        self.p: A = None
        self.y: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: A = None
        self.q: B = None
        self.x: F = None
        self.t: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.w: A = None
        self.o: B = None
        self.z: C = None
        self.txt = txt

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

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