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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: D = None
        self.r: C = None
        self.y: E = None
        self.w: H = None
        self.u: C = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: B = None
        self.t: E = None
        self.x: E = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: H = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: F = None
        self.v: C = None
        self.s: F = None
        self.u: C = None
        self.o: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: H = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: H = None
        self.txt = txt

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

j = A("j")
l = B("l")
m = C("m")
n = D("n")
h = E("h")
a = F("a")
k = G("k")
b = H("b")
e = E("e")

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: D = None
        self.r: C = None
        self.y: E = None
        self.w: H = None
        self.u: C = None
        self.q: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.s: B = None
        self.t: E = None
        self.x: E = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: H = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: F = None
        self.v: C = None
        self.s: F = None
        self.u: C = None
        self.o: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: H = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: H = None
        self.txt = txt

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

j = A("j")
l = B("l")
m = C("m")
n = D("n")
h = E("h")
a = F("a")
k = G("k")
b = H("b")
e = E("e")

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