class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.w: D = None
        self.v: E = None
        self.q: C = None
        self.o: E = None
        self.u: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: H = None
        self.w: B = None
        self.y: I = None
        self.z: E = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: G = None
        self.s: C = None
        self.q: C = None
        self.t: C = None
        self.y: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: H = None
        self.w: B = None
        self.y: I = None
        self.z: E = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: G = None
        self.s: C = None
        self.q: C = None
        self.t: C = None
        self.y: D = None
        self.txt = txt

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

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