class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.r: B = None
        self.y: H = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: C = None
        self.o: I = None
        self.y: I = None
        self.w: D = None
        self.z: J = None
        self.p: G = None
        self.r: J = None
        self.q: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: A = None
        self.s: H = None
        self.y: I = None
        self.w: I = None
        self.r: J = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: B = None
        self.y: D = None
        self.r: F = None
        self.p: D = None
        self.t: J = None
        self.s: D = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: I = None
        self.t: C = None
        self.o: I = None
        self.y: I = None
        self.w: D = None
        self.z: J = None
        self.p: G = None
        self.r: J = None
        self.q: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: A = None
        self.s: H = None
        self.y: I = None
        self.w: I = None
        self.r: J = None
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: B = None
        self.y: D = None
        self.r: F = None
        self.p: D = None
        self.t: J = None
        self.s: D = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: F = None
        self.r: H = None
        self.txt = txt

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

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