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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: I = None
        self.t: G = None
        self.r: F = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: A = None
        self.v: A = None
        self.s: G = None
        self.r: E = None
        self.x: G = None
        self.q: F = None
        self.w: E = None
        self.y: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: F = None
        self.r: A = None
        self.v: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: I = None
        self.t: G = None
        self.r: F = None
        self.o: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: A = None
        self.v: A = None
        self.s: G = None
        self.r: E = None
        self.x: G = None
        self.q: F = None
        self.w: E = None
        self.y: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.t: F = None
        self.r: A = None
        self.v: D = None
        self.txt = txt

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

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

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