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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: G = None
        self.q: H = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: A = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: C = None
        self.v: F = None
        self.q: A = None
        self.z: F = None
        self.s: C = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: G = None
        self.q: H = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.o: A = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: B = None
        self.x: C = None
        self.v: F = None
        self.q: A = None
        self.z: F = None
        self.s: C = None
        self.r: D = None
        self.txt = txt

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

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