class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: C = None
        self.w: J = None
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: J = None
        self.v: A = None
        self.p: G = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: J = None
        self.z: I = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: J = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: B = None
        self.u: F = None
        self.x: C = None
        self.p: D = None
        self.v: J = None
        self.y: A = None
        self.q: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: G = None
        self.u: B = None
        self.t: B = None
        self.z: F = None
        self.x: F = None
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: B = None
        self.u: D = None
        self.q: F = None
        self.w: G = None
        self.s: D = None
        self.y: E = None
        self.t: D = None
        self.x: G = None
        self.p: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.q: C = None
        self.w: J = None
        self.x: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: J = None
        self.v: A = None
        self.p: G = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: J = None
        self.z: I = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: J = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: B = None
        self.u: F = None
        self.x: C = None
        self.p: D = None
        self.v: J = None
        self.y: A = None
        self.q: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: G = None
        self.u: B = None
        self.t: B = None
        self.z: F = None
        self.x: F = None
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: B = None
        self.u: D = None
        self.q: F = None
        self.w: G = None
        self.s: D = None
        self.y: E = None
        self.t: D = None
        self.x: G = None
        self.p: H = None
        self.txt = txt

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

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

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