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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: F = None
        self.v: G = None
        self.q: G = None
        self.x: A = None
        self.p: A = None
        self.y: H = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: F = None
        self.t: B = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: F = None
        self.v: J = None
        self.s: F = None
        self.q: E = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: H = None
        self.o: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: I = None
        self.r: E = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: G = None
        self.o: C = None
        self.txt = txt

l = A("l")
e = B("e")
i = C("i")
n = D("n")
j = E("j")
h = F("h")
m = G("m")
a = H("a")
d = I("d")
k = J("k")

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

class B:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: F = None
        self.v: G = None
        self.q: G = None
        self.x: A = None
        self.p: A = None
        self.y: H = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.r: F = None
        self.t: B = None
        self.o: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: F = None
        self.v: J = None
        self.s: F = None
        self.q: E = None
        self.y: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.t: H = None
        self.o: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: E = None
        self.q: I = None
        self.r: E = None
        self.z: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: G = None
        self.o: C = None
        self.txt = txt

l = A("l")
e = B("e")
i = C("i")
n = D("n")
j = E("j")
h = F("h")
m = G("m")
a = H("a")
d = I("d")
k = J("k")

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