class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.u: F = None
        self.p: E = None
        self.r: I = None
        self.o: I = None
        self.x: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: B = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: F = None
        self.s: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: B = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: F = None
        self.s: C = None
        self.txt = txt

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

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

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

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