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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: B = None
        self.w: F = None
        self.q: C = None
        self.r: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: H = None
        self.x: B = None
        self.u: B = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: G = None
        self.t: F = None
        self.w: C = None
        self.o: H = None
        self.q: H = None
        self.s: H = None
        self.z: B = None
        self.txt = txt

j = A("j")
d = B("d")
l = C("l")
k = D("k")
g = E("g")
f = F("f")
i = G("i")
m = H("m")
e = H("e")
c = B("c")

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: B = None
        self.w: F = None
        self.q: C = None
        self.r: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: H = None
        self.x: B = None
        self.u: B = None
        self.o: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: G = None
        self.t: F = None
        self.w: C = None
        self.o: H = None
        self.q: H = None
        self.s: H = None
        self.z: B = None
        self.txt = txt

j = A("j")
d = B("d")
l = C("l")
k = D("k")
g = E("g")
f = F("f")
i = G("i")
m = H("m")
e = H("e")
c = B("c")

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