class A:
    def __init__(self, txt: str):
        self.s: I = None
        self.z: I = None
        self.y: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.w: A = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: I = None
        self.q: B = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: J = None
        self.v: B = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.o: A = None
        self.t: B = None
        self.u: D = None
        self.s: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.w: A = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: I = None
        self.q: B = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: J = None
        self.s: J = None
        self.v: B = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.o: A = None
        self.t: B = None
        self.u: D = None
        self.s: J = None
        self.txt = txt

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

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

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