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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: E = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: I = None
        self.q: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: C = None
        self.y: B = None
        self.t: A = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: E = None
        self.y: D = None
        self.o: D = None
        self.z: C = None
        self.u: G = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: D = None
        self.u: F = None
        self.x: A = None
        self.r: A = None
        self.v: B = None
        self.t: C = None
        self.o: D = None
        self.q: D = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: E = None
        self.p: J = None
        self.q: G = None
        self.u: A = None
        self.v: D = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: E = None
        self.r: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: I = None
        self.q: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.z: C = None
        self.y: B = None
        self.t: A = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: E = None
        self.y: D = None
        self.o: D = None
        self.z: C = None
        self.u: G = None
        self.r: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: D = None
        self.u: F = None
        self.x: A = None
        self.r: A = None
        self.v: B = None
        self.t: C = None
        self.o: D = None
        self.q: D = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.x: E = None
        self.p: J = None
        self.q: G = None
        self.u: A = None
        self.v: D = None
        self.z: E = None
        self.txt = txt

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

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

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

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