class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: G = 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.z: A = None
        self.x: D = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: A = None
        self.v: A = None
        self.x: F = None
        self.u: E = None
        self.w: A = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: G = None
        self.t: C = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: C = None
        self.r: C = None
        self.t: B = None
        self.o: B = None
        self.z: E = None
        self.txt = txt

e = A("e")
g = B("g")
a = C("a")
b = D("b")
f = E("f")
k = F("k")
l = G("l")
j = A("j")
d = A("d")

e.w = k
e.z = l
g.v = a
a.z = d
a.x = b
a.o = b
b.y = k
b.x = k
b.s = j
b.v = d
b.w = d
b.u = f
b.z = f
f.z = l
f.o = l
f.t = a
f.s = d
k.r = f
k.w = a
l.s = e
l.q = a
l.r = a
l.t = g
l.o = g
l.z = f
j.w = k
j.z = l
d.w = k
d.z = l
assert l.q.x.z.s.w.w.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: G = 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.z: A = None
        self.x: D = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: A = None
        self.v: A = None
        self.x: F = None
        self.u: E = None
        self.w: A = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: G = None
        self.t: C = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: C = None
        self.r: C = None
        self.t: B = None
        self.o: B = None
        self.z: E = None
        self.txt = txt

e = A("e")
g = B("g")
a = C("a")
b = D("b")
f = E("f")
k = F("k")
l = G("l")
j = A("j")
d = A("d")

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