class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: F = None
        self.q: H = None
        self.r: G = None
        self.y: D = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: F = None
        self.q: H = None
        self.r: G = None
        self.y: D = None
        self.s: B = None
        self.txt = txt

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

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

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