class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: F = None
        self.z: H = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: I = None
        self.w: H = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: I = None
        self.w: A = None
        self.p: F = None
        self.v: E = None
        self.s: I = None
        self.u: H = None
        self.q: A = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: A = None
        self.q: B = None
        self.t: I = None
        self.w: C = None
        self.z: G = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: F = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

g = A("g")
l = B("l")
m = C("m")
a = D("a")
e = E("e")
h = F("h")
j = G("j")
b = H("b")
i = I("i")

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: I = None
        self.w: H = None
        self.y: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: I = None
        self.w: A = None
        self.p: F = None
        self.v: E = None
        self.s: I = None
        self.u: H = None
        self.q: A = None
        self.x: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.s: A = None
        self.q: B = None
        self.t: I = None
        self.w: C = None
        self.z: G = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: F = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: A = None
        self.y: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

g = A("g")
l = B("l")
m = C("m")
a = D("a")
e = E("e")
h = F("h")
j = G("j")
b = H("b")
i = I("i")

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