class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: F = None
        self.o: B = None
        self.t: D = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: D = None
        self.y: E = None
        self.z: G = None
        self.u: F = None
        self.w: B = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

d = A("d")
e = B("e")
b = C("b")
a = D("a")
k = E("k")
f = F("f")
c = G("c")
l = E("l")
m = D("m")
i = G("i")

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: F = None
        self.o: B = None
        self.t: D = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.t: D = None
        self.y: E = None
        self.z: G = None
        self.u: F = None
        self.w: B = None
        self.r: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

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

d = A("d")
e = B("e")
b = C("b")
a = D("a")
k = E("k")
f = F("f")
c = G("c")
l = E("l")
m = D("m")
i = G("i")

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