class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: C = None
        self.w: B = None
        self.u: B = None
        self.z: F = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: G = None
        self.x: D = None
        self.q: H = None
        self.z: D = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: C = None
        self.x: E = None
        self.w: B = None
        self.o: E = None
        self.z: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

e = A("e")
d = B("d")
a = C("a")
l = D("l")
j = E("j")
h = F("h")
f = G("f")
g = H("g")
m = I("m")

e.u = m
d.o = e
a.z = h
l.x = m
l.s = g
j.p = a
j.x = a
j.w = d
j.u = d
j.z = h
j.r = h
h.o = l
h.x = l
h.z = l
h.w = f
h.q = g
h.y = a
f.t = d
f.w = d
f.s = a
f.x = j
f.o = j
f.z = h
g.v = d
m.u = g
assert a.z.q.v.o.u.u.v.o.txt == "
class A:
    def __init__(self, txt: str):
        self.u: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: C = None
        self.w: B = None
        self.u: B = None
        self.z: F = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: G = None
        self.x: D = None
        self.q: H = None
        self.z: D = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: C = None
        self.x: E = None
        self.w: B = None
        self.o: E = None
        self.z: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

e = A("e")
d = B("d")
a = C("a")
l = D("l")
j = E("j")
h = F("h")
f = G("f")
g = H("g")
m = I("m")

e.u = m
d.o = e
a.z = h
l.x = m
l.s = g
j.p = a
j.x = a
j.w = d
j.u = d
j.z = h
j.r = h
h.o = l
h.x = l
h.z = l
h.w = f
h.q = g
h.y = a
f.t = d
f.w = d
f.s = a
f.x = j
f.o = j
f.z = h
g.v = d
m.u = g
assert a.z.q.v.o.u.u.v.o.txt == "e"