class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: A = None
        self.r: E = None
        self.p: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: A = None
        self.y: C = None
        self.z: B = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: G = None
        self.q: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: C = None
        self.z: G = None
        self.x: C = None
        self.v: C = None
        self.q: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: A = None
        self.y: C = None
        self.z: B = None
        self.r: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: G = None
        self.q: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: C = None
        self.z: G = None
        self.x: C = None
        self.v: C = None
        self.q: E = None
        self.txt = txt

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

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