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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: D = None
        self.s: A = None
        self.r: F = None
        self.q: C = None
        self.w: C = None
        self.o: C = None
        self.v: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: A = None
        self.v: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: D = None
        self.s: A = None
        self.r: F = None
        self.q: C = None
        self.w: C = None
        self.o: C = None
        self.v: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: A = None
        self.v: G = None
        self.txt = txt

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

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

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

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