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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: E = 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.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: E = None
        self.p: C = None
        self.v: A = None
        self.r: G = None
        self.q: E = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: F = None
        self.v: D = None
        self.w: E = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: F = None
        self.r: C = None
        self.z: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: E = 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.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: E = None
        self.p: C = None
        self.v: A = None
        self.r: G = None
        self.q: E = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: F = None
        self.v: D = None
        self.w: E = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: F = None
        self.r: C = None
        self.z: B = None
        self.txt = txt

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

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