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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: C = None
        self.x: G = None
        self.t: D = None
        self.s: E = None
        self.o: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: F = None
        self.t: E = None
        self.r: A = None
        self.o: E = None
        self.p: E = None
        self.txt = txt

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

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

l = A("l")
a = B("a")
g = C("g")
b = D("b")
m = E("m")
k = F("k")
i = G("i")
j = B("j")
h = E("h")
e = F("e")

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: C = None
        self.x: G = None
        self.t: D = None
        self.s: E = None
        self.o: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: B = None
        self.s: F = None
        self.t: E = None
        self.r: A = None
        self.o: E = None
        self.p: E = None
        self.txt = txt

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

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

l = A("l")
a = B("a")
g = C("g")
b = D("b")
m = E("m")
k = F("k")
i = G("i")
j = B("j")
h = E("h")
e = F("e")

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