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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: F = None
        self.u: H = None
        self.t: E = None
        self.p: F = None
        self.x: H = None
        self.s: H = None
        self.v: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.z: F = None
        self.u: H = None
        self.t: E = None
        self.p: F = None
        self.x: H = None
        self.s: H = None
        self.v: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: D = None
        self.txt = txt

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

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

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