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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: A = None
        self.z: C = None
        self.v: C = None
        self.o: G = None
        self.p: A = None
        self.r: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: D = None
        self.s: F = None
        self.q: D = None
        self.u: B = None
        self.r: D = None
        self.txt = txt

j = A("j")
g = B("g")
i = C("i")
k = D("k")
n = E("n")
a = F("a")
l = G("l")
d = H("d")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: A = None
        self.z: C = None
        self.v: C = None
        self.o: G = None
        self.p: A = None
        self.r: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: D = None
        self.s: F = None
        self.q: D = None
        self.u: B = None
        self.r: D = None
        self.txt = txt

j = A("j")
g = B("g")
i = C("i")
k = D("k")
n = E("n")
a = F("a")
l = G("l")
d = H("d")

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